Package com.founder.fix.fixflow.core.runtime

Examples of com.founder.fix.fixflow.core.runtime.Token


  }

  public Void execute(CommandContext commandContext) {
   
    ProcessEngine processEngine=ProcessEngineManagement.getDefaultProcessEngine();
    Token token=processEngine.getRuntimeService().createTokenQuery().tokenId(tokenId).singleResult();
    String processInstanceId = token.getProcessInstanceId();

    ProcessInstance processInstance=processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
   
   
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();
View Full Code Here


    String processInstanceId=jobExecutionContext.getJobDetail().getJobDataMap().getString("processInstanceId");
    String nodeId=jobExecutionContext.getJobDetail().getJobDataMap().getString("nodeId");
   
    RuntimeService runtimeService = processEngine.getRuntimeService();
   
    Token token=runtimeService.createTokenQuery().tokenId(tokenId).singleResult();
   
    Object transientVariable=runtimeService.getProcessInstanceVariable(processInstanceId, transientVariableId);
    Map<String, Object> transientVariableMap=null;
    if(transientVariable!=null){
     
      transientVariableMap=(HashMap<String, Object>)transientVariable;
     
    }
   
    //删除变量
   
    /*
    VariableQueryEntity variableQueryEntity = new VariableQueryEntity();

    if (processInstanceId != null && !processInstanceId.equals("")) {
      VariableFlowTypeEntity variableFlowTypeEntity = new VariableFlowTypeEntity(VariableFlowType.PROCESSINSTANCE, processInstanceId);
      variableQueryEntity.addVariableFlowType(variableFlowTypeEntity);
    }
   
    variableQueryEntity.addVariableName(transientVariableId);
   
    Context.getCommandContext().getVariableManager().deleteVariable(variableQueryEntity);
        */
   
    //
   
    if(nodeId.equals(token.getNodeId())){

      runtimeService.tokenTimeOut(tokenId, transientVariableMap);

    }
    else{
View Full Code Here

  }

  public Void execute(CommandContext commandContext) {
   
    ProcessEngine processEngine=ProcessEngineManagement.getDefaultProcessEngine();
    Token token=processEngine.getRuntimeService().createTokenQuery().tokenId(tokenId).singleResult();
    String processInstanceId = token.getProcessInstanceId();

    ProcessInstance processInstance=processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
   
   
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();
View Full Code Here

    }

    TaskInstance recoverToTask = endTaskInstances.get(0);

    String tokenId = recoverToTask.getTokenId();
    Token recoverToToken = runtimeService.createTokenQuery().tokenId(tokenId).singleResult();
    if (recoverToToken.getEndTime() == null) {

   

 
      ProcessDefinitionBehavior processDefinition = processInstanceImpl.getProcessDefinition();
View Full Code Here

    return hasEvent;
  }

  public void fireEvent(String eventType, ExecutionContext executionContext) {

    Token token = executionContext.getToken();
    try {
     
     
      executionContext.setEventSource(this);
      LOG.debug("事件'{}'触发,在'{}'节点,令牌号:'{}'.",eventType,token.getNodeId(),token.getId());
      fireAndPropagateEvent(eventType, executionContext);
      LOG.debug("事件'{}'完成,在'{}'节点,令牌号:'{}'.",eventType,token.getNodeId(),token.getId());
    } finally {
      executionContext.setEventSource(null);
    }
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.runtime.Token

Copyright © 2018 www.massapicom. 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.