Home > Back-end >  Activiti5 how to obtain the direction of the current node can transfer
Activiti5 how to obtain the direction of the current node can transfer

Time:10-04

Such as the current node can be issued, the examination and approval and feedback, how do I get issued by the current node values to, examination and approval, the feedback of these three values

CodePudding user response:

Public List GetNextNode (String taskid) {
HistoricTaskInstance myTask=processEngine. GetHistoryService (.) createHistoricTaskInstanceQuery (). The taskId (taskId). SingleResult ();
String processDefinitionId=myTask. GetProcessDefinitionId ();
BpmnModel BpmnModel=repositoryService. GetBpmnModel (processDefinitionId);
List HaiList=historyService. CreateHistoricActivityInstanceQuery ()
ExecutionId (myTask. GetExecutionId ()). The finished (). The list ();
String myActivityId=myTask. GetTaskDefinitionKey ();
{if (ValidateUtil. IsEmpty (myActivityId))
Return new ArrayList ();
}
List FlowNodeList=new ArrayList ();
FlowNode FlowNode=(FlowNode) bpmnModel. GetMainProcess () getFlowElement (myActivityId);
List List=flowNode. GetOutgoingFlows ();
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 Seqs=flowNode1. GetOutgoingFlows ();
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
  • Related