Examples of ISynchronizerInstance


Examples of org.fireflow.kernel.ISynchronizerInstance

     */
    public void onNodeInstanceEventFired(NodeInstanceEvent e)
            throws KernelException, EngineException {
      //同步器节点的监听器触发条件,是在离开这个节点的时候
        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());

        }
    }
View Full Code Here

Examples of org.fireflow.kernel.ISynchronizerInstance

     */
    public void onNodeInstanceEventFired(NodeInstanceEvent e)
            throws KernelException {
      //同步器节点的监听器触发条件,是在离开这个节点的时候
        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操作
View Full Code Here

Examples of org.fireflow.kernel.ISynchronizerInstance

        }
      }

      ITransitionInstance theLeavingTransitionInstance = (ITransitionInstance) fromActivityInstance
          .getLeavingTransitionInstances().get(0);
      ISynchronizerInstance synchronizerInstance = (ISynchronizerInstance) theLeavingTransitionInstance
          .getLeavingNodeInstance();
      if (synchronizerInstance.getEnteringTransitionInstances().size() > fromActivityIdList
          .size()) {
        Token supplementToken = new Token();
        ((Token) supplementToken).setAlive(false);
        ((Token) supplementToken).setNodeId(synchronizerInstance
            .getSynchronizer().getId());
        supplementToken.setProcessInstanceId(thisTaskInstance
            .getProcessInstanceId());
        supplementToken
            .setProcessInstance(((TaskInstance) thisTaskInstance)
                .getAliveProcessInstance());
        supplementToken.setFromActivityId("EMPTY(created by reject)");
        supplementToken
            .setStepNumber(thisTaskInstance.getStepNumber() + 1);
        supplementToken.setValue(synchronizerInstance.getVolume()
            - theLeavingTransitionInstance.getWeight()
            * fromActivityIdList.size());
        persistenceService.saveOrUpdateToken(supplementToken);
      }
    } finally {
View Full Code Here

Examples of org.fireflow.kernel.ISynchronizerInstance

        }
      }

      ITransitionInstance thisLeavingTransitionInstance = (ITransitionInstance) thisActivityInstance
          .getLeavingTransitionInstances().get(0);
      ISynchronizerInstance synchronizerInstance = (ISynchronizerInstance) thisLeavingTransitionInstance
          .getLeavingNodeInstance();
      if (synchronizerInstance.getEnteringTransitionInstances().size() > 1) {
        Token supplementToken = new Token();
        ((Token) supplementToken).setAlive(false);
        ((Token) supplementToken).setNodeId(synchronizerInstance
            .getSynchronizer().getId());
        supplementToken.setProcessInstanceId(thisTaskInstance
            .getProcessInstanceId());
        supplementToken
            .setProcessInstance(((TaskInstance) thisTaskInstance)
                .getAliveProcessInstance());
        supplementToken.setFromActivityId("Empty(created by withdraw)");
        supplementToken.setStepNumber(newStepNumber);
        supplementToken.setValue(synchronizerInstance.getVolume()
            - thisLeavingTransitionInstance.getWeight());
        persistenceService.saveOrUpdateToken(supplementToken);
      }

      Token newToken = new Token();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.