AnsweredAssumed Answered

tasklistener event order

Question asked by heymjo on Jun 15, 2011
Latest reply on Jun 16, 2011 by frederikheremans1

The doc states about tasklistener events that the assignment event is fired before the create event.

event (required): the type of task event on which the task listener will be invoked. Possible events are
  • create: occurs when the task has been created an all task properties are set.

  • assignment: occurs when the task is assigned to somebody. Note: when process execution arrives in a userTask, first an assignment event will be fired, before the create event is fired. This might seem an unnatural order, but the reason is pragmatic: when receiving the create event, we usually want to inspect all properties of the task including the assignee.

  • complete: occurs when the task is completed and just before the task is deleted from the runtime data.

after some testing and debugging it looks to me that the assignment event is never fired before the create event.

This is my task definition

    <userTask id="verifyReport" name="verify the report">
        <activiti:taskListener event="create" delegateExpression="${fourEyesTaskListener}">
          <activiti:field name="fourEyesTask" stringValue="createReport"/>

This, together with is making it hard to implement a 4-eyes paradigm in activiti. Any ideas how to proceed here ?