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
  • Method Details

    • cancelWorkflow

      void cancelWorkflow(WorkflowLifecycleControl.CancelWorkflowCommand command)
      Cancels the entire workflow, publishing the terminal <workflow>:CANCELLED event.
      Parameters:
      command - cancellation command.
    • failWorkflow

      Fails the entire workflow, publishing the terminal <workflow>:FAILED event.
      Parameters:
      command - failure command.
    • cancelStep

      boolean cancelStep(WorkflowLifecycleControl.CancelStepCommand command)
      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>:CANCELLED event through its normal terminal-event path.

      Parameters:
      command - step cancellation command.
      Returns:
      true if cancellation was initiated for a running, non-terminal step, otherwise false