AnsweredAssumed Answered

Task listener is triggering create event before persisting task  in DB

Question asked by testactivitiuser on Apr 9, 2016
Latest reply on Jun 3, 2016 by jbarrez
I have a workflow like this user task1 -service task —user task2

Now I want process to stop at usertask2 , a task listener is attached to usertask2 and listening on create event. When Create event is fired, a custom Java class publishes a JMS on queue.

There is another piece of Java code in a separate transaction listening to queue and triggers when message arrives,  here I am querying activiti DB for user task2 ID which is not in DB yet and throws exception. How could I resolve it? Is there any way to find whether task is persisted in DB before publishing message on queue?

BTW, we use 5.14 version.