It happens that within a BPMN-generated persistent state entry action, errors occur that we didn’t previously think about.
By default (given by the BPMN importer), such errors are caught be the persistent state default error handler called “OnUnhandledError”, and a transition to an Error State is triggered.
Now for the analysis of such an error, some context information would often be very useful, and the mechanism of dump files would come in handy.
Dumps are created if the setting “Dump Caught Errors: enabled:” = true. However I don’t want to configure this setting: too many dump files – for all caught errors e.g. retries – would be created. I just want the above mentioned “unhandled = uncaught errors” to be reported.
Is there a way to create a dump file, even though the default error handler catches the error? I thought about re-throwing the exception within the default error handler, but this would cause an implicit rollback on the original ps entry action, and corrupt the “history” mechanism…, and furthermore only show the context of the rethrow instead of the original one…
Are there any alternatives to accomplish this?
I have no good solution for this problem with the current Bridge version.
But we could enhance the Bridge to offer a new global function dumpError(). If you call this function in the default error handler a dump file would be generated.
Yeah, such a new function makes definitely sense, we should get the dump file from the underlaying error.
The BPMN Importer should create the default error handler directly this new function.