@Component public class FlowRunnerImpl extends java.lang.Object implements FlowRunner
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
FlowRunnerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
awaitCompletion()
Blocks until the flow execution is complete.
|
void |
awaitCompletion(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks until the flow execution is complete.
|
RunFlowResponse |
getJobResponseById(java.lang.String jobId) |
java.util.List<java.lang.String> |
getQueuedJobIdsFromFlow(java.lang.String flowName) |
Flow |
getRunningFlow() |
java.lang.String |
getRunningStepKey() |
boolean |
isJobRunning() |
FlowRunner |
onStatusChanged(FlowStatusListener listener)
Sets the status change listener on the flowrunner object
|
RunFlowResponse |
runFlow(java.lang.String flowName)
Runs the entire flow, with full defaults
|
RunFlowResponse |
runFlow(java.lang.String flowName,
java.util.List<java.lang.String> stepNums)
Runs the flow, with a specific set of steps, with all defaults from step
|
RunFlowResponse |
runFlow(java.lang.String flowName,
java.util.List<java.lang.String> stepNums,
java.lang.String jobId)
Runs the flow, with a specific set of steps, with all custom settings
|
RunFlowResponse |
runFlow(java.lang.String flowName,
java.util.List<java.lang.String> stepNums,
java.lang.String jobId,
java.util.Map<java.lang.String,java.lang.Object> options)
Runs the flow, with a specific set of steps, with all custom settings
|
RunFlowResponse |
runFlow(java.lang.String flowName,
java.util.List<java.lang.String> stepNums,
java.lang.String jobId,
java.util.Map<java.lang.String,java.lang.Object> options,
java.util.Map<java.lang.String,java.lang.Object> stepConfig)
Runs the flow, with a specific set of steps, with all custom settings
|
RunFlowResponse |
runFlow(java.lang.String flowName,
java.lang.String jobId)
Runs the flow, with a specific set of steps, with all custom settings
|
RunFlowResponse |
runFlow(java.lang.String flowName,
java.lang.String jobId,
java.util.Map<java.lang.String,java.lang.Object> options)
Runs the flow, with a specific set of steps, with all custom settings
|
void |
stopJob(java.lang.String jobId)
Runs the flow.
|
public FlowRunner onStatusChanged(FlowStatusListener listener)
FlowRunner
onStatusChanged
in interface FlowRunner
listener
- - the listener for when the status changespublic RunFlowResponse runFlow(java.lang.String flowName)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runpublic RunFlowResponse runFlow(java.lang.String flowName, java.util.List<java.lang.String> stepNums)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runstepNums
- the steps in the flow to runpublic RunFlowResponse runFlow(java.lang.String flowName, java.lang.String jobId)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runjobId
- the jobid to be used for the flowpublic RunFlowResponse runFlow(java.lang.String flowName, java.util.List<java.lang.String> stepNums, java.lang.String jobId)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runstepNums
- the steps in the flow to runjobId
- the jobid to be used for the flowpublic RunFlowResponse runFlow(java.lang.String flowName, java.lang.String jobId, java.util.Map<java.lang.String,java.lang.Object> options)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runjobId
- the jobid to be used for the flowoptions
- the key/value options to be passedpublic RunFlowResponse runFlow(java.lang.String flowName, java.util.List<java.lang.String> stepNums, java.lang.String jobId, java.util.Map<java.lang.String,java.lang.Object> options)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runstepNums
- the steps in the flow to runjobId
- the jobid to be used for the flowoptions
- the key/value options to be passedpublic RunFlowResponse runFlow(java.lang.String flowName, java.util.List<java.lang.String> stepNums, java.lang.String jobId, java.util.Map<java.lang.String,java.lang.Object> options, java.util.Map<java.lang.String,java.lang.Object> stepConfig)
FlowRunner
runFlow
in interface FlowRunner
flowName
- the flow to runstepNums
- the steps in the flow to runjobId
- the jobid to be used for the flowoptions
- the key/value options to be passedstepConfig
- the key/value config to override the running of the steppublic void stopJob(java.lang.String jobId)
FlowRunner
stopJob
in interface FlowRunner
jobId
- the id of the running flowpublic void awaitCompletion()
FlowRunner
awaitCompletion
in interface FlowRunner
public void awaitCompletion(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
FlowRunner
awaitCompletion
in interface FlowRunner
timeout
- the maximum time to waitunit
- the time unit of the timeout argumentjava.lang.InterruptedException
- if interrupted while waitingpublic java.util.List<java.lang.String> getQueuedJobIdsFromFlow(java.lang.String flowName)
public RunFlowResponse getJobResponseById(java.lang.String jobId)
public boolean isJobRunning()
public java.lang.String getRunningStepKey()
public Flow getRunningFlow()