I am using JBPM 5.1 as a component in a much larger application.
Occasionally, for various reasons, exceptions get thrown from inside JBPM. Some of these are business-logic related and therefore something we can investigate (things like null pointers in process variables), but some of them are system related (like Hibernate Stale object exceptions deep in the JBPM execution code).
I need to be able to catch these exceptions somehow, along with a small amount of process metadata, so that I can log the error in a way which allows administrative users to resolve the issue manually. Because the JBPM framework operates on IoC, I cannot simply wrap JBPM calls in a try/catch. Often, the stack trace doesn't have any of my classes in it at all.
Is there some place in the JBPM framework where I can register a global "exception handler", so that I can write the necessary code to report in a meaningful way on any/all exceptions which occur in the JBPM space?