Class InitializingMultiInstanceActivityState
- java.lang.Object
-
- org.bonitasoft.engine.execution.state.InitializingMultiInstanceActivityState
-
- All Implemented Interfaces:
FlowNodeState
@Component public class InitializingMultiInstanceActivityState extends java.lang.Object implements FlowNodeState
-
-
Field Summary
-
Fields inherited from interface org.bonitasoft.engine.core.process.instance.api.states.FlowNodeState
ID_ACTIVITY_EXECUTING, ID_ACTIVITY_FAILED, ID_ACTIVITY_READY
-
-
Constructor Summary
Constructors Constructor Description InitializingMultiInstanceActivityState(ExpressionResolverService expressionResolverService, ActivityInstanceService activityInstanceService, StateBehaviors stateBehaviors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StateCodeexecute(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance)intgetId()java.lang.StringgetName()SStateCategorygetStateCategory()Get the state's categoryjava.lang.StringgetSystemComment(SFlowNodeInstance flowNodeInstance)Add a system comment "User XYZ has XYZ(state change) task XYZ(task name)"booleanisStable()booleanisTerminal()Checks whether the state is a terminal one.booleanmustAddSystemComment(SFlowNodeInstance flowNodeInstance)Return true if flowNodeInstance instance of SHumanTaskInstancebooleannotifyChildFlowNodeHasFinished(SProcessDefinition processDefinition, SFlowNodeInstance parentInstance, SFlowNodeInstance childInstance)Called when a child of the flow node parentInstance finishes.booleanshouldExecuteState(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance)
-
-
-
Constructor Detail
-
InitializingMultiInstanceActivityState
public InitializingMultiInstanceActivityState(ExpressionResolverService expressionResolverService, ActivityInstanceService activityInstanceService, StateBehaviors stateBehaviors)
-
-
Method Detail
-
execute
public StateCode execute(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance) throws SActivityStateExecutionException
- Specified by:
executein interfaceFlowNodeState- Throws:
SActivityStateExecutionException
-
getId
public int getId()
- Specified by:
getIdin interfaceFlowNodeState
-
isStable
public boolean isStable()
- Specified by:
isStablein interfaceFlowNodeState- Returns:
- true if the state is stable a final state is stable
-
isTerminal
public boolean isTerminal()
Description copied from interface:FlowNodeStateChecks whether the state is a terminal one.- Specified by:
isTerminalin interfaceFlowNodeState- Returns:
- true is the state is a terminal one; false otherwise
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceFlowNodeState
-
notifyChildFlowNodeHasFinished
public boolean notifyChildFlowNodeHasFinished(SProcessDefinition processDefinition, SFlowNodeInstance parentInstance, SFlowNodeInstance childInstance)
Description copied from interface:FlowNodeStateCalled when a child of the flow node parentInstance finishes. Triggers what's next, if applicable. returns if all children activity is finished / triggered.- Specified by:
notifyChildFlowNodeHasFinishedin interfaceFlowNodeState- 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.
-
shouldExecuteState
public boolean shouldExecuteState(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance)
- Specified by:
shouldExecuteStatein interfaceFlowNodeState- Returns:
- true the state must be executed, false if the execution must skip this state and go directly to the next one
-
getStateCategory
public SStateCategory getStateCategory()
Description copied from interface:FlowNodeStateGet the state's category- Specified by:
getStateCategoryin interfaceFlowNodeState- Returns:
- the state's category
-
mustAddSystemComment
public boolean mustAddSystemComment(SFlowNodeInstance flowNodeInstance)
Description copied from interface:FlowNodeStateReturn true if flowNodeInstance instance of SHumanTaskInstance- Specified by:
mustAddSystemCommentin interfaceFlowNodeState- Returns:
- true or false
-
getSystemComment
public java.lang.String getSystemComment(SFlowNodeInstance flowNodeInstance)
Description copied from interface:FlowNodeStateAdd a system comment "User XYZ has XYZ(state change) task XYZ(task name)"- Specified by:
getSystemCommentin interfaceFlowNodeState- Returns:
- system comment "User XYZ has XYZ(state change) task XYZ(task name)"
-
-