1 Reply Latest reply on Dec 28, 2009 6:00 AM by Joram Barrez

    How to get event listener on individual task transitions ?

    Rocker Rocker Newbie

      Libraries: JBPM 4, Spring, Hibernate, JSF.              

       

      Sample JPDL File:

      ----------------------

      <process-definition xmlns="http://jbpm.org/4.2/jpdl" name="pdPlaceOrder2">
      <start name="start">
        <transition name="trPlaceOrder2" to="PlaceOrder2"/>
      </start>
      <task name="PlaceOrder2" assignee="user1" form="pages/client/PlaceOrder2.xhtml">
        <transition name="next" to="Confirm" />
        <transition name="cancel" to="error" />
      </task>
      <task name="Confirm" assignee="user2" form="pages/client/confirmOrder.xhtml">
        <transition name="next" to="end" />
        <transition name="cancel" to="error" />
      </task>
      <end name="error" />
      <end name="end" />
      </process-definition>

      ----------------------

       

      PlaceOrder2 page has some input fields, a drop down of all available options (transitions) for a task & submit button, the user1 can choose.

       

      Lets say user selects Confirm and clicks Submit button. How should i invoke a Java method on this particular transition without hardcoding of transition names in Java -> if transition = Confirm then {doSomething} else if transition = Error then {doEnd}

       

      Thanks,

      RockerRocker