2 Replies Latest reply on Mar 7, 2006 3:00 PM by Giuliano Caliari

    Commit/Rollback on jBPM and external server

    Giuliano Caliari Newbie

      Dear community,

      I'm currently evaluating jBPM and I have a few doubts.
      I'm using a node's action to call an external SOI server. I would like to know if there is a way to use the same transaction in the workflow and the SOI server or some automatic way to control commits and rollbacks. If there is none, is there a way to do this manually? I was thinking about using exception-handlers.
      The SOI server is using toplink. In other words, is there a way to make toplink and hybernate in different servers use the same database session?

      Here's the scenario that worries me:
      1. jBPM send a command to the SOI server.
      2. SOI server executes and commits normally
      3. jBPM receives the "ok" from the SOI server and continues it's execution
      4. An Exception occurs on the jBPM execution.

      What can I do in this situation?



        • 1. Re: Commit/Rollback on jBPM and external server
          Alejandro Guizar Master

          What do you mean by SOI server? In any case, if it is based on jee, you can easily configure Hibernate to use global (jta) transactions. To have distributed transactions you need a transaction manager that actually implements them. The manager shipped with JBoss AS doesn't, but other managers do, including the upcoming JBoss Transactions product.

          You can read more about JTA integration in these topics:
          JTA inside jBPM
          Transaction demarcation with EJB/CMT

          • 2. Re: Commit/Rollback on jBPM and external server
            Giuliano Caliari Newbie

            Hello Alex,

            Sorry, I was using our company's terminology by mistake. By SOI Server I mean a Service-Oriented Integration Server, a Server that provides services.

            From what I know of JTA, it works with 1 Application Server and several DB servers. This is not My situation. The idea would be to have 2 application servers and 1 database server.
            1 AS with jBPM using Hibernate(lets call it Server1) and another using TopLink(lets call this one Server2). The database would be Oracle.
            Server1 would run a few actions, and one of them would be an action executing a service on Server2. I needed to make the same transaction work on both servers, so the service on Server2 and the actions on Server1 would all commit or rollback. Is this possible?