Examples of findTokensForProcessInstance()


Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

            return resultJoinPoint;
        } else {

            int stepNumber = 0;

            List<IToken> tokensList_0 = persistenceService.findTokensForProcessInstance(this.getId(), synchInst.getSynchronizer().getId());
            Map<String,IToken> tokensMap = new HashMap<String,IToken>();
            for (int i = 0; i < tokensList_0.size(); i++) {
                IToken tmpToken =   tokensList_0.get(i);
                String tmpFromActivityId = tmpToken.getFromActivityId();
                if (!tokensMap.containsKey(tmpFromActivityId)) {
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

    if (!activityInstanceCanBeCompleted(taskInstance)) {
      return;
    }

    // 第三步,尝试结束对应的activityInstance
    List<IToken> tokens = persistenceService.findTokensForProcessInstance(
        taskInstance.getProcessInstanceId(), taskInstance
            .getActivityId());
    // System.out.println("Inside TaskInstance.complete(targetActivityInstance):: tokens.size is "+tokens.size());
    if (tokens == null || tokens.size() == 0) {
      return;// 表明activityInstance已经结束了。
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

    if (!activityInstanceCanBeCompleted(taskInstance)) {
      return;
    }

    // 第三步,尝试结束对应的activityInstance
    List<IToken> tokens = persistenceService.findTokensForProcessInstance(
        taskInstance.getProcessInstanceId(), taskInstance
            .getActivityId());
    // System.out.println("Inside TaskInstance.complete(targetActivityInstance):: tokens.size is "+tokens.size());
    if (tokens == null || tokens.size() == 0) {
      return;// 表明activityInstance已经结束了。
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

      if (isInSameLine){
        this.abortTaskInstance(currentSession, processInstance, thisTaskInst, targetActivityId);
      }
     
      //合法性检查
      allTokens = persistenceService.findTokensForProcessInstance(thisTaskInst.getProcessInstanceId(), null);

      aliveActivityIdsAfterJump.add(targetActivityId);
     
      for (int i=0;allTokens!=null && i<allTokens.size();i++){
        IToken tokenTmp = allTokens.get(i);
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

    if (!activityInstanceCanBeCompleted(thisTaskInst)) {
      return;
    }

    // 第三步,尝试结束对应的activityInstance
    List<IToken> tokens = persistenceService.findTokensForProcessInstance(
        thisTaskInst.getProcessInstanceId(), thisTaskInst
            .getActivityId());
    // System.out.println("Inside TaskInstance.complete(targetActivityInstance):: tokens.size is "+tokens.size());
    if (tokens == null || tokens.size() == 0) {
      return;// 表明activityInstance已经结束了。
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

            "Jumpto refused because of current activity instance can NOT be completed. some task instance of this activity instance is in runing state or initialized state");
      }
    }
   
    //4)首先检查目标状态M是否存在冲突,如果存在冲突则不允许跳转;如果不存在冲突,则需要调整token
    List<IToken> allTokens = persistenceService.findTokensForProcessInstance(thisTaskInst.getProcessInstanceId(), null);
    WorkflowProcess thisProcess = thisTaskInst.getWorkflowProcess();//找到当前的工作里模型
    List<String> aliveActivityIdsAfterJump = new ArrayList<String>();//计算跳转后,哪些activity节点复活
    aliveActivityIdsAfterJump.add(targetActivityId);
   
    for (int i=0;allTokens!=null && i<allTokens.size();i++){
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

        });
        assertNotNull(currentProcessInstance);

        IPersistenceService persistenceService = runtimeContext.getPersistenceService();

        List<IToken> tokenList = persistenceService.findTokensForProcessInstance(currentProcessInstance.getId(), null);
        assertNotNull(tokenList);
        assertEquals(1,tokenList.size());
        IToken token = (IToken)tokenList.get(0);
        assertEquals(1,token.getStepNumber().intValue());
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

                    Logger.getLogger(FireWorkflowEngineTest.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
       
        tokenList = persistenceService.findTokensForProcessInstance(currentProcessInstance.getId(), null);
        assertNotNull(tokenList);
        assertEquals(3,tokenList.size());
       
        tokenList = persistenceService.findTokensForProcessInstance(currentProcessInstance.getId(), "AComplexJump.Synchronizer4");
        assertNotNull(tokenList);
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

       
        tokenList = persistenceService.findTokensForProcessInstance(currentProcessInstance.getId(), null);
        assertNotNull(tokenList);
        assertEquals(3,tokenList.size());
       
        tokenList = persistenceService.findTokensForProcessInstance(currentProcessInstance.getId(), "AComplexJump.Synchronizer4");
        assertNotNull(tokenList);
        assertEquals(1,tokenList.size());
       
        workItemList = persistenceService.findTodoWorkItems(CurrentUserAssignmentHandlerMock.ACTOR_ID, "AComplexJump", "AComplexJump.Activity2.Task2");
        assertNotNull(workItemList);
View Full Code Here

Examples of org.fireflow.engine.persistence.IPersistenceService.findTokensForProcessInstance()

        });
        assertNotNull(currentProcessInstance);

        IPersistenceService persistenceService = runtimeContext.getPersistenceService();

        List<IToken> tokenList = persistenceService.findTokensForProcessInstance(currentProcessInstance.getId(), null);
        assertNotNull(tokenList);
        assertEquals(1,tokenList.size());
        IToken token = (IToken)tokenList.get(0);
        assertEquals(1,token.getStepNumber().intValue());
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.