Hi,
Currently, I am using Camunda for microservice orchestration using Apache Kafka.
The process is executed when I get a REST request from REST controller as you can see on the diagram.
Outgoing messages are going to other microservices through Kafka Brokers. At the end of the flow,
we wait for “Completed” messages from microservices in order to complete the flow.
On the other hand, outgoing REST call is an external task so it is async.
Here is a sample workflow,
The problem is: When I get a sync REST request to REST controller, I need to return a response. However, during the timeout period, it is possible that the flow might still execute or even it is completed, the external task still might execute.
Is there a way if I can check all operations are being completed successfully?
I was thinking that maybe I can use below endpoints to decide if everything completed successfully.
- To see if the external task completed or not:
Get External Task Log | docs.camunda.org
GET /history/external-task-log/{id}
we can check failureLog and successLog fields of response.
- To see if the overall process is completed or not:
Get Process Instance | docs.camunda.org
GET /history/process-instance/{id}
We can check the state field of the response.
So is this a reliable way to see if all activities in the process have been completed successfully?
Thanks