org.activiti.engine.impl.bpmn.behavior
类 MultiInstanceActivityBehavior

java.lang.Object
  继承者 org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
      继承者 org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior
所有已实现的接口:
Serializable, ActivityBehavior, CompositeActivityBehavior, SignallableActivityBehavior, SubProcessActivityBehavior
直接已知子类:
ParallelMultiInstanceBehavior, SequentialMultiInstanceBehavior

public abstract class MultiInstanceActivityBehavior
extends FlowNodeActivityBehavior
implements CompositeActivityBehavior, SubProcessActivityBehavior

Implementation of the multi-instance functionality as described in the BPMN 2.0 spec. Multi instance functionality is implemented as an ActivityBehavior that wraps the original ActivityBehavior of the activity. Only subclasses of AbstractBpmnActivityBehavior can have multi-instance behavior. As such, special logic is contained in the AbstractBpmnActivityBehavior to delegate to the MultiInstanceActivityBehavior if needed.

作者:
Joram Barrez, Falko Menge
另请参见:
序列化表格

字段摘要
protected  ActivityImpl activity
           
protected  String collectionElementVariable
           
protected  Expression collectionExpression
           
protected  String collectionVariable
           
protected  Expression completionConditionExpression
           
protected  AbstractBpmnActivityBehavior innerActivityBehavior
           
protected static org.slf4j.Logger LOGGER
           
protected  String LOOP_COUNTER
           
protected  Expression loopCardinalityExpression
           
protected  String NUMBER_OF_ACTIVE_INSTANCES
           
protected  String NUMBER_OF_COMPLETED_INSTANCES
           
protected  String NUMBER_OF_INSTANCES
           
 
从类 org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior 继承的字段
bpmnActivityBehavior
 
构造方法摘要
MultiInstanceActivityBehavior(ActivityImpl activity, AbstractBpmnActivityBehavior innerActivityBehavior)
           
 
方法摘要
protected  void callActivityEndListeners(ActivityExecution execution)
          Since no transitions are followed when leaving the inner activity, it is needed to call the end listeners yourself.
 void completed(ActivityExecution execution)
          called after the process instance is destroyed for this activity to perform its outgoing control flow logic.
 void completing(DelegateExecution execution, DelegateExecution subProcessInstance)
          called before the process instance is destroyed to allow this activity to extract data from the sub process instance.
protected  boolean completionConditionSatisfied(ActivityExecution execution)
           
protected abstract  void createInstances(ActivityExecution execution)
           
 void execute(ActivityExecution execution)
          Default behaviour: just leave the activity with no extra functionality.
protected  void executeOriginalBehavior(ActivityExecution execution, int loopCounter)
           
 String getCollectionElementVariable()
           
 Expression getCollectionExpression()
           
 String getCollectionVariable()
           
 Expression getCompletionConditionExpression()
           
 AbstractBpmnActivityBehavior getInnerActivityBehavior()
           
protected  Integer getLocalLoopVariable(ActivityExecution execution, String variableName)
           
 Expression getLoopCardinalityExpression()
           
protected  Integer getLoopVariable(ActivityExecution execution, String variableName)
           
protected  boolean isExtraScopeNeeded()
           
 void lastExecutionEnded(ActivityExecution execution)
           
protected  void logLoopDetails(ActivityExecution execution, String custom, int loopCounter, int nrOfCompletedInstances, int nrOfActiveInstances, int nrOfInstances)
           
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 setInnerActivityBehavior(AbstractBpmnActivityBehavior innerActivityBehavior)
           
 void setLoopCardinalityExpression(Expression loopCardinalityExpression)
           
protected  void setLoopVariable(ActivityExecution execution, String variableName, Object value)
           
 void signal(ActivityExecution execution, String signalName, Object signalData)
           
protected  boolean usesCollection()
           
 
从类 org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior 继承的方法
leave, leaveIgnoreConditions
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

LOGGER

protected static final org.slf4j.Logger LOGGER

NUMBER_OF_INSTANCES

protected final String NUMBER_OF_INSTANCES
另请参见:
常量字段值

NUMBER_OF_ACTIVE_INSTANCES

protected final String NUMBER_OF_ACTIVE_INSTANCES
另请参见:
常量字段值

NUMBER_OF_COMPLETED_INSTANCES

protected final String NUMBER_OF_COMPLETED_INSTANCES
另请参见:
常量字段值

LOOP_COUNTER

protected final String LOOP_COUNTER
另请参见:
常量字段值

activity

protected ActivityImpl activity

innerActivityBehavior

protected AbstractBpmnActivityBehavior innerActivityBehavior

