Activiti源码学习:ExecutionListener与TaskListener的区别
Posted rgqancy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Activiti源码学习:ExecutionListener与TaskListener的区别相关的知识,希望对你有一定的参考价值。
/** Callback interface to be notified of execution events like starting a process instance, * ending an activity instance or taking a transition. * * @author Tom Baeyens * @author Joram Barrez */ public interface ExecutionListener extends Serializable { String EVENTNAME_START = "start"; String EVENTNAME_END = "end"; String EVENTNAME_TAKE = "take"; void notify(DelegateExecution execution) throws Exception; }
/** * @author Tom Baeyens */ public interface TaskListener extends Serializable { String EVENTNAME_CREATE = "create"; String EVENTNAME_ASSIGNMENT = "assignment"; String EVENTNAME_COMPLETE = "complete"; String EVENTNAME_DELETE = "delete"; /** * Not an actual event, used as a marker-value for {@link TaskListener}s that should be called for all events, * including {@link #EVENTNAME_CREATE}, {@link #EVENTNAME_ASSIGNMENT} and {@link #EVENTNAME_COMPLETE} and {@link #EVENTNAME_DELETE}. */ String EVENTNAME_ALL_EVENTS = "all"; void notify(DelegateTask delegateTask); }
针对的事件不同:start,end, take 与 create,assignment, complete, delete.
通知的代理不同:DelegateExecution 与 DelegateTask
以上是关于Activiti源码学习:ExecutionListener与TaskListener的区别的主要内容,如果未能解决你的问题,请参考以下文章
Activiti工作流框架学习——使用Activiti提供的API完成流程操作
Activiti源码:StandaloneInMemProcessEngineConfiguration与SpringProcessEngineConfiguration