flowable-engine icon indicating copy to clipboard operation
flowable-engine copied to clipboard

Add monitoring possibilities for BPMN exception mapping

Open tiffmaelite opened this issue 3 years ago • 0 comments

Feature request description

Whenever I am mapping a more or less generic exception to an error code in BPMN, I would like the possibility to know more about the original exception every time this mapping is executed. Currently, such exception details are swallowed and only replaced by the error code at the error mapping time. Actually, I want support users to be able to monitor these error occurrences and report the root causes of the originating exceptions. My underlying goal is reducing the probability for my end-users to end up in the modelled error paths.

Describe the solution you'd like

Some logging (even if only at debug level) in class org.flowable.engine.impl.bpmn.helper.ErrorPropagation, either in method mapException or in methods calling mapException when true is returned. I would expect this logging to contain:

  • exception class
  • class of exception root cause
  • process instance in which the exception occurred
  • message of original exception
  • stacktrace of original exception (maybe only at trace level)

Describe alternatives you've considered

  • either add the above details to FlowableErrorEvent (but then these new fields would not always be relevant, for example wen a BPMNError is thrown) and they can be used in custom implementations of EventLogger or custom subclasses of AbstractFlowableEngineEventListener
  • or add support for injecting new custom listeners in the error mapping execution (instead of the proposed logging)

tiffmaelite avatar Dec 22 '22 15:12 tiffmaelite