/// <summary>节点实例监听器</summary> public virtual void onNodeInstanceEventFired(NodeInstanceEvent e) { //同步器节点的监听器触发条件,是在离开这个节点的时候 if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_LEAVING) { ISynchronizerInstance syncInst = (ISynchronizerInstance)e.getSource(); IPersistenceService persistenceService = this.RuntimeContext.PersistenceService; //删除同步器节点的token persistenceService.DeleteTokensForNode(e.Token.ProcessInstanceId, syncInst.Synchronizer.Id); } }
/// <summary>节点实例监听器</summary> public virtual void onNodeInstanceEventFired(NodeInstanceEvent e) { //同步器节点的监听器触发条件,是在离开这个节点的时候 if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_LEAVING) { ISynchronizerInstance syncInst = (ISynchronizerInstance)e.getSource(); IPersistenceService persistenceService = this.RuntimeContext.PersistenceService; //删除同步器节点的token persistenceService.DeleteTokensForNode(e.Token.ProcessInstanceId, syncInst.Synchronizer.Id); } }
/// <summary>节点实例监听器</summary> public void onNodeInstanceEventFired(NodeInstanceEvent e) { // TODO Auto-generated method stub if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_FIRED) { //保存token,并创建taskinstance IPersistenceService persistenceService = this.RuntimeContext.PersistenceService; //TODO wmj2003 这里是插入还是更新token persistenceService.SaveOrUpdateToken(e.Token); //触发activity节点,就要创建新的task this.RuntimeContext.TaskInstanceManager.createTaskInstances(e.Token, (IActivityInstance)e.getSource()); } else if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_COMPLETED) { // RuntimeContext.getInstance() // .TaskInstanceManager // .archiveTaskInstances((IActivityInstance)e.getSource()); } }
/// <summary>节点实例监听器</summary> public override void onNodeInstanceEventFired(NodeInstanceEvent e) { //同步器节点的监听器触发条件,是在离开这个节点的时候 if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_LEAVING) { ISynchronizerInstance syncInst = (ISynchronizerInstance)e.getSource(); IPersistenceService persistenceService = this.RuntimeContext.PersistenceService; //删除同步器节点的token persistenceService.DeleteTokensForNode(e.Token.ProcessInstanceId, syncInst.Synchronizer.Id); } //如果节点实例结束,就触发 if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_COMPLETED) { // 执行ProcessInstance的complete操作 IToken tk = e.Token; ProcessInstance currentProcessInstance = (ProcessInstance)tk.ProcessInstance; currentProcessInstance.complete(); } }
/// <summary>节点实例监听器</summary> public override void onNodeInstanceEventFired(NodeInstanceEvent e) { //同步器节点的监听器触发条件,是在离开这个节点的时候 if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_LEAVING) { ISynchronizerInstance syncInst = (ISynchronizerInstance)e.getSource(); IPersistenceService persistenceService = this.RuntimeContext.PersistenceService; //删除同步器节点的token persistenceService.DeleteTokensForNode(e.Token.ProcessInstanceId, syncInst.Synchronizer.Id); } //如果节点实例结束,就触发 if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_COMPLETED) { // 执行ProcessInstance的complete操作 IToken tk = e.Token; ProcessInstance currentProcessInstance = (ProcessInstance)tk.ProcessInstance; currentProcessInstance.complete(); } }
/// <summary>节点实例监听器</summary> public void onNodeInstanceEventFired(NodeInstanceEvent e) { // TODO Auto-generated method stub if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_FIRED) { //保存token,并创建taskinstance IPersistenceService persistenceService = this.RuntimeContext.PersistenceService; //TODO wmj2003 这里是插入还是更新token persistenceService.SaveOrUpdateToken(e.Token); //触发activity节点,就要创建新的task this.RuntimeContext.TaskInstanceManager.createTaskInstances(e.Token, (IActivityInstance)e.getSource()); } else if (e.EventType == NodeInstanceEventEnum.NODEINSTANCE_COMPLETED) { // RuntimeContext.getInstance() // .TaskInstanceManager // .archiveTaskInstances((IActivityInstance)e.getSource()); } }