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

Examples of com.founder.fix.fixflow.core.impl.runtime.ProcessInstanceEntity


    throw new FixFlowException("流程定义没有开始节点!");

  }

  public ProcessInstanceEntity createProcessInstance(String businessKey) throws Exception {
    return new ProcessInstanceEntity(this, businessKey);
  }
View Full Code Here


  }

  public void addDataVariable(String variableKey, Object variableObj) {
    // TODO 自动生成的方法存根
    ExpressionMgmt.setVariable("fixflowdatavariable_"+variableKey, variableObj);
    ProcessInstanceEntity processInstanceEntity=(ProcessInstanceEntity)this.processInstance;
    ExecutionContext executionContext=ProcessObjectFactory.FACTORYINSTANCE.createExecutionContext(processInstanceEntity.getRootToken());
    //ExpressionMgmt.execute("fixflowdatavariable_"+variableKey, executionContext);
    ExpressionMgmt.execute("${"+variableKey+"}=fixflowdatavariable_"+variableKey+";",executionContext);
   
    ExpressionMgmt.execute("${"+variableKey+"}", executionContext);
  }
View Full Code Here

    ProcessDefinitionManager processDefinitionManager = commandContext.getProcessDefinitionManager();

    ProcessDefinitionBehavior processDefinition = processDefinitionManager.findLatestProcessDefinitionById(processDefinitionId);

    ProcessInstanceEntity processInstanceImpl = processInstanceManager.findProcessInstanceById(processInstanceId, processDefinition);

    TokenEntity token=processInstanceImpl.getTokenMap().get(tokenId);
   
   
   
    List<String> tokenIdList=new ArrayList<String>();
   
View Full Code Here

    //CacheHandler cacheHandler = Context.getProcessEngineConfiguration().getCacheHandler();
    //Object cacheObj = cacheHandler.getCacheData("ProcessInstance_" + processInstanceId);

    //if (cacheObj == null) {

      ProcessInstanceEntity processInstanceEntity = (ProcessInstanceEntity) getMappingSqlSession().selectOne("findProcessInstanceById",
          processInstanceId);
      if(processInstanceEntity==null){
        throw new FixFlowException("查询的流程实例: "+processInstanceId +" 不存在");
      }
      initProcessInstance(processInstanceEntity);
View Full Code Here

    // 执行处理命令中的开发人员设置的表达式
    runCommandExpression();
   
    //获取流程实例
    ProcessInstanceEntity processInstance=getProcessInstance();
    processInstance.suspend();
    try {
      saveProcessInstance(commandContext);
    } catch (Exception e) {
      // TODO 自动生成的 catch 块
      e.printStackTrace();
View Full Code Here

    taskInstanceNew.setFormUri(pendingTask.getFormUri());
    //将新任务的浏览表单设置为转办任务的浏览表单
    taskInstanceNew.setFormUriView(pendingTask.getFormUriView());

    // 获取当前正在操作的流程实例对象
    ProcessInstanceEntity processInstance = getProcessInstance();
    // 将新创建的出的任务插入任务管理器中
    processInstance.getTaskMgmtInstance().addTaskInstanceEntity(taskInstanceNew);
    // 获取流程上下文
    ExecutionContext executionContext = getExecutionContext();
    // 触发节点的任务分配事件
    ((FlowNodeImpl) executionContext.getToken().getFlowNode()).fireEvent(BaseElementEvent.EVENTTYPE_TASK_ASSIGN, executionContext, taskInstanceNew);
View Full Code Here

   
    //删除所有之前任务
    commandContext.getTaskManager().deleteTaskByProcessInstanceId(processInstanceId);
   
    //获取流程实例对象
    ProcessInstanceEntity processInstance=commandContext.getProcessInstanceManager().findProcessInstanceById(processInstanceId);

   
    //救活它。。
    processInstance.setEndTime(null);
    //获取根令牌
    TokenEntity token=processInstance.getRootToken();
    //救活它。。
    token.setEndTime(null);
    //获取流程定义
    ProcessDefinitionBehavior processDefinition=processInstance.getProcessDefinition();
    //获取指定的节点
    BaseElement baseElement=processDefinition.getDefinitions().getElement(nodeId);
    if(baseElement instanceof FlowNode){
     
      FlowNode flowNode= (FlowNode)baseElement;
View Full Code Here

public class UpdateProcessInstance implements UpdateRulesScript {

  public void execute(Object parameter, SqlCommand sqlCommand, ProcessEngineConfigurationImpl processEngineConfiguration) {

    ProcessInstanceEntity processInstance=(ProcessInstanceEntity)parameter;
    Object[] objectParamWhere = new Object[1];
    objectParamWhere[0]=processInstance.getId() ;
    sqlCommand.update(TableUtil.getProcessInstanceRunTableName(),  processInstance.getPersistentDbMap(), " PROCESSINSTANCE_ID=?",objectParamWhere);
 
  }
View Full Code Here

    // 执行处理命令中的开发人员设置的表达式
    runCommandExpression();
   
    //获取流程实例
    ProcessInstanceEntity processInstance=getProcessInstance();
   
    //恢复流程实例
    processInstance.resume();
    try {
     
      //保存流程实例
      saveProcessInstance(commandContext);
     
View Full Code Here

      taskInstanceNew.setAgent(null);
      taskInstanceNew.setAdmin(null);
      taskInstanceNew.setDraft(false);

      // 获取当前正在操作的流程实例对象
      ProcessInstanceEntity processInstance = getProcessInstance();
      // 将新创建的出的任务插入任务管理器中
      processInstance.getTaskMgmtInstance().addTaskInstanceEntity(taskInstanceNew);
      // 获取流程上下文
      ExecutionContext executionContext = getExecutionContext();
      // 触发节点的任务分配事件
      ((FlowNodeImpl) executionContext.getToken().getFlowNode()).fireEvent(BaseElementEvent.EVENTTYPE_TASK_ASSIGN, executionContext, taskInstanceNew);
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.runtime.ProcessInstanceEntity

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.