JBoss Community

Re: Is it possible to get a node's parent id in BPMN2?

created by Umar Ashfaq in jBPM Development - View the full discussion

Alright, I got the solution by hit and trial:

 

Node currentNode = kcontext.getNodeInstance().getNode();

List<Connection> inConns = currentNode.getIncomingConnections("DROOLS_DEFAULT");

Node parentNode = inConns.get(0).getFrom();

System.out.println("Current node id: "+currentNode.getId());

System.out.println("Parent node id: "+parentNode.getId());

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community