在流程中节点3增加一个任务监听器,为create。当节点2执行完之后,判断节点2和节点3执行人是否是同一个人,如果是同一个人,则跳转到节点4。
目前跳转到节点4没有问题,但是act_ru_task中原来的数据节点2变成了节点3和节点4。也就是说,节点3还是执行了。
各位大神有什么办法直接跳转到节点4而不执行节点3。
数据表如图:
跳转后的数据:
代码:
CommandExecutor commandExecutor = taskServiceImpl.getCommandExecutor();
commandExecutor.execute(new JumpTaskCmd(currentTaskEntity, targetActivity, variables));
//execute方法中:
// 完成待办任务
Context.getCommandContext().getTaskEntityManager().deleteTask(taskEntity,
TaskEntity.DELETE_REASON_COMPLETED, false); // DELETE_REASON_DELETED DELETE_REASON_COMPLETED
// 跳转任务
ExecutionEntity execution = taskEntity.getExecution();
execution.setActivity(targetActivity);
execution.performOperation(AtomicOperation.ACTIVITY_START);