activiti核心引擎

org.activiti.engine.impl.persistence.entity.ExecutionEntity  核心的方法

public void take(PvmTransition transition)  执行跳转转换的方法

public void executeActivity(PvmActivity activity)  执行activity的方法

public void performOperation(AtomicOperation executionOperation)  

protected void performOperationSync(AtomicOperation executionOperation)

public void start()

执行构成一个责任链模式,依次调用

 AtomicOperation PROCESS_START = new AtomicOperationProcessStart();
  AtomicOperation PROCESS_START_INITIAL = new AtomicOperationProcessStartInitial();
  AtomicOperation PROCESS_END = new AtomicOperationProcessEnd();
  AtomicOperation ACTIVITY_START = new AtomicOperationActivityStart();
  AtomicOperation ACTIVITY_EXECUTE = new AtomicOperationActivityExecute();
  AtomicOperation ACTIVITY_END = new AtomicOperationActivityEnd();
  AtomicOperation TRANSITION_NOTIFY_LISTENER_END = new AtomicOperationTransitionNotifyListenerEnd();
  AtomicOperation TRANSITION_DESTROY_SCOPE = new AtomicOperationTransitionDestroyScope();
  AtomicOperation TRANSITION_NOTIFY_LISTENER_TAKE = new AtomicOperationTransitionNotifyListenerTake();
  AtomicOperation TRANSITION_CREATE_SCOPE = new AtomicOperationTransitionCreateScope();
  AtomicOperation TRANSITION_NOTIFY_LISTENER_START = new AtomicOperationTransitionNotifyListenerStart();


  AtomicOperation DELETE_CASCADE = new AtomicOperationDeleteCascade();
  AtomicOperation DELETE_CASCADE_FIRE_ACTIVITY_END = new AtomicOperationDeleteCascadeFireActivityEnd();



org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior  的public void performDefaultOutgoingBehavior(ActivityExecution activityExceution) 方法



startProcess的方法

1.AtomicOperation.PROCESS_START的execute()方法

2.AtomicOperation PROCESS_START_INITIAL = new AtomicOperationProcessStartInitial()的execute()方法

3.如果有activity,则AtomicOperation ACTIVITY_EXECUTE = new AtomicOperationActivityExecute();

执行activity

4.org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute中的execute()方法.找到ActivityBehavior,执行execute()方法




executeActivity(PvmActivity activity) 

1.AtomicOperation.ACTIVITY_START的execute()方法

2.AtomicOperation.ACTIVITY_EXECUTE的execute()方法


调用AtomicOperation的execute()实现责任链模式






你可能感兴趣的:(activiti核心引擎)