Package io.iworkflow.core
Class StateMovement
- java.lang.Object
-
- io.iworkflow.core.StateMovement
-
@Immutable public abstract class StateMovement extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static StateMovementDEAD_END_WORKFLOW_MOVEMENTstatic StateMovementFORCE_FAILING_WORKFLOW_MOVEMENTstatic java.lang.StringRESERVED_STATE_ID_PREFIX
-
Constructor Summary
Constructors Constructor Description StateMovement()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <I> StateMovementcreate(java.lang.Class<? extends WorkflowState<? extends I>> stateClass)static <I> StateMovementcreate(java.lang.Class<? extends WorkflowState<? extends I>> stateClass, I stateInput)static <I> StateMovementcreate(java.lang.Class<? extends WorkflowState<? extends I>> stateClass, I stateInput, WorkflowStateOptions stateOptionsOverride)static StateMovementcreate(java.lang.String stateId)use the other one with WorkflowState class param if the stateId is provided by default, to make your code cleanerstatic <I> StateMovementcreate(java.lang.String stateId, I stateInput, WorkflowStateOptions stateOptionsOverride)use the other one with WorkflowState class param if the stateId is provided by default, to make your code cleanerstatic StateMovementforceCompleteWorkflow()static StateMovementforceCompleteWorkflow(java.lang.Object output)static StateMovementforceFailWorkflow(java.lang.Object output)abstract java.lang.StringgetStateId()abstract java.util.Optional<java.lang.Object>getStateInput()abstract java.util.Optional<WorkflowStateOptions>getStateOptionsOverride()static StateMovementgracefulCompleteWorkflow()static StateMovementgracefulCompleteWorkflow(java.lang.Object output)
-
-
-
Field Detail
-
RESERVED_STATE_ID_PREFIX
public static final java.lang.String RESERVED_STATE_ID_PREFIX
- See Also:
- Constant Field Values
-
DEAD_END_WORKFLOW_MOVEMENT
public static final StateMovement DEAD_END_WORKFLOW_MOVEMENT
-
FORCE_FAILING_WORKFLOW_MOVEMENT
public static final StateMovement FORCE_FAILING_WORKFLOW_MOVEMENT
-
-
Method Detail
-
getStateId
public abstract java.lang.String getStateId()
-
getStateInput
public abstract java.util.Optional<java.lang.Object> getStateInput()
-
getStateOptionsOverride
public abstract java.util.Optional<WorkflowStateOptions> getStateOptionsOverride()
-
gracefulCompleteWorkflow
public static StateMovement gracefulCompleteWorkflow()
-
gracefulCompleteWorkflow
public static StateMovement gracefulCompleteWorkflow(java.lang.Object output)
-
forceCompleteWorkflow
public static StateMovement forceCompleteWorkflow()
-
forceCompleteWorkflow
public static StateMovement forceCompleteWorkflow(java.lang.Object output)
-
forceFailWorkflow
public static StateMovement forceFailWorkflow(java.lang.Object output)
-
create
public static <I> StateMovement create(java.lang.Class<? extends WorkflowState<? extends I>> stateClass, I stateInput, WorkflowStateOptions stateOptionsOverride)
- Type Parameters:
I- Class type of the WorkflowState input- Parameters:
stateClass- requiredstateInput- optional, can be nullstateOptionsOverride- optional, can be null. It is used to override the defined one in the State class- Returns:
- state movement
-
create
public static <I> StateMovement create(java.lang.Class<? extends WorkflowState<? extends I>> stateClass, I stateInput)
- Type Parameters:
I- Class type of the WorkflowState input- Parameters:
stateClass- requiredstateInput- optional, can be null- Returns:
- state movement
-
create
public static <I> StateMovement create(java.lang.Class<? extends WorkflowState<? extends I>> stateClass)
- Type Parameters:
I- Class type of the WorkflowState input- Parameters:
stateClass- required- Returns:
- state movement
-
create
public static <I> StateMovement create(java.lang.String stateId, I stateInput, WorkflowStateOptions stateOptionsOverride)
use the other one with WorkflowState class param if the stateId is provided by default, to make your code cleaner- Type Parameters:
I- Class type of the WorkflowState input- Parameters:
stateId- requiredstateInput- optional, can be nullstateOptionsOverride- optional, can be null. It is used to override the defined one in the State class- Returns:
- state movement
-
create
public static StateMovement create(java.lang.String stateId)
use the other one with WorkflowState class param if the stateId is provided by default, to make your code cleaner- Parameters:
stateId- stateId- Returns:
- state movement
-
-