How to judge whether the process ends normally

How to judge whether the process ends normally

You can CreateProcessInstanceWithResult and await the result of the process.

Otherwise, this is a business domain question. What does success mean in your business domain? Do you want to report to a user that the process completed? If you are not awaiting the outcome, then put a service task in there to report out.

Otherwise, the model is management by exception. Processes that fail for technical reasons raise an incident.

Otherwise a process is either inflight or completed. If you need to know about completed instances, you can do one of the following:

  1. CreateProcessInstanceWithResult
  2. Add a service task to the process at the end to report completion
  3. Listen with an exporter
  4. Read ElasticSearch

Only 1 and 2 work on SaaS Camunda Cloud. You can do 1-4 with Self-Hosted.