You can implement the task listener such that it only sends a notification after the current transaction is committed. See these two threads for an explanation and example code:
Hi all
We use Camunda global task listener by overriding “TaskListener getTaskListener()” method and it works create. But we have problem with that the task create events are created before the task object is actually commited? to the database.
The problem is that the task create event is sent to rabitmq and another system immediately makes rest request to get that task and usually the request fails with error: “org.camunda.bpm.engine.rest.exception.InvalidRequestException: No matching task w…
I have a model which defines a process end event listener. This listener is supposed to be executed when the instance is about to be finished.
When the event listeners retrieves the list of all activities of the processInstance, i get the list of all activities BUT the endEvent.
Do you know how to get the endEvent in this list of activities?
NOTE: What I would like to obtain is the whole list of activities executed during the processInstance. I understand the endEvent must be in this list. In…
1 Like