2 Replies Latest reply on Jan 22, 2015 2:27 AM by horvie

    Custom action on task assign

    horvie

      In older version of JBPM you could perform custom action on task assign event by extending org.jbpm.graph.def.ActionHandler and defining it in process xml:

      <event type="task-assign">

        <action name="customAction" class="x.y.CustomAction" />

      </event>

       

      Is there an alternative to that in JBPM6.

      I am avare that in general you can to that with TaskLifeCycleEventListener, but I need something process/task specific.

        • 1. Re: Custom action on task assign
          swiderski.maciej

          since process life cycle and task life cycle are decoupled then the only way is to use task listeners. You can filter out only given process definitions within the listener to achieve sort of process level actions - each task has task data where it stores processId that is the process definition identifier.

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: Custom action on task assign
            horvie

            I went with similar solution. I package my action classes in kjar(s) since they are process dependent. Inside listener I get the deployment via task data. Then scan the deployment for corresponding actions and execute them.