Camunda BPNM: 7.13
Environment: Docker - Engine 19.03.08
We have added a plugin to the Process-Engine which triggers the BPMN task-lifecycle (start, end etc.) of User-Tasks and Service-Tasks as well as events like signals, messages etc and sends the triggered events to a message-broker(RabbitMQ) using the amqp-protocol. Behind the message-broker several microservices consume the messages of the message-broker.
The main logic of of the application we drive with the camunda process-engine consists of a workflow with parent-tasks whereas every parent-task might have multiple instances. Every instance calls a sub-process. which looks like the enclosed one.
This subprocess contains two service-tasks which run one after the other (“Vormontageschritt Ende”, “Cleanup”). The process logic makes it necessary to end the “Cleanup” task immediately after the microservice get the start event of this task from the message broker. The irritating phenomenon we can see in our application is that when the “Vormontageschritt Ende” Task fires its end event the microservice gets informed by the process-engine / message-broker in such a fast way that a fetch-and-lock transaction for the “Cleanup”-task using the camunda REST-Api does return nothing although the fact that the event was fired by the process-engine should mean that the “Cleanup”-task must exist. The only explanation we have is that the database-transaction of the process-engine is not yet commited when the microservice tries to fetch the task.