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

Examples of com.founder.fix.fixflow.core.impl.persistence.TaskManager


  }

  public ProcessInstance execute(CommandContext commandContext) {

    TaskManager taskManager = commandContext.getTaskManager();

    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);

    String tokenId = taskInstanceQuery.getTokenId();
    String nodeId = taskInstanceQuery.getNodeId();
    String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
    ProcessInstanceManager processInstanceManager = commandContext
View Full Code Here


  }
 
  public List<UserTaskBehavior> execute(CommandContext commandContext) {
   
   
    TaskManager taskManager = commandContext.getTaskManager();

    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
    if(taskId==null||taskId.equals("")){
      throw new FixFlowException("taskId不能为空");
    }

   
    if(taskInstanceQuery==null){
      throw new FixFlowException("没有查询到相关任务");
    }
   
    String tokenId = taskInstanceQuery.getTokenId();
    String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();

    String processInstanceId = taskInstanceQuery.getProcessInstanceId();

    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>();
   

    addTokenParent(token, tokenIdList);
   
    @SuppressWarnings({ "unchecked", "rawtypes" })
    List<TaskInstance> taskInstanceQueryToList=(List)taskManager.findTasksByTokenIdList(tokenIdList);
   
   
   
 
    List<UserTaskBehavior> userTaskBehaviorList=new ArrayList<UserTaskBehavior>();
View Full Code Here

      throw new FixFlowException("任务编号为空!");
    }

     
     
      TaskManager taskManager = commandContext.getTaskManager();

      TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);

     
      String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
      ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();
View Full Code Here

  }
 
 
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public List<TaskInstance> execute(CommandContext commandContext) {
    TaskManager taskManager = commandContext.getTaskManager();

    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
   
    String tokenId = taskInstanceQuery.getTokenId();
    String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();

    String processInstanceId = taskInstanceQuery.getProcessInstanceId();

    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>();
   

    addTokenParent(token, tokenIdList);
   
    List<TaskInstance> taskInstanceQueryToList=(List)taskManager.findTasksByTokenIdList(tokenIdList);
   
    List<TaskInstance> taskInstanceQueryToTemp=new ArrayList<TaskInstance>();
   
    for (TaskInstance taskInstanceQueryTo : taskInstanceQueryToList) {
      if(!taskInstanceQueryTo.getId().equals(this.taskId)){
View Full Code Here

  }
 
  public List<TaskInstance> execute(CommandContext commandContext) {
   
   
    TaskManager taskManager = commandContext.getTaskManager();

    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
    if(taskId==null||taskId.equals("")){
      throw new FixFlowException("taskId不能为空");
    }
View Full Code Here

  }
 
  public List<TaskInstance> execute(CommandContext commandContext) {
   
   
    TaskManager taskManager = commandContext.getTaskManager();
    if(taskId==null||taskId.equals("")){
      throw new FixFlowBizException("taskId 不能为空");
    }
    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
   
   
    String tokenId = taskInstanceQuery.getTokenId();
    String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();

    String processInstanceId = taskInstanceQuery.getProcessInstanceId();

    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>();
   

    addTokenParent(token, tokenIdList);
   
    //获取这个节点关系上之前的所有人工任务(UserTask)
    Map<String,FlowNode> flowNodes=CoreUtil.getBeforeFlowNode(token.getFlowNode());
   
    //获取这个令牌自己和爸爸相关的所有任务

   
    TaskQuery taskQuery=new TaskQueryImpl(Context.getCommandContext());


    List<TaskInstance> taskInstanceQueryToList = new ArrayList<TaskInstance>();


    taskQuery.processInstanceId(processInstanceId);
    taskQuery.taskIsEnd().orderByEndTime().asc().orderByTaskCreateTime().asc();
    taskInstanceQueryToList = taskQuery.list();
   
   
   
    List<String> processInstanceIdList=new ArrayList<String>();
    processInstanceIdList.add(token.getProcessInstanceId());
    taskManager.getTaskStatusByByProcessInstanceIdList(processInstanceIdList);
   
    //List<TaskInstance> taskInstanceQueryToList=(List)taskManager.findTasksByTokenIdList(tokenIdList);
    List<TaskInstance> taskInstanceQueryToListNew=new ArrayList<TaskInstance>();
    //Map<String, TaskInstance> taskMap=new HashMap<String, TaskInstance>();
   
View Full Code Here

    if (this.taskId == null || this.taskId.equals("")) {
      throw new FixFlowException("任务编号为空!");
    }

    // 获取任务管理器
    TaskManager taskManager = commandContext.getTaskManager();

    // 获取任务管理器
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();

    // 根据指定id查询出任务的TO 不能做改变操作
    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);

    if (taskInstanceQuery == null) {
      throw new FixFlowBizException("未查询到指定的任务");
    }
View Full Code Here

  }
 
  public List<TaskInstance> execute(CommandContext commandContext) {
   
   
    TaskManager taskManager = commandContext.getTaskManager();

    TaskInstance taskInstanceQuery = taskManager.findTaskById(taskId);
   
   
    String tokenId = taskInstanceQuery.getTokenId();
    String processDefinitionId = taskInstanceQuery.getProcessDefinitionId();
    ProcessInstanceManager processInstanceManager = commandContext.getProcessInstanceManager();

    String processInstanceId = taskInstanceQuery.getProcessInstanceId();

    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>();
   

    addTokenParent(token, tokenIdList);
   
    @SuppressWarnings({ "unchecked", "rawtypes" })
    List<TaskInstance> taskInstanceQueryToList=(List)taskManager.findTasksByTokenIdList(tokenIdList);
    /*
    List<TaskInstanceQueryTo> taskInstanceQueryToListTemp=new ArrayList<TaskInstanceQueryTo>();
    for (TaskInstanceQueryTo taskInstanceQueryTo : taskInstanceQueryToList) {
      if(!taskInstanceQueryTo.getNodeId().equals(token.getNodeId())){
        taskInstanceQueryToListTemp.add(taskInstanceQueryTo);
View Full Code Here

    return processInstanceManager;
  }

  public TaskManager getTaskManager() {
    TaskManager taskManager = new TaskManager();
    taskManager.setCommandContext(this);

    return taskManager;
  }
View Full Code Here

    if (taskInstance.hasEnded()) {
      throw new FixFlowBizException("当前的任务已经结束,无法继续处理!");
    }

    TaskManager taskManager=commandContext.getTaskManager();
   
    TaskInstance taskInstanceQueryRollBack = taskManager.findTaskById(rollBackTaskId);



    String taskId = this.taskId;
    String taskComment = this.taskComment;
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.persistence.TaskManager

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.