The ProcessDefinition class provides functionality to retrieve information on transitions in the process definition.
Use method getAllTransitions() to get all transitions defined for the
process definition:
List<Transition> getAllTransitions();
The method returns a list of Transition objects.
In case you like to get a list of all transitions having as target a specified activity, use:
List<Transition> getIncomingTransitions(Activity activity);
The method returns a list of Transition objects. This list can be empty if there are no incoming transitions to the specified activity.
The following method returns a list of all transitions having as source the specified activity:
List<Transition> getOutgoingTransitions(Activity activity);
The method returns a list of Transition objects. This list can be empty if there are no incoming transitions from the specified activity.
To retrieve a specific transition, specified by the transition Id, use:
Transition getTransition(String transitionId);
The method returns the requested transition or null if there is no transition with the specified Id.
If you like to retrieve the source activity of a specified transition, use the following method:
Activity getSourceActivity(Transition transition);
It returns an Activity object.
To get the target activity for a specified transition, use:
Activity getTargetActivity(Transition transition);
The method returns an Activity object.