[jboss-user] [JBoss jBPM] - End-Task Event does not have access to the taken transition

oscar_urdaneta do-not-reply at jboss.com
Mon Mar 30 13:45:35 EDT 2009


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

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222085#4222085

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222085



More information about the jboss-user mailing list