org.camunda.bpm.engine.impl.bpmn.behavior
Class ParallelMultiInstanceActivityBehavior

java.lang.Object
  extended by org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
      extended by org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
          extended by org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior
              extended by org.camunda.bpm.engine.impl.bpmn.behavior.ParallelMultiInstanceActivityBehavior
All Implemented Interfaces:
CoreActivityBehavior<ActivityExecution>, ActivityBehavior, CompositeActivityBehavior, MigrationObserverBehavior, ModificationObserverBehavior, SignallableActivityBehavior

public class ParallelMultiInstanceActivityBehavior
extends MultiInstanceActivityBehavior
implements MigrationObserverBehavior

Author:
Daniel Meyer

Nested Class Summary
 
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
AbstractBpmnActivityBehavior.ErrorDeclarationForProcessInstanceFinder, AbstractBpmnActivityBehavior.ErrorPropagationException
 
Field Summary
 
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior
collectionElementVariable, collectionExpression, collectionVariable, completionConditionExpression, LOG, LOOP_COUNTER, loopCardinalityExpression, NUMBER_OF_ACTIVE_INSTANCES, NUMBER_OF_COMPLETED_INSTANCES, NUMBER_OF_INSTANCES
 
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
bpmnActivityBehavior
 
Constructor Summary
ParallelMultiInstanceActivityBehavior()
           
 
Method Summary
protected  boolean allExecutionsEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution)
           
 void complete(ActivityExecution scopeExecution)
           
 void concurrentChildExecutionEnded(ActivityExecution scopeExecution, ActivityExecution endedExecution)
          Invoked when an execution is ended within the scope of the composite
protected  ActivityExecution createConcurrentExecution(ActivityExecution scopeExecution)
           
 ActivityExecution createInnerInstance(ActivityExecution scopeExecution)
          Returns an execution that can be used to execute an activity within that scope.
protected  void createInstances(ActivityExecution execution, int nrOfInstances)
           
 void destroyInnerInstance(ActivityExecution concurrentExecution)
          implement to destroy an execution in this scope and handle the scope's reorganization (e.g.
 List<ActivityExecution> initializeScope(ActivityExecution scopeExecution, int numberOfInstances)
          Implement to customize initialization of the scope.
 void migrateScope(ActivityExecution scopeExecution)
          Implement to perform activity-specific migration behavior that is not covered by the regular migration procedure.
 void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance)
          Callback to implement behavior specific parsing (e.g.
protected  void prepareScopeExecution(ActivityExecution scopeExecution, int nrOfInstances)
           
 
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior
completionConditionSatisfied, evaluateCollectionVariable, execute, getCollectionElementVariable, getCollectionExpression, getCollectionVariable, getCompletionConditionExpression, getElementAtIndex, getInnerActivity, getLocalLoopVariable, getLoopCardinalityExpression, getLoopVariable, hasLoopVariable, leave, performInstance, removeLoopVariable, resolveLoopCardinality, resolveNrOfInstances, setCollectionElementVariable, setCollectionExpression, setCollectionVariable, setCompletionConditionExpression, setLoopCardinalityExpression, setLoopVariable, usesCollection
 
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
checkIfCauseOfExceptionIsBpmnError, createCompensateEventSubscription, executeWithErrorPropagation, isCompensationEventSubprocess, isProcessEngineExceptionWithoutCause, isTransactionNotActive, propagateBpmnError, propagateError, propagateException, propagateExceptionAsError, signal, signalCompensationDone
 
Methods inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
leaveIgnoreConditions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelMultiInstanceActivityBehavior

public ParallelMultiInstanceActivityBehavior()
Method Detail

createInstances

protected void createInstances(ActivityExecution execution,
                               int nrOfInstances)
                        throws Exception
Specified by:
createInstances in class MultiInstanceActivityBehavior
Throws:
Exception

prepareScopeExecution

protected void prepareScopeExecution(ActivityExecution scopeExecution,
                                     int nrOfInstances)

createConcurrentExecution

protected ActivityExecution createConcurrentExecution(ActivityExecution scopeExecution)

concurrentChildExecutionEnded

public void concurrentChildExecutionEnded(ActivityExecution scopeExecution,
                                          ActivityExecution endedExecution)
Description copied from interface: CompositeActivityBehavior
Invoked when an execution is ended within the scope of the composite

Specified by:
concurrentChildExecutionEnded in interface CompositeActivityBehavior
Parameters:
scopeExecution - scope execution for the activity which defined the behavior
endedExecution - the execution which ended

allExecutionsEnded

protected boolean allExecutionsEnded(ActivityExecution scopeExecution,
                                     ActivityExecution endedExecution)

complete

public void complete(ActivityExecution scopeExecution)
Specified by:
complete in interface CompositeActivityBehavior

initializeScope

public List<ActivityExecution> initializeScope(ActivityExecution scopeExecution,
                                               int numberOfInstances)
Description copied from interface: ModificationObserverBehavior
Implement to customize initialization of the scope. Called with the scope execution already created. Implementations may set variables, etc. Implementations should provide return as many executions as there are requested by the argument. Valid number of instances are >= 0.

Specified by:
initializeScope in interface ModificationObserverBehavior

createInnerInstance

public ActivityExecution createInnerInstance(ActivityExecution scopeExecution)
Description copied from interface: ModificationObserverBehavior
Returns an execution that can be used to execute an activity within that scope. May reorganize other executions in that scope (e.g. implement to override the default pruning behavior).

Specified by:
createInnerInstance in interface ModificationObserverBehavior

destroyInnerInstance

public void destroyInnerInstance(ActivityExecution concurrentExecution)
Description copied from interface: ModificationObserverBehavior
implement to destroy an execution in this scope and handle the scope's reorganization (e.g. implement to override the default pruning behavior). The argument execution is not yet removed.

Specified by:
destroyInnerInstance in interface ModificationObserverBehavior

migrateScope

public void migrateScope(ActivityExecution scopeExecution)
Description copied from interface: MigrationObserverBehavior
Implement to perform activity-specific migration behavior that is not covered by the regular migration procedure. Called after the scope execution and any ancestor executions have been migrated to their target activities and process definition.

Specified by:
migrateScope in interface MigrationObserverBehavior

onParseMigratingInstance

public void onParseMigratingInstance(MigratingInstanceParseContext parseContext,
                                     MigratingActivityInstance migratingInstance)
Description copied from interface: MigrationObserverBehavior
Callback to implement behavior specific parsing (e.g. adding additional dependent entities).

Specified by:
onParseMigratingInstance in interface MigrationObserverBehavior


Copyright © 2016 camunda services GmbH. All rights reserved.