0 Replies Latest reply on Mar 7, 2008 1:55 AM by syedtaj

    jBPM exception handling

    syedtaj

      Hello,

      I am a bit confused as how to implement exception handling in jBPM. Exceptions can occur in the delegation classes and I need to stop the default flow of the transition. I mean, once an exception is caught I might want to do something - send a mail etc. and stop executing the transition. But according to the documents -

      Note that the exception handling mechanism of jBPM is not completely similar to the java exception handling. In java, a caught exception can have an influence on the control flow. In the case of jBPM, control flow cannot be changed by the jBPM exception handling mechanism. The exception is either caught or uncaught. Uncaught exceptions are thrown to the client (e.g. the client that called the token.signal()) or the exception is caught by a jBPM exception-handler. For caught exceptions, the graph execution continues as if no exception has occurred.


      Is there something else that can be done? A work around that I can think of is to set some context variable if an exception occurs, and have a decision box after the node where I am expecting the error to occur and check the variable and decide the course of the action. However it does not solve the entire problem, since there may be other cases as exceptions can occur anywhere.

      Are there any other means of exception handling that I am missing?