感谢 https://blog.csdn.net/weixin_39789689/article/details/106495938 同志的代码,看了部分,下来发现真的可以获取到下一个任务节点
BpmnModel bpmnModel = activityService.getRepositoryService().getBpmnModel(task.getProcessDefinitionId()); //这里的key要找到下一个才行 FlowElement flowElement = bpmnModel.getFlowElement(task.getTaskDefinitionKey()); UserTask userTask = (UserTask) flowElement; //搞到当前userTask的出处 List<SequenceFlow> outgoingFlows = userTask.getOutgoingFlows(); //直接获得目标元素 FlowElement targetFlowElement = outgoingFlows.get(0).getTargetFlowElement(); //转过来 UserTask nextUserTask = (UserTask) targetFlowElement;
本文来自博客园,作者:世界如此简单,转载请注明原文链接:https://www.cnblogs.com/Gxiaoxi/p/15594685.html