loopCardinalityExpression

protected Expression loopCardinalityExpression

completionConditionExpression

protected Expression completionConditionExpression

collectionExpression

protected Expression collectionExpression

collectionVariable

protected String collectionVariable

collectionElementVariable

protected String collectionElementVariable
构造方法详细信息

MultiInstanceActivityBehavior

public MultiInstanceActivityBehavior(ActivityImpl activity,
                                     AbstractBpmnActivityBehavior innerActivityBehavior)
参数:
innerActivityBehavior - The original ActivityBehavior of the activity that will be wrapped inside this behavior.
isSequential - Indicates whether the multi instance behavior must be sequential or parallel
方法详细信息

execute

public void execute(ActivityExecution execution)
             throws Exception
从类 FlowNodeActivityBehavior 复制的描述
Default behaviour: just leave the activity with no extra functionality.

指定者:
接口 ActivityBehavior 中的 execute
覆盖:
FlowNodeActivityBehavior 中的 execute
抛出:
Exception

createInstances

protected abstract void createInstances(ActivityExecution execution)
                                 throws Exception
抛出:
Exception

signal

public void signal(ActivityExecution execution,
                   String signalName,
                   Object signalData)
            throws Exception
指定者:
接口 SignallableActivityBehavior 中的 signal
覆盖:
FlowNodeActivityBehavior 中的 signal
抛出:
Exception

lastExecutionEnded

public void lastExecutionEnded(ActivityExecution execution)
指定者:
接口 CompositeActivityBehavior 中的 lastExecutionEnded

completing

public void completing(DelegateExecution execution,
                       DelegateExecution subProcessInstance)
                throws Exception
从接口 SubProcessActivityBehavior 复制的描述
called before the process instance is destroyed to allow this activity to extract data from the sub process instance. No control flow should be done on the execution yet.

指定者:
接口 SubProcessActivityBehavior 中的 completing
抛出:
Exception

completed

public void completed(ActivityExecution execution)
               throws Exception
从接口 SubProcessActivityBehavior 复制的描述
called after the process instance is destroyed for this activity to perform its outgoing control flow logic.

指定者:
接口 SubProcessActivityBehavior 中的 completed
抛出:
Exception

resolveNrOfInstances

protected int resolveNrOfInstances(ActivityExecution execution)

executeOriginalBehavior

protected void executeOriginalBehavior(ActivityExecution execution,
                                       int loopCounter)
                                throws Exception
抛出:
Exception

usesCollection

protected boolean usesCollection()

isExtraScopeNeeded

protected boolean isExtraScopeNeeded()

resolveLoopCardinality

protected int resolveLoopCardinality(ActivityExecution execution)

completionConditionSatisfied

protected boolean completionConditionSatisfied(ActivityExecution execution)

setLoopVariable

protected void setLoopVariable(ActivityExecution execution,
                               String variableName,
                               Object value)

getLoopVariable

protected Integer getLoopVariable(ActivityExecution execution,
                                  String variableName)

getLocalLoopVariable

protected Integer getLocalLoopVariable(ActivityExecution execution,
                                       String variableName)

callActivityEndListeners

protected void callActivityEndListeners(ActivityExecution execution)
Since no transitions are followed when leaving the inner activity, it is needed to call the end listeners yourself.


logLoopDetails

protected void logLoopDetails(ActivityExecution execution,
                              String custom,
                              int loopCounter,
                              int nrOfCompletedInstances,
                              int nrOfActiveInstances,
                              int nrOfInstances)

getLoopCardinalityExpression

public Expression getLoopCardinalityExpression()

setLoopCardinalityExpression

public void setLoopCardinalityExpression(Expression loopCardinalityExpression)

getCompletionConditionExpression

public Expression getCompletionConditionExpression()

setCompletionConditionExpression

public void setCompletionConditionExpression(Expression completionConditionExpression)

getCollectionExpression

public Expression getCollectionExpression()

setCollectionExpression

public void setCollectionExpression(Expression collectionExpression)

getCollectionVariable

public String getCollectionVariable()

setCollectionVariable

public void setCollectionVariable(String collectionVariable)

getCollectionElementVariable

public String getCollectionElementVariable()

setCollectionElementVariable

public void setCollectionElementVariable(String collectionElementVariable)

setInnerActivityBehavior

public void setInnerActivityBehavior(AbstractBpmnActivityBehavior innerActivityBehavior)

getInnerActivityBehavior

public AbstractBpmnActivityBehavior getInnerActivityBehavior()


Copyright © 2013 Alfresco. All rights reserved.