0 Replies Latest reply on Mar 30, 2009 1:45 PM by oscar_urdaneta

    End-Task Event does not have access to the taken transition

    oscar_urdaneta

      If you are processing the task-end event on a task, you do not have access to the taken transition (in case the task node has more than one leaving transitions).

      The following code in TaskInstance.end() :

      ExecutionContext executionContext = new ExecutionContext(token);
      executionContext.setTask(task);
      executionContext.setTaskInstance(this);
      task.fireEvent(Event.EVENTTYPE_TASK_END, executionContext);

      needs to be changed to:

      ExecutionContext executionContext = new ExecutionContext(token);
      executionContext.setTask(task);
      executionContext.setTaskInstance(this);
      executionContext.setTransition(transition);
      task.fireEvent(Event.EVENTTYPE_TASK_END, executionContext);

      Basically, I can not call executionContext.getTransition() in my ActionHandler because it returns null.
      However, I can get the taken transition in the node-leave ActionHandler, but in here i can not get the executionContext.getTaskInstance().getActorId() and I need both the transition taken and the actor id