[jboss-user] [jBPM] New message: "jbpm 4 task problem"
m p
do-not-reply at jboss.com
Thu Jan 14 12:38:20 EST 2010
User development,
A new message was posted in the thread "jbpm 4 task problem":
http://community.jboss.org/message/520140#520140
Author : m p
Profile : http://community.jboss.org/people/supermp
Message:
--------------------------------------------------------------
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">
</event-listener>
</on>
<transition g="-43,-18" name="to fork1" to="task1"/>
</task>
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();
t.getId();
System.err.println(t.getAssignee());
System.err.println(t.getId());
System.err.println(t.getExecutionId());
}
}
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?
Massimo
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520140#520140
More information about the jboss-user
mailing list