2 Replies Latest reply on Jan 16, 2007 11:41 AM by psilva

    Exception handling problems

    psilva

      Hi,

      I've got an action in one node of my process that if it fails I want it to halt the jBPM execution.

      What I did was create a new custom exception and throw it. As it is said in the jBPM documentation (9.7. Exception handling) if there are uncaught exceptions they will be thrown to the client that is calling the signal() method. However my exception in the client is always null, although he realizes that an exception happens.

      I've already tried to not even use a custom exception, and just let the default be thrown but the same happens.

      Did I missunderstood the documentation or could it be some problem?

      Thanks!

        • 1. Re: Exception handling problems
          psilva

          Found the problem, although I was not expecting that the method executeAction in org.jbpm.graph.def.GraphElement would also print the exception cause. Should this happen by the way?

          The problem is that somehow the field detailedMessage in exception object is not being filled, and when doing myException.getMessge() the return value is null.

          • 2. Re: Exception handling problems
            psilva

            After all there is something weird happening that isn't my fault ;)

            I thing there is some problem with the method executeAction in org.jbpm.graph.def.GraphElement when an exception is thrown.

            If you trace the execution you will see that the exception arriving to the code doing the signals has the field messageDetail empty which means that somehow the method executeAction is clearing it.

            The only to reach the exception message generated in the action exception is doing: e.getCause().getMessage();

            I think this is a bug!