3 Replies Latest reply on Dec 2, 2008 6:33 AM by dhanushgopinath

    How to get a Bpel Process Instance through API?

    dhanushgopinath

      Hi,

      I have deployed a BPEL and I am invoking it through a SOAP UI.

      I want to get this ProcessInstance through API. I tried using GraphSession.findProcessInstances(procDefId), but it returned an error saying "couldn't load process instances for process definition '1'"

      I checked the DB and found out that there are no entries in the JBPM_PROCESSINSTANCE table. But there are entries in JBPM_PROCESSDEFINITION table of the process definition deployed.

      Where are the Bpel Process Instances stored then? And how do I obtain them.

      Please help.

      Thanks in Advance
      Dhanush Gopinath

        • 1. Re: How to get a Bpel Process Instance through API?
          dhanushgopinath

          Hi All,

          Any updates on this?

          Does it mean that the BPEL Process Instance is not even held in the DB ?

          Please let me know. Any help is appreciated.

          Thanks
          DHanush

          • 2. Re: How to get a Bpel Process Instance through API?
            aguizar

            BPEL process instances are definitely stored in the JBPM_PROCESSINSTANCE table. There is no reason why you wouldn't be able to retrieve a process instance through the GraphSession methods, other than some database connectivity problem. What is the full message (and stack trace, if any) of the error you get?

            • 3. Re: How to get a Bpel Process Instance through API?
              dhanushgopinath

              Hi Alex,

              Thanks for the confirmation. The fact was that my process is like this

              receive ->assign->invoke->receive ....


              The first receive and assign went fine, but I was getting exception in invoke.

              I thought since the receive activity is completed the process instance might have created, but it was not. That's what confused me.

              Now when I fixed the invoke's exception, it got working and the bpel process instances are indeed stored in JBPM_PROCESSINSTANCE table.

              Many thanks Alex for confirming it. I am also gettign the process instance through the graph session methods.


              Thanks
              Dhanush