CodePudding user response:
Public ListHistoricTaskInstance myTask=processEngine. GetHistoryService (.) createHistoricTaskInstanceQuery (). The taskId (taskId). SingleResult ();
String processDefinitionId=myTask. GetProcessDefinitionId ();
BpmnModel BpmnModel=repositoryService. GetBpmnModel (processDefinitionId);
List
ExecutionId (myTask. GetExecutionId ()). The finished (). The list ();
String myActivityId=myTask. GetTaskDefinitionKey ();
{if (ValidateUtil. IsEmpty (myActivityId))
Return new ArrayList ();
}
List
FlowNode FlowNode=(FlowNode) bpmnModel. GetMainProcess () getFlowElement (myActivityId);
List
For (SequenceFlow I: list) {
FlowNode flowNode1=(FlowNode) i.g etTargetFlowElement ();
If (flowNode1 isExclusive ()) {//TODO if it is a gateway to the next does not support the secondary gateway parsing
List
For (SequenceFlow o: seqs) {
FlowNode flowNode2=(FlowNode) o.g etTargetFlowElement ();
If (flowNode2==null | | "end". The equals (flowNode2. The getName ())) {
continue;
}
FlowNodeList. Add (flowNode2);
}
} else {
If (flowNode1==null | | "end". The equals (flowNode1. The getName ())) {
continue;
}
FlowNodeList. Add (flowNode1);
}
}
Return flowNodeList;
}
CodePudding user response:
On the first floor is the solution, effective measurement