2 Replies Latest reply on Oct 7, 2010 4:33 PM by rohit_r

    jBPM 3.2 Enterprise - Unhandled exception in async node?

    rohit_r Newbie

      Hello all,

         We have a jBPM 3.2.7 Enterprise deployed on Websphere 7.0 / Oracle 10g

      The process scenario is as follows

       

      START -> success-node (async) -> exception-node (async) -> END

       

      Each node just logs an message to console. When we start a new instance of the process

      1. success-node logs the message.
      2. exception-node throws an uncaught exception.

       

      After this we find that if we check the process instance status, it shows up in "Running" state with current node as exception-node. Is this the correct behavior? We were expecting the process to get rolled back to end of success-node.

       

      Also from this exception state if we signal the process further it goes to END state. We were expecting the exception-node to get processed again as the transaction should have rolled back to the end of success-node.

       

      The process archive is attached. Would really appreciate some help here as the process does not match our understanding of exception scenario in jBPM.

      Thanks!

        • 1. Re: jBPM 3.2 Enterprise - Unhandled exception in async node?
          Alejandro Guizar Master

          Nodes with the "async" attribute set to "true" or "exclusive" are executed asynchronously, but they are still entered in the current transaction - see Node.enter(). The observed behavior is as expected. If the token remained in  the success-node after an exception thrown during execution of the exception-node, it would indicate the success-node is still in progress, yet it is not. The success-node has completed successfully and the execution is stalled at the exception-node.

          • 2. Re: jBPM 3.2 Enterprise - Unhandled exception in async node?
            rohit_r Newbie

            Alejandro, thanks for the reply. After the exception has occured we see the process state as in the image attached below

            async-exception.JPG

            The process image does not give an idea that any exception has occurred. Also if we click on the running node and signal the process further from the console, it reaches the END state. Which means that the exception-node did not get processed again.

             

            Typically in a production environment for our application we require the following behaviour

            • On an exception, we want to process to be halted and persisted with exception details.
            • After exception causing problem has been resolved, the system administrator will signal the process using the console to re-process the exception node and continue our processing from there.

            How do we achieve this exception handling with jBPM?