工作流 任务转办 任务加签
任务转办
转签:转签就是该财务审批了,但是财务不审批了,我把这个机会交给其他人去审批,其他人审批完成,直接向下走,不用回来了
taskService.setAssignee
taskService.setAssignee(task.getId(), "转签人1");
@Test
public void trunTask() {
//转签
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
TaskService taskService = processEngine.getTaskService();
Task task = taskService.createTaskQuery()
.processInstanceBusinessKey("bussiness2")
.singleResult();
taskService.setAssignee(task.getId(), "转签人1");
}
任务加签
流程经理审批完开始财务审批,但是我想在财务审批前,加一个人审批,这个人审批结束,财务在审批,然后是老板,最后结束。
@Test
public void addOneTask() {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
TaskService taskService = processEngine.getTaskService();
Task task = taskService.createTaskQuery()
.processInstanceBusinessKey("bussiness2")
.singleResult();
taskService.delegateTask(task.getId(), "加签人1");
}
delegateTask