cancel
Showing results for 
Search instead for 
Did you mean: 

Need to implement a generic exception handling machanism.

rajivbansal2981
Champ in-the-making
Champ in-the-making
Hi,

We need help in implementing a generic exception handling framework. We refered all the documents and couldn't find any clue. What we actually want to achive is, We want one exception handler that would log the message, and selects which path in execution to pick.

Waiting for help
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
The true BPMN-approach would be to use an error-event. You can throw BPMNErrors from within your code to signal an exception in your business-logic. A catching-error-event can than move the process to the required state. For all other exceptions (in activiti process-execution, eg. property not found) there is no simple way of having a single hander decide what to do with the process.  Most internal exceptions aren't recoverable and moving the process to another activity is not an option in most cases as it potentially leaves the execution in a stale state.