if you use runtime actions, then you don't even have to mess with the process definition.
Event event = processDefinition.getEvent("transition");
Action action = processDefinition.getAction("myActionAsDefinedInTheProcessDefinitionXml");
or something like that.
if it is just to see what transitions the process takes, you also could use debug logging.