Class MultiInstanceActivityBehavior
java.lang.Object
org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior
- All Implemented Interfaces:
CoreActivityBehavior<ActivityExecution>
,ActivityBehavior
,CompositeActivityBehavior
,ModificationObserverBehavior
,SignallableActivityBehavior
- Direct Known Subclasses:
ParallelMultiInstanceActivityBehavior
,SequentialMultiInstanceActivityBehavior
public abstract class MultiInstanceActivityBehavior
extends AbstractBpmnActivityBehavior
implements CompositeActivityBehavior, ModificationObserverBehavior
Abstract Multi Instance Behavior: used for both parallel and sequential
multi instance implementation.
- Author:
- Daniel Meyer, Thorben Lindhauer
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected Expression
protected String
protected Expression
protected static final BpmnBehaviorLogger
static final String
protected Expression
static final String
static final String
static final String
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
bpmnActivityBehavior
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
completionConditionSatisfied
(ActivityExecution execution) protected abstract void
createInstances
(ActivityExecution execution, int nrOfInstances) void
doLeave
(ActivityExecution execution) Subclasses that call leave() will first pass through this method, before the regularFlowNodeActivityBehavior.leave(ActivityExecution)
is called.protected void
evaluateCollectionVariable
(ActivityExecution execution, int loopCounter) void
execute
(ActivityExecution execution) Default behaviour: just leave the activity with no extra functionality.protected Object
getElementAtIndex
(int i, Collection<?> collection) getInnerActivity
(PvmActivity miBodyActivity) Get the inner activity of the multi instance execution.protected Integer
getLocalLoopVariable
(ActivityExecution execution, String variableName) protected Integer
getLoopVariable
(ActivityExecution execution, String variableName) boolean
hasLoopVariable
(ActivityExecution execution, String variableName) protected void
performInstance
(ActivityExecution execution, PvmActivity activity, int loopCounter) void
removeLoopVariable
(ActivityExecution execution, String variableName) protected int
resolveLoopCardinality
(ActivityExecution execution) protected int
resolveNrOfInstances
(ActivityExecution execution) void
setCollectionElementVariable
(String collectionElementVariable) void
setCollectionExpression
(Expression collectionExpression) void
setCollectionVariable
(String collectionVariable) void
setCompletionConditionExpression
(Expression completionConditionExpression) void
setLoopCardinalityExpression
(Expression loopCardinalityExpression) protected void
setLoopVariable
(ActivityExecution execution, String variableName, Object value) protected boolean
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
createCompensateEventSubscription, executeWithErrorPropagation, isCompensationEventSubprocess, signal, signalCompensationDone
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
leave, leaveIgnoreConditions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.delegate.CompositeActivityBehavior
complete, concurrentChildExecutionEnded
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.delegate.ModificationObserverBehavior
createInnerInstance, destroyInnerInstance, initializeScope
-
Field Details
-
LOG
-
NUMBER_OF_INSTANCES
- See Also:
-
NUMBER_OF_ACTIVE_INSTANCES
- See Also:
-
NUMBER_OF_COMPLETED_INSTANCES
- See Also:
-
LOOP_COUNTER
- See Also:
-
loopCardinalityExpression
-
completionConditionExpression
-
collectionExpression
-
collectionVariable
-
collectionElementVariable
-
-
Constructor Details
-
MultiInstanceActivityBehavior
public MultiInstanceActivityBehavior()
-
-
Method Details
-
execute
Description copied from class:FlowNodeActivityBehavior
Default behaviour: just leave the activity with no extra functionality.- Specified by:
execute
in interfaceActivityBehavior
- Specified by:
execute
in interfaceCoreActivityBehavior<ActivityExecution>
- Overrides:
execute
in classFlowNodeActivityBehavior
- Throws:
Exception
-
performInstance
-
evaluateCollectionVariable
-
createInstances
protected abstract void createInstances(ActivityExecution execution, int nrOfInstances) throws Exception - Throws:
Exception
-
resolveNrOfInstances
-
getElementAtIndex
-
usesCollection
protected boolean usesCollection() -
resolveLoopCardinality
-
completionConditionSatisfied
-
doLeave
Description copied from class:AbstractBpmnActivityBehavior
Subclasses that call leave() will first pass through this method, before the regularFlowNodeActivityBehavior.leave(ActivityExecution)
is called.- Overrides:
doLeave
in classAbstractBpmnActivityBehavior
-
getInnerActivity
Get the inner activity of the multi instance execution.- Parameters:
execution
- of multi instance activity- Returns:
- inner activity
-
setLoopVariable
-
getLoopVariable
-
getLocalLoopVariable
-
hasLoopVariable
-
removeLoopVariable
-
getLoopCardinalityExpression
-
setLoopCardinalityExpression
-
getCompletionConditionExpression
-
setCompletionConditionExpression
-
getCollectionExpression
-
setCollectionExpression
-
getCollectionVariable
-
setCollectionVariable
-
getCollectionElementVariable
-
setCollectionElementVariable
-