1 Reply Latest reply on Oct 8, 2008 3:52 AM by dhanushgopinath

    How to invoke and monitor a Jbpm BPEL process in Java app?

    judyzhifu

      We need to invoke BPEL workflows from our java applications. My understanding is that we deploy a BPEL workflow and expose it as a web service, then we use standard way to invoke the deployed web service in a java application. Am I correct on that?

      I am also struggling to figure out how we can get BPEL process status information in our java application. Is that right the only thing we can do is to access logs? That is not easy to use for our applications. We hope to be able to start, control and monitor BPEL processes from our java applications. Any interface we can use to monitor BPEL processes programmatically in java app?

      Thanks in advance for your input!

      Judy

        • 1. Re: How to invoke and monitor a Jbpm BPEL process in Java ap
          dhanushgopinath

          Once a BPEL is deployed, it wil be exposed as WS and that can be invoked using a normal WS client. You can use the SOAP UI to test the same.

          To start and control the Process Instances you may need to use the BPEL API's exposed.

          for eg. to start a process instance



          JbpmConfiguration jbpmConfiguration = JbpmConfiguration .getInstance();
          JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
          BpelGraphSession graphSession = BpelGraphSession
           .getContextInstance(jbpmContext);
          
          BpelProcessDefinition bpelProcDef = graphSession .findLatestProcessDefinition(PROCESSNAME, TARGET NAMESPACE URI);
          
          ProcessInstance procInstance = bpelProcDef.createProcessInstance();
          jbpmContext.close();
          
          


          similarly there are other API's that are exposed.
          I havent tested these completely, but I am sure there is a way.

          Please have a look at the API documentation

          http://docs.jboss.com/jbpm/v3/javadoc/

          Hope this helps
          Dhanush