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