Class RemoteWorkflowEngine
- java.lang.Object
-
- org.apache.hop.core.variables.Variables
-
- org.apache.hop.workflow.engines.remote.RemoteWorkflowEngine
-
- All Implemented Interfaces:
IExtensionData,ILoggingObject,INamedParameterDefinitions,INamedParameters,IVariables,IWorkflowEngine<WorkflowMeta>
@WorkflowEnginePlugin(id="Remote", name="Hop remote workflow engine", description="Executes your workflow on a remote hop server") public class RemoteWorkflowEngine extends Variables implements IWorkflowEngine<WorkflowMeta>
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RemoteWorkflowEngine()
-
Method Summary
-
Methods inherited from class org.apache.hop.core.variables.Variables
copyFrom, getADefaultVariableSpace, getParentVariables, getVariable, getVariable, getVariableBoolean, getVariableNames, initializeFrom, resolve, resolve, resolve, setParentVariables, setVariable, setVariables, shareWith
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.core.variables.IVariables
copyFrom, getParentVariables, getVariable, getVariable, getVariableBoolean, getVariableNames, initializeFrom, resolve, resolve, resolve, setParentVariables, setVariable, setVariables, shareWith
-
-
-
-
Field Detail
-
CONFIGURATION_IN_EXPORT_FILENAME
public static final String CONFIGURATION_IN_EXPORT_FILENAME
Constant specifying a filename containing XML to inject into a ZIP file created during resource export.- See Also:
- Constant Field Values
-
workflowMeta
protected WorkflowMeta workflowMeta
-
pluginId
protected String pluginId
-
workflowRunConfiguration
protected WorkflowRunConfiguration workflowRunConfiguration
-
remoteWorkflowRunConfiguration
protected RemoteWorkflowRunConfiguration remoteWorkflowRunConfiguration
-
previousResult
protected Result previousResult
-
result
protected Result result
-
metadataProvider
protected IHopMetadataProvider metadataProvider
-
logChannel
protected ILogChannel logChannel
-
loggingObject
protected LoggingObject loggingObject
-
logLevel
protected LogLevel logLevel
-
serverPollDelay
protected long serverPollDelay
-
serverPollInterval
protected long serverPollInterval
-
hopServer
protected HopServer hopServer
-
containerId
protected String containerId
-
lastLogLineNr
protected int lastLogLineNr
-
stopped
protected boolean stopped
-
workflowStatus
protected HopServerWorkflowStatus workflowStatus
-
interactive
protected boolean interactive
-
finished
protected boolean finished
-
initialized
protected boolean initialized
-
running
protected boolean running
-
active
protected boolean active
-
statusDescription
protected String statusDescription
-
gatheringMetrics
protected boolean gatheringMetrics
-
forcingSeparateLogging
protected boolean forcingSeparateLogging
-
executionStartDate
protected Date executionStartDate
-
executionEndDate
protected Date executionEndDate
-
workflowFinishedListeners
protected List<IExecutionFinishedListener<IWorkflowEngine<WorkflowMeta>>> workflowFinishedListeners
-
workflowStartedListeners
protected List<IExecutionStartedListener<IWorkflowEngine<WorkflowMeta>>> workflowStartedListeners
-
actionListeners
protected List<IActionListener> actionListeners
-
delegationListeners
protected List<IDelegationListener> delegationListeners
-
activeActions
protected Set<ActionMeta> activeActions
-
parentWorkflow
protected IWorkflowEngine<WorkflowMeta> parentWorkflow
The workflow that's launching this (sub-) workflow. This gives us access to the whole chain, including the parent variables, etc.
-
parentPipeline
protected IPipelineEngine parentPipeline
The parent pipeline
-
-
Method Detail
-
createDefaultWorkflowEngineRunConfiguration
public IWorkflowEngineRunConfiguration createDefaultWorkflowEngineRunConfiguration()
- Specified by:
createDefaultWorkflowEngineRunConfigurationin interfaceIWorkflowEngine<WorkflowMeta>
-
setInternalHopVariables
public void setInternalHopVariables()
- Specified by:
setInternalHopVariablesin interfaceIWorkflowEngine<WorkflowMeta>
-
getWorkflowName
public String getWorkflowName()
- Specified by:
getWorkflowNamein interfaceIWorkflowEngine<WorkflowMeta>
-
startExecution
public Result startExecution()
- Specified by:
startExecutionin interfaceIWorkflowEngine<WorkflowMeta>
-
monitorRemoteWorkflowUntilFinished
public void monitorRemoteWorkflowUntilFinished()
-
getWorkflowStatus
public void getWorkflowStatus() throws HopException- Throws:
HopException
-
stopExecution
public void stopExecution()
- Specified by:
stopExecutionin interfaceIWorkflowEngine<WorkflowMeta>
-
sendToHopServer
public void sendToHopServer(IVariables variables, WorkflowMeta workflowMeta, WorkflowExecutionConfiguration executionConfiguration, IHopMetadataProvider metadataProvider) throws HopException
Send to hop server.- Parameters:
workflowMeta- the workflow metaexecutionConfiguration- the execution configurationmetadataProvider- the metadataProvider- Throws:
HopException- the hop exception
-
addWorkflowFinishedListener
public void addWorkflowFinishedListener(IExecutionFinishedListener<IWorkflowEngine<WorkflowMeta>> finishedListener)
- Specified by:
addWorkflowFinishedListenerin interfaceIWorkflowEngine<WorkflowMeta>
-
fireWorkflowFinishListeners
public void fireWorkflowFinishListeners() throws HopException- Specified by:
fireWorkflowFinishListenersin interfaceIWorkflowEngine<WorkflowMeta>- Throws:
HopException
-
addWorkflowStartedListener
public void addWorkflowStartedListener(IExecutionStartedListener<IWorkflowEngine<WorkflowMeta>> finishedListener)
- Specified by:
addWorkflowStartedListenerin interfaceIWorkflowEngine<WorkflowMeta>
-
fireWorkflowStartedListeners
public void fireWorkflowStartedListeners() throws HopException- Specified by:
fireWorkflowStartedListenersin interfaceIWorkflowEngine<WorkflowMeta>- Throws:
HopException
-
addActionListener
public void addActionListener(IActionListener actionListener)
- Specified by:
addActionListenerin interfaceIWorkflowEngine<WorkflowMeta>
-
removeActionListener
public void removeActionListener(IActionListener actionListener)
-
getRegistrationDate
public Date getRegistrationDate()
Gets the registration date. For workflow, this always returns null- Specified by:
getRegistrationDatein interfaceILoggingObject- Returns:
- null
-
getLogChannelId
public String getLogChannelId()
Gets the log channel id.- Specified by:
getLogChannelIdin interfaceILoggingObject- Returns:
- the logChannelId
-
getObjectType
public LoggingObjectType getObjectType()
Gets LoggingObjectType.JOB, which is always the value for Workflow.- Specified by:
getObjectTypein interfaceILoggingObject- Returns:
- LoggingObjectType LoggingObjectType.JOB
-
getParent
public ILoggingObject getParent()
Gets parent logging object.- Specified by:
getParentin interfaceILoggingObject- Returns:
- parentLoggingObject
-
getObjectName
public String getObjectName()
Gets the workflow name.- Specified by:
getObjectNamein interfaceILoggingObject- Returns:
- workflowName
-
getObjectCopy
public String getObjectCopy()
Always returns null for Workflow.- Specified by:
getObjectCopyin interfaceILoggingObject- Returns:
- null
-
getFilename
public String getFilename()
Gets the file name.- Specified by:
getFilenamein interfaceILoggingObject- Returns:
- the filename
-
addParameterDefinition
public void addParameterDefinition(String key, String defValue, String description) throws DuplicateParamException
- Specified by:
addParameterDefinitionin interfaceINamedParameterDefinitions- Throws:
DuplicateParamException
-
getParameterDescription
public String getParameterDescription(String key) throws UnknownParamException
- Specified by:
getParameterDescriptionin interfaceINamedParameterDefinitions- Throws:
UnknownParamException
-
getParameterDefault
public String getParameterDefault(String key) throws UnknownParamException
- Specified by:
getParameterDefaultin interfaceINamedParameterDefinitions- Throws:
UnknownParamException
-
getParameterValue
public String getParameterValue(String key) throws UnknownParamException
- Specified by:
getParameterValuein interfaceINamedParameters- Throws:
UnknownParamException
-
listParameters
public String[] listParameters()
- Specified by:
listParametersin interfaceINamedParameterDefinitions
-
setParameterValue
public void setParameterValue(String key, String value) throws UnknownParamException
- Specified by:
setParameterValuein interfaceINamedParameters- Throws:
UnknownParamException
-
removeAllParameters
public void removeAllParameters()
- Specified by:
removeAllParametersin interfaceINamedParameterDefinitions- Specified by:
removeAllParametersin interfaceINamedParameters
-
clearParameterValues
public void clearParameterValues()
- Specified by:
clearParameterValuesin interfaceINamedParameters
-
activateParameters
public void activateParameters(IVariables variables)
- Specified by:
activateParametersin interfaceINamedParameters
-
copyParametersFromDefinitions
public void copyParametersFromDefinitions(INamedParameterDefinitions definitions)
- Specified by:
copyParametersFromDefinitionsin interfaceINamedParameters
-
getWorkflowMeta
public WorkflowMeta getWorkflowMeta()
Gets workflowMeta- Specified by:
getWorkflowMetain interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of workflowMeta
-
setWorkflowMeta
public void setWorkflowMeta(WorkflowMeta workflowMeta)
- Specified by:
setWorkflowMetain interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
workflowMeta- The workflowMeta to set
-
getPluginId
public String getPluginId()
Gets pluginId- Returns:
- value of pluginId
-
setPluginId
public void setPluginId(String pluginId)
- Parameters:
pluginId- The pluginId to set
-
getWorkflowRunConfiguration
public WorkflowRunConfiguration getWorkflowRunConfiguration()
Gets workflowRunConfiguration- Specified by:
getWorkflowRunConfigurationin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of workflowRunConfiguration
-
setWorkflowRunConfiguration
public void setWorkflowRunConfiguration(WorkflowRunConfiguration workflowRunConfiguration)
- Specified by:
setWorkflowRunConfigurationin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
workflowRunConfiguration- The workflowRunConfiguration to set
-
getPreviousResult
public Result getPreviousResult()
Gets previousResult- Returns:
- value of previousResult
-
setPreviousResult
public void setPreviousResult(Result previousResult)
- Parameters:
previousResult- The previousResult to set
-
getResult
public Result getResult()
Gets result- Specified by:
getResultin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of result
-
setResult
public void setResult(Result result)
- Specified by:
setResultin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
result- The result to set
-
getMetadataProvider
public IHopMetadataProvider getMetadataProvider()
Gets metadataProvider- Specified by:
getMetadataProviderin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of metadataProvider
-
setMetadataProvider
public void setMetadataProvider(IHopMetadataProvider metadataProvider)
- Specified by:
setMetadataProviderin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
metadataProvider- The metadataProvider to set
-
getLogChannel
public ILogChannel getLogChannel()
Gets logChannel- Specified by:
getLogChannelin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of logChannel
-
setLogChannel
public void setLogChannel(ILogChannel logChannel)
- Parameters:
logChannel- The logChannel to set
-
getLoggingObject
public LoggingObject getLoggingObject()
Gets loggingObject- Returns:
- value of loggingObject
-
setLoggingObject
public void setLoggingObject(LoggingObject loggingObject)
- Parameters:
loggingObject- The loggingObject to set
-
getLogLevel
public LogLevel getLogLevel()
Gets logLevel- Specified by:
getLogLevelin interfaceILoggingObject- Returns:
- value of logLevel
-
setLogLevel
public void setLogLevel(LogLevel logLevel)
- Specified by:
setLogLevelin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
logLevel- The logLevel to set
-
getServerPollDelay
public long getServerPollDelay()
Gets serverPollDelay- Returns:
- value of serverPollDelay
-
setServerPollDelay
public void setServerPollDelay(long serverPollDelay)
- Parameters:
serverPollDelay- The serverPollDelay to set
-
getServerPollInterval
public long getServerPollInterval()
Gets serverPollInterval- Returns:
- value of serverPollInterval
-
setServerPollInterval
public void setServerPollInterval(long serverPollInterval)
- Parameters:
serverPollInterval- The serverPollInterval to set
-
getHopServer
public HopServer getHopServer()
Gets hopServer- Returns:
- value of hopServer
-
setHopServer
public void setHopServer(HopServer hopServer)
- Parameters:
hopServer- The hopServer to set
-
getContainerId
public String getContainerId()
Gets serverObjectId- Specified by:
getContainerIdin interfaceILoggingObject- Specified by:
getContainerIdin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of serverObjectId
-
setContainerId
public void setContainerId(String containerId)
- Specified by:
setContainerIdin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
containerId- The serverObjectId to set
-
getLastLogLineNr
public int getLastLogLineNr()
Gets lastLogLineNr- Returns:
- value of lastLogLineNr
-
setLastLogLineNr
public void setLastLogLineNr(int lastLogLineNr)
- Parameters:
lastLogLineNr- The lastLogLineNr to set
-
isStopped
public boolean isStopped()
Gets stopped- Specified by:
isStoppedin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of stopped
-
setStopped
public void setStopped(boolean stopped)
- Specified by:
setStoppedin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
stopped- The stopped to set
-
setWorkflowStatus
public void setWorkflowStatus(HopServerWorkflowStatus workflowStatus)
- Parameters:
workflowStatus- The workflowStatus to set
-
isInteractive
public boolean isInteractive()
Gets interactive- Specified by:
isInteractivein interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of interactive
-
setInteractive
public void setInteractive(boolean interactive)
- Specified by:
setInteractivein interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
interactive- The interactive to set
-
isFinished
public boolean isFinished()
Gets finished- Specified by:
isFinishedin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of finished
-
setFinished
public void setFinished(boolean finished)
- Specified by:
setFinishedin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
finished- The finished to set
-
isInitialized
public boolean isInitialized()
Gets initialized- Specified by:
isInitializedin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of initialized
-
setInitialized
public void setInitialized(boolean initialized)
- Parameters:
initialized- The initialized to set
-
isRunning
public boolean isRunning()
Gets running- Returns:
- value of running
-
setRunning
public void setRunning(boolean running)
- Parameters:
running- The running to set
-
getStatusDescription
public String getStatusDescription()
Gets statusDescription- Specified by:
getStatusDescriptionin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of statusDescription
-
setStatusDescription
public void setStatusDescription(String statusDescription)
- Parameters:
statusDescription- The statusDescription to set
-
isActive
public boolean isActive()
Gets active- Specified by:
isActivein interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of active
-
setActive
public void setActive(boolean active)
- Parameters:
active- The active to set
-
getExecutionStartDate
public Date getExecutionStartDate()
Gets executionStartDate- Specified by:
getExecutionStartDatein interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of executionStartDate
-
setExecutionStartDate
public void setExecutionStartDate(Date executionStartDate)
- Parameters:
executionStartDate- The executionStartDate to set
-
getExecutionEndDate
public Date getExecutionEndDate()
Gets executionEndDate- Specified by:
getExecutionEndDatein interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of executionEndDate
-
setExecutionEndDate
public void setExecutionEndDate(Date executionEndDate)
- Parameters:
executionEndDate- The executionEndDate to set
-
getWorkflowFinishedListeners
public List<IExecutionFinishedListener<IWorkflowEngine<WorkflowMeta>>> getWorkflowFinishedListeners()
Gets workflowFinishedListeners- Specified by:
getWorkflowFinishedListenersin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of workflowFinishedListeners
-
setWorkflowFinishedListeners
public void setWorkflowFinishedListeners(List<IExecutionFinishedListener<IWorkflowEngine<WorkflowMeta>>> workflowFinishedListeners)
- Parameters:
workflowFinishedListeners- The workflowFinishedListeners to set
-
getWorkflowStartedListeners
public List<IExecutionStartedListener<IWorkflowEngine<WorkflowMeta>>> getWorkflowStartedListeners()
Gets workflowStartedListeners- Specified by:
getWorkflowStartedListenersin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of workflowStartedListeners
-
setWorkflowStartedListeners
public void setWorkflowStartedListeners(List<IExecutionStartedListener<IWorkflowEngine<WorkflowMeta>>> workflowStartedListeners)
- Parameters:
workflowStartedListeners- The workflowStartedListeners to set
-
getActionListeners
public List<IActionListener> getActionListeners()
Gets actionListeners- Specified by:
getActionListenersin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of actionListeners
-
setActionListeners
public void setActionListeners(List<IActionListener> actionListeners)
- Parameters:
actionListeners- The actionListeners to set
-
getDelegationListeners
public List<IDelegationListener> getDelegationListeners()
Gets delegationListeners- Returns:
- value of delegationListeners
-
setDelegationListeners
public void setDelegationListeners(List<IDelegationListener> delegationListeners)
- Parameters:
delegationListeners- The delegationListeners to set
-
getActiveActions
public Set<ActionMeta> getActiveActions()
Gets activeActionPipeline- Specified by:
getActiveActionsin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of activeActionPipeline
-
setActiveActions
public void setActiveActions(Set<ActionMeta> activeActions)
- Parameters:
activeActions- The activeActions to set
-
getNamedParams
public INamedParameters getNamedParams()
Gets namedParams- Returns:
- value of namedParams
-
setNamedParams
public void setNamedParams(INamedParameters namedParams)
- Parameters:
namedParams- The namedParams to set
-
getExtensionDataMap
public Map<String,Object> getExtensionDataMap()
Gets extensionDataMap- Specified by:
getExtensionDataMapin interfaceIExtensionData- Specified by:
getExtensionDataMapin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of extensionDataMap
-
setExtensionDataMap
public void setExtensionDataMap(Map<String,Object> extensionDataMap)
- Parameters:
extensionDataMap- The extensionDataMap to set
-
getSourceRows
public List<RowMetaAndData> getSourceRows()
Gets sourceRows- Returns:
- value of sourceRows
-
setSourceRows
public void setSourceRows(List<RowMetaAndData> sourceRows)
- Specified by:
setSourceRowsin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
sourceRows- The sourceRows to set
-
getStartActionMeta
public ActionMeta getStartActionMeta()
Gets start action meta- Returns:
- value of start action meta
-
setStartActionMeta
public void setStartActionMeta(ActionMeta actionMeta)
- Specified by:
setStartActionMetain interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
actionMeta- The start action to set
-
getWorkflowTracker
public WorkflowTracker getWorkflowTracker()
Gets workflowTracker- Specified by:
getWorkflowTrackerin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of workflowTracker
-
setWorkflowTracker
public void setWorkflowTracker(WorkflowTracker workflowTracker)
- Parameters:
workflowTracker- The workflowTracker to set
-
getParentWorkflow
public IWorkflowEngine<WorkflowMeta> getParentWorkflow()
Gets parentWorkflow- Specified by:
getParentWorkflowin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of parentWorkflow
-
setParentWorkflow
public void setParentWorkflow(IWorkflowEngine<WorkflowMeta> parentWorkflow)
- Specified by:
setParentWorkflowin interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
parentWorkflow- The parentWorkflow to set
-
getParentPipeline
public IPipelineEngine getParentPipeline()
Gets parentPipeline- Specified by:
getParentPipelinein interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of parentPipeline
-
setParentPipeline
public void setParentPipeline(IPipelineEngine parentPipeline)
- Specified by:
setParentPipelinein interfaceIWorkflowEngine<WorkflowMeta>- Parameters:
parentPipeline- The parentPipeline to set
-
getParentLoggingObject
public ILoggingObject getParentLoggingObject()
Gets parentLoggingObject- Returns:
- value of parentLoggingObject
-
setParentLoggingObject
public void setParentLoggingObject(ILoggingObject parentLoggingObject)
- Parameters:
parentLoggingObject- The parentLoggingObject to set
-
getActionResults
public LinkedList<ActionResult> getActionResults()
Gets actionResults- Specified by:
getActionResultsin interfaceIWorkflowEngine<WorkflowMeta>- Returns:
- value of actionResults
-
isForcingSeparateLogging
public boolean isForcingSeparateLogging()
Gets forcingSeparateLogging- Specified by:
isForcingSeparateLoggingin interfaceILoggingObject- Returns:
- value of forcingSeparateLogging
-
setForcingSeparateLogging
public void setForcingSeparateLogging(boolean forcingSeparateLogging)
- Specified by:
setForcingSeparateLoggingin interfaceILoggingObject- Parameters:
forcingSeparateLogging- The forcingSeparateLogging to set
-
isGatheringMetrics
public boolean isGatheringMetrics()
Gets gatheringMetrics- Specified by:
isGatheringMetricsin interfaceILoggingObject- Returns:
- value of gatheringMetrics
-
setGatheringMetrics
public void setGatheringMetrics(boolean gatheringMetrics)
- Specified by:
setGatheringMetricsin interfaceILoggingObject- Parameters:
gatheringMetrics- The gatheringMetrics to set
-
-