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 with id XYZ”, probably because the task is not in the database yet. After waiting a second the task is there.
Note that we use cluster mode but this probably does not matter.
Is there some elegant solution to check if the task is actually commited in the database before sending the event out? I can come up with some ugly solutions, but I would not like for example to poll the database internally for the task.
Please let me know if I did not explain the problem good enough or you need some more information.
Thank you for your help!