-
1. Re: In jbpm 4.3, how to get the incoming node name in the next node?
rebody Aug 17, 2010 8:42 PM (in response to tunmang)Hi Tun,
You have to cast execution to ExecutionImpl. Then get the current activity of this execution. Something like this:
ExecutionImpl executionImpl = (ExecutionImpl) execution; Activity activity = executionImpl.getActivity(); List<? extends Transition> incomingTransitions = activity.getIncomingTransitions(); for (Transition transition : incomingTransitions) { Activity incomingActivity = transition.getSource(); // here is the name of incomging activity }
-
2. Re: In jbpm 4.3, how to get the incoming node name in the next node?
tunmang Aug 18, 2010 11:57 AM (in response to rebody)Hi HuiSheng :
Thanks a lot for your help. But maybe my question is misleading you. The "incoming node" in the question is the previous node from which the token left. Say, both Node-A and Node-B has a outgoing transition connecting to Node-C, when in Node-C's override function, how to know it is coming from Node-A or Node-B by the Node-C's "execution" object?
Thanks a lot.
-
3. Re: In jbpm 4.3, how to get the incoming node name in the next node?
rebody Aug 18, 2010 9:19 PM (in response to tunmang)Hi Tun,
There is a List<String> getTransitionNames(); method in HistoryActivityInstance, you could use this to get the name of next transition. If you want to get the name of incoming node, I am afraid you have to write some codes by yourself.
BTW, Maciej is working on some stuff like this. If you have any advices please join our discussion. Thank you very much.
-
4. Re: In jbpm 4.3, how to get the incoming node name in the next node?
tunmang Aug 19, 2010 11:38 AM (in response to rebody)Hi HuiSheng:
Thanks a lot for your help and information.