@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)
FlowRunneronStatusChanged in interface FlowRunnerlistener - - the listener for when the status changespublic RunFlowResponse runFlow(java.lang.String flowName)
FlowRunnerrunFlow in interface FlowRunnerflowName - the flow to runpublic RunFlowResponse runFlow(java.lang.String flowName, java.util.List<java.lang.String> stepNums)
FlowRunnerrunFlow in interface FlowRunnerflowName - the flow to runstepNums - the steps in the flow to runpublic RunFlowResponse runFlow(java.lang.String flowName, java.lang.String jobId)
FlowRunnerrunFlow in interface FlowRunnerflowName - 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)
FlowRunnerrunFlow in interface FlowRunnerflowName - 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)
FlowRunnerrunFlow in interface FlowRunnerflowName - 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)
FlowRunnerrunFlow in interface FlowRunnerflowName - 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)
FlowRunnerrunFlow in interface FlowRunnerflowName - 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)
FlowRunnerstopJob in interface FlowRunnerjobId - the id of the running flowpublic void awaitCompletion()
FlowRunnerawaitCompletion in interface FlowRunnerpublic void awaitCompletion(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
FlowRunnerawaitCompletion in interface FlowRunnertimeout - 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()