-
1. Re: Is it possible to get a node's parent id in BPMN2?
umarm Dec 28, 2011 3:19 AM (in response to umarm)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());
-
2. Re: Is it possible to get a node's parent id in BPMN2?
salaboy21 Dec 31, 2011 9:03 AM (in response to umarm)Hmm, It looks like you find the solution to your question, but why do you want to do that? When you start looking for that kind of things you are probably doing something wrong at modeling your business process. Why do you want to obtain the previous node in a process?
Cheers
-
3. Re: Is it possible to get a node's parent id in BPMN2?
umarm Jan 2, 2012 1:49 AM (in response to salaboy21)We are actually trying to generate a complex tree (roughly similar to decision tree) for a medical diagnostic system with the help of JBPM. Previous node is required so that we know where in the tree we have to append output of current node.