Class ParallelGatewayActivityBehavior
java.lang.Object
org.flowable.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
org.flowable.engine.impl.bpmn.behavior.GatewayActivityBehavior
org.flowable.engine.impl.bpmn.behavior.ParallelGatewayActivityBehavior
- All Implemented Interfaces:
Serializable,ActivityBehavior,TriggerableActivityBehavior
Implementation of the Parallel Gateway/AND gateway as defined in the BPMN 2.0 specification.
The Parallel Gateway can be used for splitting a path of execution into multiple paths of executions (AND-split/fork behavior), one for every outgoing sequence flow.
The Parallel Gateway can also be used for merging or joining paths of execution (AND-join). In this case, on every incoming sequence flow an execution needs to arrive, before leaving the Parallel
Gateway (and potentially then doing the fork behavior in case of multiple outgoing sequence flow).
Note that there is a slight difference to spec (p. 436): "The parallel gateway is activated if there is at least one Token on each incoming sequence flow." We only check the number of incoming
tokens to the number of sequenceflow. So if two tokens would arrive through the same sequence flow, our implementation would activate the gateway.
Note that a Parallel Gateway having one incoming and multiple outgoing sequence flow, is the same as having multiple outgoing sequence flow on a given activity. However, a parallel gateway does NOT
check conditions on the outgoing sequence flow.
- Author:
- Joram Barrez, Tom Baeyens
- See Also:
-
Field Summary
Fields inherited from class org.flowable.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
bpmnActivityBehavior -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<ExecutionEntity>cleanJoinedExecutions(Collection<ExecutionEntity> joinedExecutions, DelegateExecution multiInstanceExecution) voidexecute(DelegateExecution execution) Default behaviour: just leave the activity with no extra functionality.protected DelegateExecutionprotected booleanhasMultiInstanceParent(FlowNode flowNode) protected booleanisChildOfMultiInstanceExecution(DelegateExecution executionEntity, DelegateExecution multiInstanceExecution) Methods inherited from class org.flowable.engine.impl.bpmn.behavior.GatewayActivityBehavior
lockFirstParentScopeMethods inherited from class org.flowable.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
leave, leaveIgnoreConditions, parseActivityType, trigger
-
Constructor Details
-
ParallelGatewayActivityBehavior
public ParallelGatewayActivityBehavior()
-
-
Method Details
-
execute
Description copied from class:FlowNodeActivityBehaviorDefault behaviour: just leave the activity with no extra functionality.- Specified by:
executein interfaceActivityBehavior- Overrides:
executein classFlowNodeActivityBehavior
-
cleanJoinedExecutions
protected Collection<ExecutionEntity> cleanJoinedExecutions(Collection<ExecutionEntity> joinedExecutions, DelegateExecution multiInstanceExecution) -
isChildOfMultiInstanceExecution
protected boolean isChildOfMultiInstanceExecution(DelegateExecution executionEntity, DelegateExecution multiInstanceExecution) -
hasMultiInstanceParent
-
findMultiInstanceParentExecution
-