//同步器节点的监听器触发条件,是在离开这个节点的时候
if (e.getEventType() == NodeInstanceEvent.NODEINSTANCE_LEAVING) {
ISynchronizerInstance syncInst = (ISynchronizerInstance) e.getSource();
IPersistenceService persistenceService = this.rtCtx.getPersistenceService();
//删除同步器节点的token
persistenceService.deleteTokensForNode(e.getToken().getProcessInstanceId(), syncInst.getSynchronizer().getId());
}
//如果节点实例结束,就触发
if (e.getEventType() == NodeInstanceEvent.NODEINSTANCE_COMPLETED) {
// 执行ProcessInstance的complete操作