Package com.founder.fix.fixflow.core.task

Examples of com.founder.fix.fixflow.core.task.TaskQuery.taskAssignee()


    expandTaskCommand.setUserCommandId("HandleCommand_2");
    //设置任务ID
    expandTaskCommand.setTaskId(taskInstance.getId());
    //执行处理命令
    taskService.expandTaskComplete(expandTaskCommand, null);
    taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(subProcessInstanceId).taskNotEnd().list();
    taskInstance = taskInstances.get(0);
    //令牌停留在UserTask_4节点
    assertEquals("UserTask_4", taskInstance.getNodeId());
    //创建一个处理命令
    expandTaskCommand = new ExpandTaskCommand();
View Full Code Here


    expandTaskCommand.setUserCommandId("HandleCommand_2");
    //设置任务ID
    expandTaskCommand.setTaskId(taskInstance.getId());
    //执行处理命令
    taskService.expandTaskComplete(expandTaskCommand, null);
    taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(subProcessInstanceId).taskNotEnd().list();
    //全部走完,任务为空
    assertEquals(0, taskInstances.size());
    //===========================================================================
    //这个时候子流程走完会回到主流程上来
    taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(mainProcessInstanceId).taskNotEnd().list();
View Full Code Here

    //验证是流程实例是否存在
    assertNotNull(processInstanceId);
   
    TaskQuery taskQuery = taskService.createTaskQuery();
    // 查找 1200119390 的这个流程实例的当前独占任务
    TaskInstance taskInstance = taskQuery.taskAssignee("1200119390").processInstanceId(processInstanceId).taskNotEnd().list().get(0);
    //暂停任务后,验证任务为暂停状态
    assertEquals(taskInstance.getNodeId(),"UserTask_2");
   
   
    //创建通用命令
View Full Code Here

    taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(subProcessInstanceId).taskNotEnd().list();
    //全部走完,任务为空
    assertEquals(0, taskInstances.size());
    //===========================================================================
    //这个时候子流程走完会回到主流程上来
    taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(mainProcessInstanceId).taskNotEnd().list();
    taskInstance = taskInstances.get(0);
    //令牌停留在UserTask_2节点
    assertEquals("UserTask_2", taskInstance.getNodeId());
  }
}
View Full Code Here

    //执行这个转办的命令
    taskService.expandTaskComplete(expandTaskCommandPending, null);
    //重置任务查询
    taskQuery = taskService.createTaskQuery();
    // 查找 13223212313 的这个流程实例的当前独占任务
    taskInstance = taskQuery.taskAssignee("13223212313").processInstanceId(processInstanceId).taskNotEnd().list().get(0);
    //转办操作后,转办接收人的待办中存在这条任务
    assertNotNull(taskInstance);
   
    //查询是否有还回命令
    List<TaskCommandInst> taskCommandInsts=taskService.GetTaskCommandByTaskInstance(taskInstance,false);
View Full Code Here

    //执行这个还回任务的命令
    taskService.expandTaskComplete(expandTaskCommandResolved, null);
    //重置任务查询
    taskQuery = taskService.createTaskQuery();
    // 查找 1200119390 的这个流程实例的当前独占任务
    taskInstance = taskQuery.taskAssignee("1200119390").processInstanceId(processInstanceId).taskNotEnd().list().get(0);
    //还回操作后,任务回到换来的处理人
    assertNotNull(taskInstance);
   
    //查询是否有还回命令
    taskCommandInsts=taskService.GetTaskCommandByTaskInstance(taskInstance,false);
View Full Code Here

    //验证是流程实例是否存在
    assertNotNull(processInstanceId);
   
    TaskQuery taskQuery = taskService.createTaskQuery();
    // 查找 1200119390 的这个流程实例的当前独占任务
    TaskInstance taskInstance = taskQuery.taskAssignee("1200119390").processInstanceId(processInstanceId).taskNotEnd().list().get(0);
    //查询是否有追回命令
    List<TaskCommandInst> taskCommandInsts=taskService.GetTaskCommandByTaskInstance(taskInstance,true);
    boolean isHaveRecoverCommand = false;
    //循环查找是否有追回命令
    for(TaskCommandInst taskCommandInst:taskCommandInsts){
View Full Code Here

    //验证是流程实例是否存在
    assertNotNull(processInstanceId);
   
    TaskQuery taskQuery = taskService.createTaskQuery();
    // 查找 1200119390 的这个流程实例的当前独占任务
    TaskInstance taskInstance = taskQuery.taskAssignee("1200119390").processInstanceId(processInstanceId).taskNotEnd().list().get(0);
    //创建通用命令
    ExpandTaskCommand expandTaskCommandSuspendProcessInstance=new ExpandTaskCommand();
    //设置命令为暂停实例
    expandTaskCommandSuspendProcessInstance.setCommandType("suspendProcessInstance");
    //设置命令按钮的iD,与节点上处理命令设置一致
View Full Code Here

    //验证流程启动后实例状态为running(运行中)
    assertEquals(ProcessInstanceType.RUNNING, processInstance.getInstanceType());
    // 创建任务查询
    TaskQuery taskQuery = taskService.createTaskQuery();
    // 查找 1200119390 的这个流程实例的当前独占任务
    List<TaskInstance> taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(processInstanceId).taskNotEnd().list();
    //验证更新时间不为空
    assertNotNull(processInstance.getUpdateTime());
    TaskInstance taskInstance = taskInstances.get(0);
    //创建通用命令
    ExpandTaskCommand expandTaskCommandSuspendProcessInstance=new ExpandTaskCommand();
View Full Code Here

    //验证流程实例已经结束
    assertTrue(processInstance.hasEnded());
    //重置任务查询
    taskQuery = taskService.createTaskQuery();
    // 查找 1200119390 的这个流程实例的当前独占任务
    taskInstances = taskQuery.taskAssignee("1200119390").processInstanceId(processInstanceId).taskNotEnd().list();
    //验证任务已经被结束
    assertEquals(0, taskInstances.size());
  }
  /**
   * 测试接收任务和释放任务的taskService中的现有方法,不 以命令的形式,TaskServiceCandidateTest流程中的任务分配类型为共享模式
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.