Hello,
in a SpringBoot based application (embedded engine), I have a process model with several activities of type “service” (what an unusual case! ) that are implemented via java delegate expressions. The delegate code may throw exceptions that are not catched in the code.
I’d like to have this: if an uncaught exception is thrown, some component of my application should be called with a reference to the process instance where the exception occurred. Or, if that’s simpler, an event subprocess within the same process instance should be activated.
My goal is to have an error handler (at the process instance level) for all unhandled errors.
I’d like to achieve this without writing a try-catch in each and every delegate and transforming the caught exception into a BPMNError.
Ideally, an activity (its job) should be tried multiple times (as configured in the process model) and then the handler should be activated (and not an incident be created).
Is this possible with some kind of process instance listener or Spring events or …
Thank you for any hints!