Handling exceptions from Execution/Task Listeners

Hi, is there a way to implement exception handling mechanism in a process where any exception or BpmnError that is thrown from any of the activity inside a subprocess can be caught via Error Boundary Event.

Currently In the process I have designed all execution/task listeners throw a Bpmn error with code “XYZ”, all the activities are enclosed within a subprocess. The process has errorboundary event with error code “XYZ”. This design however doesn’t work.

Can someone please provide their input’s or share how have they implemented generic exception handling in their process?

If you don’t specify an error code on an error boundary event then it will catch any BPMN error that reaches it’s scope.

Hi @Niall , I was also under the same impression, but it doesn’t work that way. If any of your task/execution listeners attached to either usertask/start event/sequence flows inside a subprocess throws any exception, then a error boundary event does not catch it, even if configured without any error code. It will work for service tasks but not for any other activity listeners.

Can you upload your model - it might help me understand the situation better

Hey @satish8784,

this might be what you’re looking for: https://app.camunda.com/jira/browse/CAM-5399

It will be released with Camunda BPM 7.11 which is scheduled for this week!



Thanks @tmetzke Exactly what I was looking for, would be waiting to see it implemented in the coming release. Meanwhile will have to think of an alternate way to handle listener exceptions in the current version since upgrading the camunda versions would incur re-deployment of the additional plugins that we have added for tasklist modification.