/**
* 获取流程实例的下一个节点的信息 BPMN
* 流程实例id
* 在遇到网关、分支的时候可能出现问题
*/
@Deprecated
private UserTask getNextTask(String processInstanceId) {
UserTask userTask=null;
//当前任务信息
Task task =this.getCurTask(processInstanceId);
if(task!=null) {
//获取流程发布Id信息
String definitionId = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult().getProcessDefinitionId();
//获取bpm对象
BpmnModel bpmnModel = repositoryService.getBpmnModel(definitionId);
//传节点定义key 获取当前节点
FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(task.getTaskDefinitionKey());
//输出连线
List<SequenceFlow> outgoingFlows = flowNode.getOutgoingFlows();
//遍历返回下一个节点信息
for (SequenceFlow outgoingFlow : outgoingFlows) {
//类型自己判断
FlowElement targetFlowElement = outgoingFlow.getTargetFlowElement();
//用户任务
if (targetFlowElement instan
工作流 Flowable 获取任务下一节点
于 2020-11-13 10:13:47 首次发布

3万+

被折叠的 条评论
为什么被折叠?



