Interface WorkflowLifecycleControl
- All Known Subinterfaces:
WorkflowExecutionOperations
- All Known Implementing Classes:
WorkflowExecutionOperationsDelegation,WorkflowLifecycleControlDelegate
public interface WorkflowLifecycleControl
Lifecycle control contract for programmatically changing workflow and step lifecycle state.
Each intent is carried by its own typed command, so callers and implementations know which lifecycle transition is requested from its type alone. DSL users normally use the corresponding convenience methods exposed by their DSL workflow context. Implementations apply these commands synchronously on the workflow control thread.
- Since:
- 5.4.0
- Author:
- Stefan Dragisic
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCommand carrying the intent to cancel a single running step.static interfaceCommand carrying the intent to cancel an entire workflow.static interfaceCommand carrying the intent to fail an entire workflow. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCancels a single running step while the workflow itself stays non-terminal.voidCancels the entire workflow, publishing the terminal<workflow>:CANCELLEDevent.voidFails the entire workflow, publishing the terminal<workflow>:FAILEDevent.
-
Method Details
-
cancelWorkflow
Cancels the entire workflow, publishing the terminal<workflow>:CANCELLEDevent.- Parameters:
command- cancellation command.
-
failWorkflow
Fails the entire workflow, publishing the terminal<workflow>:FAILEDevent.- Parameters:
command- failure command.
-
cancelStep
Cancels a single running step while the workflow itself stays non-terminal.The control operation completes the step's running future exceptionally. The owning step executor subsequently authors the guarded
<step>:CANCELLEDevent through its normal terminal-event path.- Parameters:
command- step cancellation command.- Returns:
trueif cancellation was initiated for a running, non-terminal step, otherwisefalse
-