public abstract class MultiInstanceActivityBehavior extends AbstractBpmnActivityBehavior implements CompositeActivityBehavior, ModificationObserverBehavior
AbstractBpmnActivityBehavior.ErrorDeclarationForProcessInstanceFinder, AbstractBpmnActivityBehavior.ErrorPropagationException
Modifier and Type | Field and Description |
---|---|
protected String |
collectionElementVariable |
protected Expression |
collectionExpression |
protected String |
collectionVariable |
protected Expression |
completionConditionExpression |
protected static BpmnBehaviorLogger |
LOG |
static String |
LOOP_COUNTER |
protected Expression |
loopCardinalityExpression |
static String |
NUMBER_OF_ACTIVE_INSTANCES |
static String |
NUMBER_OF_COMPLETED_INSTANCES |
static String |
NUMBER_OF_INSTANCES |
bpmnActivityBehavior
Constructor and Description |
---|
MultiInstanceActivityBehavior() |
Modifier and Type | Method and Description |
---|---|
protected 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 regular
FlowNodeActivityBehavior.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.
|
String |
getCollectionElementVariable() |
Expression |
getCollectionExpression() |
String |
getCollectionVariable() |
Expression |
getCompletionConditionExpression() |
protected Object |
getElementAtIndex(int i,
Collection<?> collection) |
ActivityImpl |
getInnerActivity(PvmActivity miBodyActivity)
Get the inner activity of the multi instance execution.
|
protected Integer |
getLocalLoopVariable(ActivityExecution execution,
String variableName) |
Expression |
getLoopCardinalityExpression() |
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 |
usesCollection() |
checkIfCauseOfExceptionIsBpmnError, createCompensateEventSubscription, executeWithErrorPropagation, isCompensationEventSubprocess, isProcessEngineExceptionWithoutCause, isTransactionNotActive, propagateBpmnError, propagateError, propagateException, propagateExceptionAsError, signal, signalCompensationDone
leave, leaveIgnoreConditions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
complete, concurrentChildExecutionEnded
createInnerInstance, destroyInnerInstance, initializeScope
protected static final BpmnBehaviorLogger LOG
public static final String NUMBER_OF_INSTANCES
public static final String NUMBER_OF_ACTIVE_INSTANCES
public static final String NUMBER_OF_COMPLETED_INSTANCES
public static final String LOOP_COUNTER
protected Expression loopCardinalityExpression
protected Expression completionConditionExpression
protected Expression collectionExpression
protected String collectionVariable
protected String collectionElementVariable
public void execute(ActivityExecution execution) throws Exception
FlowNodeActivityBehavior
execute
in interface CoreActivityBehavior<ActivityExecution>
execute
in interface ActivityBehavior
execute
in class FlowNodeActivityBehavior
Exception
protected void performInstance(ActivityExecution execution, PvmActivity activity, int loopCounter)
protected void evaluateCollectionVariable(ActivityExecution execution, int loopCounter)
protected abstract void createInstances(ActivityExecution execution, int nrOfInstances) throws Exception
Exception
protected int resolveNrOfInstances(ActivityExecution execution)
protected Object getElementAtIndex(int i, Collection<?> collection)
protected boolean usesCollection()
protected int resolveLoopCardinality(ActivityExecution execution)
protected boolean completionConditionSatisfied(ActivityExecution execution)
public void doLeave(ActivityExecution execution)
AbstractBpmnActivityBehavior
FlowNodeActivityBehavior.leave(ActivityExecution)
is
called.doLeave
in class AbstractBpmnActivityBehavior
public ActivityImpl getInnerActivity(PvmActivity miBodyActivity)
execution
- of multi instance activityprotected void setLoopVariable(ActivityExecution execution, String variableName, Object value)
protected Integer getLoopVariable(ActivityExecution execution, String variableName)
protected Integer getLocalLoopVariable(ActivityExecution execution, String variableName)
public boolean hasLoopVariable(ActivityExecution execution, String variableName)
public void removeLoopVariable(ActivityExecution execution, String variableName)
public Expression getLoopCardinalityExpression()
public void setLoopCardinalityExpression(Expression loopCardinalityExpression)
public Expression getCompletionConditionExpression()
public void setCompletionConditionExpression(Expression completionConditionExpression)
public Expression getCollectionExpression()
public void setCollectionExpression(Expression collectionExpression)
public String getCollectionVariable()
public void setCollectionVariable(String collectionVariable)
public String getCollectionElementVariable()
public void setCollectionElementVariable(String collectionElementVariable)
Copyright © 2017. All rights reserved.