2 Replies Latest reply on Mar 5, 2009 10:16 PM by Joshua Siaw

    Writing to custom tables not defined by JBPM

    Joshua Siaw Newbie

      Hi, I'm a new user and am wondering whether it's possible to have JBPM save records to user-defined tables. (For example, saving fields in a form to separate tables) I'm guessing this can be done using handlers but am not sure how to go about it. Is anyone able to shed some light on this topic?

        • 1. Re: Writing to custom tables not defined by JBPM
          Brad Davis Novice

          Josh,
          I have been using the pattern of EJB Stateless beans for the business layer.

          In that business layer, I will persist to whatever datastore I need, and make my calls to jBPM as well.

          The EJB Stateless Session Bean methods are wrapped with Container Managed transactions or Bean Managed transactions.

          That way, when I make some update in my business layer, and transition jBPM, I know that if the jBPM call fails, or the call to my datastore, everything is rolled back.

          Else, everything is committed.

          Another option would be to write your own hibernate layer and then pass in the hibernate session. See: 7.1.4. Injecting the hibernate session for more on this.

          • 2. Re: Writing to custom tables not defined by JBPM
            Joshua Siaw Newbie

            Hi Brad, thanks for your reply. I'm looking into EJB 3 now as well as Seam.