This content has been marked as final.
Show 2 replies
-
1. Re: jBPM get outgoing Transition names
swiderski.maciej Mar 25, 2010 6:16 AM (in response to herbst)Hi,
so to get active node(s) you can use your execution instance:
execution.getActiveActivityNames()
This will return all active nodes for your execution or null if none is active.
Next, you can iterate over this and get each active node execution by using execution instance again:
execution.findActiveExecutionIn(activityName)
That will return new execution object.
Here starts not so nice usage.... you can cat that execution to ExecutionImpl and then you could access getActivity method and then getOutgoingTransitions...
I heard that there are issues in jira to get such functionality as part of public API so you could go through jira to check it out.
Please take a look at java docs for more details.
HTH
Maciej
-
2. Re: jBPM get outgoing Transition names
herbst Mar 25, 2010 6:37 AM (in response to herbst)Ok, i've just managed to find the names.
public List<Transition> getTransitiones(ProcessInstance processInstance) { Execution executionInA = processInstance.getProcessInstance(); return ((ExecutionImpl)executionInA).getActivity().getOutgoingTransitions(); }