How to protect Camunda from processes that enter into a dead loop?

Hello my friend!
Welcome to the community!

It seems like a good solution to implement an execution listener containing logic for this validation.

But first, before anything else, we need to understand why your process would enter a loop, and avoid this as much as possible. Why would the retry be implemented explicitly? Is it really necessary? Is there no other way to avoid this?

If you really need it due to the need to execute other tasks in specific cases and this could cause your application to enter a loop, in this case it does make sense to implement the logic to validate in a global execution listener, or do it individually in the tasks that are needed.

Below is the link to the official Camunda documentation on execution listeners:

I hope this helps!

William Robert Alves