activiti 7 下一任務節點


感謝 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;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM