码迷,mamicode.com
首页 > 其他好文 > 详细

Activiti源码学习:ExecutionListener与TaskListener的区别

时间:2017-12-04 11:46:16      阅读:2883      评论:0      收藏:0      [点我收藏+]

标签:sig   sign   listener   ext   like   区别   event   cut   sed   

/** 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的区别

标签:sig   sign   listener   ext   like   区别   event   cut   sed   

原文地址:http://www.cnblogs.com/rgqancy/p/7976015.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!