2 Replies Latest reply on Jan 15, 2010 4:30 AM by m p

    jbpm 4 task problem

    m p Newbie

      Hi everybody,

      i'm trying to migrate my process from 3.2.1 to 4.3;


      In jbpm 3.1.2 i had an action on a transition that send an email with the current task ID in its body;

      now in jbpm 4.3 i have this task:


      <task assignee="peter" form="review.ftl" g="241,85,80,40" name="readyToStart">
            <on event="start">
          <event-listener class="com.jbpm.utils.test">    
            <transition g="-43,-18" name="to fork1" to="task1"/>


      and in the class test:


      public class test implements EventListener{


          public void notify(EventListenerExecution execution) throws Exception {
          ProcessEngine eng=    Configuration.getProcessEngine();
          String process=execution.getProcessInstance().getId();
              Task t=eng.getTaskService().createTaskQuery().processInstanceId(process).uniqueResult();




      but the task-id is not the "current task"-id but the previous task-id.


      It seems that the eventlistener is fired before that in the database the current Task is updated ,

      so i get the previous task-id.


      There is a way to get the task-id of the current task?