Interface FlowNodeState
- All Known Implementing Classes:
AbortedFlowNodeState,AbortingActivityWithBoundaryState,AbortingBoundaryAndIntermediateCatchEventState,AbortingBoundaryEventsOnCompletingActivityState,AbortingCallActivityState,AbortingFlowNodeContainerState,AbortingFlowNodeState,AbortingReceiveTaskState,AbortingSubTaskState,CancelledFlowNodeState,CancellingActivityWithBoundaryState,CancellingBoundaryAndIntermediateCatchEventState,CancellingCallActivityState,CancellingFlowNodeContainerChildrenState,CancellingFlowNodeState,CancellingReceiveTaskState,CompletedActivityState,CompletingActivityState,CompletingCallActivityState,EndingCallActivityExceptionState,EndingFlowNodeContainerExceptionState,ExecutingAutomaticActivityState,ExecutingBoundaryEventState,ExecutingCallActivityState,ExecutingFlowNodeState,ExecutingLoopActivityState,ExecutingMultiInstanceActivityState,ExecutingThrowEventState,FailedActivityState,InitializingActivityState,InitializingActivityWithBoundaryEventsState,InitializingAndExecutingFlowNodeState,InitializingBoundaryEventState,InitializingLoopActivityState,InitializingMultiInstanceActivityState,InterruptingBoundaryAndIntermediateCatchEventState,OnEnterAndFinishConnectorState,OnEnterConnectorState,OnEnterOrOnFinishConnectorState,OnFinishConnectorState,ReadyActivityState,SkippedFlowNodeState,WaitingFlowNodeState
public interface FlowNodeState
- Author:
- Baptiste Mesta, Matthieu Chaffotte
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionexecute(SProcessDefinition processDefinition, SFlowNodeInstance instance) intgetId()getName()Get the state's categorygetSystemComment(SFlowNodeInstance flowNodeInstance) Add a system comment "User XYZ has XYZ(state change) task XYZ(task name)"booleanisStable()booleanChecks whether the state is a terminal one.booleanmustAddSystemComment(SFlowNodeInstance flowNodeInstance) Return true if flowNodeInstance instance of SHumanTaskInstancedefault booleannotifyChildFlowNodeHasFinished(SProcessDefinition processDefinition, SFlowNodeInstance parentInstance, SFlowNodeInstance childInstance) Called when a child of the flow node parentInstance finishes.booleanshouldExecuteState(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance)
-
Field Details
-
ID_ACTIVITY_EXECUTING
static final int ID_ACTIVITY_EXECUTING- See Also:
-
ID_ACTIVITY_READY
static final int ID_ACTIVITY_READY- See Also:
-
ID_ACTIVITY_FAILED
static final int ID_ACTIVITY_FAILED- See Also:
-
-
Method Details
-
getId
int getId() -
shouldExecuteState
boolean shouldExecuteState(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance) throws SActivityExecutionException - Parameters:
processDefinition-flowNodeInstance-- Returns:
- true the state must be executed, false if the execution must skip this state and go directly to the next one
- Throws:
SActivityExecutionException
-
mustAddSystemComment
Return true if flowNodeInstance instance of SHumanTaskInstance- Parameters:
flowNodeInstance-- Returns:
- true or false
- Since:
- 6.0
-
getSystemComment
Add a system comment "User XYZ has XYZ(state change) task XYZ(task name)"- Parameters:
flowNodeInstance-- Returns:
- system comment "User XYZ has XYZ(state change) task XYZ(task name)"
- Since:
- 6.0
-
execute
StateCode execute(SProcessDefinition processDefinition, SFlowNodeInstance instance) throws SActivityStateExecutionException - Throws:
SActivityStateExecutionException
-
notifyChildFlowNodeHasFinished
default boolean notifyChildFlowNodeHasFinished(SProcessDefinition processDefinition, SFlowNodeInstance parentInstance, SFlowNodeInstance childInstance) throws SActivityStateExecutionException Called when a child of the flow node parentInstance finishes. Triggers what's next, if applicable. returns if all children activity is finished / triggered.- Returns:
- true if the state is finished (the flow node will continue its flow), false if there are still some children to be triggered / to wait for.
- Throws:
SActivityStateExecutionException
-
getName
String getName() -
isStable
boolean isStable()- Returns:
- true if the state is stable a final state is stable
-
isTerminal
boolean isTerminal()Checks whether the state is a terminal one.- Returns:
- true is the state is a terminal one; false otherwise
-
getStateCategory
SStateCategory getStateCategory()Get the state's category- Returns:
- the state's category
-