Setup : Flowable 6.3.1 with Spring Boot Rest API
We are exploring option to send an error notification (may be an email) if there is any problem with bpmn/dmn during execution. Any idea if this is something achievable without modifying any process/dmn, perhaps using some sort of Listener/Interceptor. Has anyone tried something like this before?
Thanks for your time.
When you want to handle notification in process model you can throw BpmnError and catch it by Error catch event. See e.g. org.flowable.engine.test.bpmn.event.error.BoundaryErrorEventTest. or https://www.flowable.org/docs/userguide/index.html#bpmnErrorStartEvent
How to do that without process model modification. I would hook into process parsing And add event subprocess automatically during process definition parsing.
Thanks for taking look @martin.grofcik
Looking for a solution that does NOT involve any process/dmn modifications. May be something like an Interceptor. Probably we can make use of Spring Interceptors directly. Still looking.
Have you tried with a FlowableEventListener?
You should be able to register this on the process engine and listen for various events (https://www.flowable.org/docs/userguide/index.html#eventDispatcherEventTypes). You can then send an email from the event listener when an error event occurs.
Thanks @pstapleton This is exactly what we are looking for!