How to Implement General Error Handling for BPMN Errors in Camunda Service Tasks with Retry Logic?

I’m working with Camunda, and my service tasks are REST callers. If a REST request fails (e.g., due to a bad response), I throw a BPMN error. Currently, I handle the error by adding an error boundary event to each service task, where I implement retry logic to try the task again after a specified amount of time.

While this works, I’d like to avoid duplicating this error handling logic on every service task. Is there a way to centralize this error handling so I can apply it globally across all service tasks?

I’ve included an example in the attached picture to demonstrate my current approach. Any guidance or examples on how to refactor this setup for centralized error handling would be greatly appreciated!

Thank you in advance!

image

Camunda provides retry as a core functionality. See e.g. Camunda 7 documentation or a blog post about retries.

Camunda 8 also supports retries.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.