java - How to determine the lane of a call activity? -
i have phone call activity, used in different lanes of bpmn diagram. there task within phone call activity. possible determine lane of phone call activity task?
it looks in pictures here:
i want determine "mylane1" respectively "mylane2" within task "get parent lane".
you can utilize bpmn model api determine lane references activity:
processdefinition procdef = repositoryservice.createprocessdefinitionquery().processdefinitionkey("idofprocess").singleresult(); bpmnmodelinstance bpmnmodelinstance = repositoryservice.getbpmnmodelinstance(procdef.getid()); callactivity callactivity = null; collection<lane> lanes = bpmnmodelinstance.getmodelelementsbytype(lane.class); // iterate lanes (lane lane : lanes) { // iterate flownodes referenced lane: (flownode flownode : lane.getflownoderefs()) { if("idofcallactivity".equals(flownode.getid())) { callactivity = (callactivity) flownode; break; } } } if(callactivity != null) { // work callactivity }
java bpm bpmn camunda
No comments:
Post a Comment