AnsweredAssumed Answered

How to catch general runtime exception of process executing?

Question asked by joeysr20det on Jul 10, 2012
Latest reply on Jul 16, 2012 by frederikheremans1
We have integrated Activiti inside our project. Currently I'm standing up a ProcessEngine in code and call the engine directly to start ProcessInstances. My question is, generally speaking, what is the proper way to catch and handle exceptions that occur during the execution of a ProcessInstance i.e. A ServiceTask is pointed to class that doesn't exist, An BPMN exception is not handled with an Error Event Handler and turns into an actual Exception. Basically, how do you catch any Exception that halts a Process during execution?

I'm familiar with creating and adding listeners to the ProcessEngine. Is there a standard way to say "let me know when anything happens to a specific running process (or to any of the running processes) that halts its (their) execution"? I need to be able to detect when a Process Instance is terminated so I can notify the owner via email with the reason why.

I've searched for several days now and can't find how.

Thanks for any pointers you can provide :)