#Exception handling in Spring Zeebe Client

3 messages · Page 1 of 1 (latest)

tired quest
#

Hi all,
I’m new to the Camunda Zeebe engine and currently using the Zeebe Spring client in my project. I’ve been exploring the proper approach for handling unexpected Runtime exceptions that may occur during service tasks(ex: NullPointerException) In specific cases, I explicitly throw a ZeebeBpmnError and have an error boundary event in place to catch these exceptions. However, for runtime exceptions other than ZeebeBpmnError, incidents occur, and the process breaks. Now I’m seeking an elegant solution to address these situations.

After reviewing the documentation, it seems that Camunda 8 does not have an incident handler API. Therefore, I have a few questions:

Should incidents be resolved, and the process completed as if no incident had occurred?
If so, is there a mechanism or handler that can be triggered during unexpected exceptions?
Currently, I’m considering a custom approach using Spring AOP to wrap runtime exceptions and send an internal server error to Kafka, which would then publish a message to a WebSocket channel. However, in this case, the incident would remain unresolved, and I’m uncertain about the appropriate treatment of incidents in real-world scenarios. Is this approach a correct way of handling the situation, or should incidents be resolved programmatically, such as by canceling or completing the flow?

wild etherBOT
#

This post has been reserved for your question.

Hey @tired quest! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.