2 Replies Latest reply on Aug 31, 2010 3:46 AM by francis1972

    Transactions and jBPM

    francis1972

      Hi all!

      I have in charge to set up a small prototype for verifying if it's possible to port a vendor solution (Oracle Workflow) to jBPM.

       

      In my OracleWorkflows there are many use cases where the execution is forked in two branches which both execute transactions. Then, in the JOIN node, if both nodes completed correctly transactions a commit is issued. Otherwise a rollback is executed.

       

      I'd like to reproduce the same behaviour- I have arranged for the purpose a fork with two Java EJB Nodes which perform DML Statements. However, I have two doubts :

      1) How can I coordinate transactions ? should I use BMT (via UserTransaction) and manually issue a commit() in the Join node ?

      2) How do I know if some Statements fail, that is, if I have to issue a rollback() in the JOIN node ?

       

      Thanks a lot in advance

      Francis

        • 1. Re: Transactions and jBPM
          rebody

          Hi Francis,

           

          jBPM will commit transaction if there is no exception occured.  And it will execute rollback when there is an exception.  So you needn't do it by yourself.

          • 2. Re: Transactions and jBPM
            francis1972

            Thanks for your reply! Just one more clarification: is it possible to rollback a transaction in the JOIN nodes of the DB statements executed earlier in the forked nodes ? or I can just rollback transactions executed on the same node jbpm is executing ? thanks a lot