1 Reply Latest reply on Jan 12, 2006 2:17 PM by admin

    HowTo programatically add action to transition?

    fmuhlenberg

      I would like to take an existing process definition and programatically add an action to each transition and then run the new definition in a process instance.

      Does anyone have a suggestion on where I might look for further details on adding the action? My thought is that this could be a useful when testing.

      -fm

        • 1. Re: HowTo programatically add action to transition?
          admin

          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");
          processInstance.addRuntimeAction(event, action);

          or something like that.

          if it is just to see what transitions the process takes, you also could use debug logging.

          regards, tom.