Package org.bonitasoft.engine.execution
Class FlowNodeExecutorImpl
java.lang.Object
org.bonitasoft.engine.execution.FlowNodeExecutorImpl
- All Implemented Interfaces:
ContainerExecutor,FlowNodeExecutor
@Component("flowNodeExecutor")
public class FlowNodeExecutorImpl
extends Object
implements FlowNodeExecutor
- Author:
- Baptiste Mesta, Yanyan Liu, Elias Ricken de Medeiros, Emmanuel Duchastenier, Celine Souchet, Matthieu Chaffotte
-
Constructor Summary
ConstructorsConstructorDescriptionFlowNodeExecutorImpl(FlowNodeStateManager flowNodeStateManager, ActivityInstanceService activityInstanceManager, ContainerRegistry containerRegistry, ProcessDefinitionService processDefinitionService, SCommentService commentService, ClassLoaderService classLoaderService, WorkService workService, BPMWorkFactory workFactory, ProcessInstanceInterruptor processInstanceInterruptor, BPMArchiverService bpmArchiverService) -
Method Summary
Modifier and TypeMethodDescriptionvoidchildFinished(long processDefinitionId, long parentId, SFlowNodeInstance childFlowNode) Method called to notify this container executor that a child reached the given statevoidchildReachedState(SProcessInstance childProcInst, org.bonitasoft.engine.bpm.process.ProcessInstanceState childState, boolean hasActionsToExecute) executeFlowNode(SFlowNodeInstance flowNodeInstance, Long executerId, Long executerSubstituteId) Execute a flow node in the context of this container executorexecuteState(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance, FlowNodeState state) voidsetStateByStateId(long flowNodeInstanceId, int stateId) force the state of a flow node toa particular statestepForward(SFlowNodeInstance flowNodeInstance, Long executerId, Long executerSubstituteId)
-
Constructor Details
-
FlowNodeExecutorImpl
public FlowNodeExecutorImpl(FlowNodeStateManager flowNodeStateManager, ActivityInstanceService activityInstanceManager, ContainerRegistry containerRegistry, ProcessDefinitionService processDefinitionService, SCommentService commentService, ClassLoaderService classLoaderService, WorkService workService, BPMWorkFactory workFactory, ProcessInstanceInterruptor processInstanceInterruptor, BPMArchiverService bpmArchiverService)
-
-
Method Details
-
executeState
public StateCode executeState(SProcessDefinition processDefinition, SFlowNodeInstance flowNodeInstance, FlowNodeState state) throws SActivityStateExecutionException, SActivityExecutionException - Specified by:
executeStatein interfaceFlowNodeExecutor- Parameters:
processDefinition- the process definition of the SFlowNodeInstance on which to execute the state.flowNodeInstance- theSFlowNodeInstancewhose state has to be executedstate- theFlowNodeStateto execute- Returns:
- the next
FlowNodeState, after executing current state - Throws:
SActivityStateExecutionException- if an exception occurs when executing current stateSActivityExecutionException- if an exception occurs when retrieving next state
-
stepForward
public FlowNodeState stepForward(SFlowNodeInstance flowNodeInstance, Long executerId, Long executerSubstituteId) throws SFlowNodeExecutionException - Specified by:
stepForwardin interfaceFlowNodeExecutor- Returns:
- Throws:
SFlowNodeExecutionException
-
setStateByStateId
public void setStateByStateId(long flowNodeInstanceId, int stateId) throws SActivityStateExecutionException Description copied from interface:FlowNodeExecutorforce the state of a flow node toa particular state- Specified by:
setStateByStateIdin interfaceFlowNodeExecutor- Throws:
SActivityStateExecutionException
-
childFinished
public void childFinished(long processDefinitionId, long parentId, SFlowNodeInstance childFlowNode) throws SFlowNodeNotFoundException, SFlowNodeReadException, SProcessDefinitionNotFoundException, SBonitaReadException, SArchivingException, SFlowNodeModificationException, SFlowNodeExecutionException, SWorkRegisterException Description copied from interface:ContainerExecutorMethod called to notify this container executor that a child reached the given state- Specified by:
childFinishedin interfaceContainerExecutor- Parameters:
processDefinitionId- The identifier of the process definitionparentId- The identifier of the parent of the flow node- Throws:
SFlowNodeNotFoundExceptionSFlowNodeReadExceptionSProcessDefinitionNotFoundExceptionSBonitaReadExceptionSArchivingExceptionSFlowNodeModificationExceptionSFlowNodeExecutionExceptionSWorkRegisterException
-
childReachedState
public void childReachedState(SProcessInstance childProcInst, org.bonitasoft.engine.bpm.process.ProcessInstanceState childState, boolean hasActionsToExecute) throws SBonitaException - Specified by:
childReachedStatein interfaceFlowNodeExecutor- Throws:
SBonitaException
-
getHandledType
- Specified by:
getHandledTypein interfaceContainerExecutor- Returns:
- The handled type
-
executeFlowNode
public FlowNodeState executeFlowNode(SFlowNodeInstance flowNodeInstance, Long executerId, Long executerSubstituteId) throws SFlowNodeExecutionException Description copied from interface:ContainerExecutorExecute a flow node in the context of this container executor- Specified by:
executeFlowNodein interfaceContainerExecutor- Parameters:
flowNodeInstance- The flow node instanceexecuterId- The identifier of the user which execute the flow nodeexecuterSubstituteId- The identifier of the delegated user which execute the flow node- Returns:
- The new state of the flow node after execution
- Throws:
SFlowNodeExecutionException- Throw if there is an error when execute the flow node
-