6 Replies Latest reply on Oct 12, 2009 5:47 AM by Rashmi Roplekar

    A tutorial to deploy a Netbeans created BPEL process under J

    Aldo Lezza Newbie

      this is a tutorial to deploy a Netbeans created bpel to
      jboss 4.0.5 + jbpm-bpel 1.1.3 beta.
      So no reply as bug report is necessary.

      Suppose the name of the .bpel is processo.bpel and
      you have all the wsdl the bpel requires in the same dir.

      You've to replace processo with your process name

      Follow these steps

      1)Go to examples dir of your jbpm-bpel installation and
      create a folder with the same name of the .bpel file.

      In this tutorial processo.

      1.1 Copy from hello example the build file and replace
      "hello" with your process dir name (processo)

      1.2 Create dir src. Inside src, bpel. Inside bpel META-INF.

      1.3 In bpel dir copy all the files .bpel and .wsdl.

      1.4 In META-INF copy bpel-application from hello/src/bpel/META-INF
      and open it replacing hello with processo.

      1.5 If jboss server isn't up, make it running (run.sh or rub.bat)

      1.6 From example/process run ant deploy-definition

      1.7 You've done a successfull deploy if you got a 200 code response
      from the server.

      2) From example/process run ant generate-service

      This operation will create under the target dir under example/processo
      some files...

      3) The hottest part. Making artifacts...

      3.1 From hello/src/main/resources copy all files and dir to processo/src/main/resources

      3.2 Open wscompile.xml and replace hello with processo


      <?xml version="1.0"?>

      3.3 Same operation for wstools.xml


      <?xml version="1.0"?>

      <package-namespace package="org.jbpm.bpel.tutorial.processo"
      namespace="http://jbpm.org/examples/processo" />

      <wsdl-java file="wsdl/processo-service.wsdl">


      3.4 Go to target/resources/web and open processo-service.wsdl
      and processo-binding.wsdl. You can now read important info to
      correctly fill the fields of files for artifacts.

      3.5 Go to src/main/resources/web and open webservice.xml and web.xml

      3.6 In web.xml modify the word Greeter with the one you prefer.

      3.7 Modify webservice.xml as follows:

      3.4.1 web service description name: whatever you want
      3.4.2 wsdl-file: the one tool-generated and that you can find under target/resources/web
      It is the -service.wsdl terminating file (processo-service.wsdl).
      3.4.3 port-component-name : The one you find in the (processo)-service.wsdl as attribute name of port.
      3.4.4 service-endpoint-interface: whatever you want. This name will be used to generate a class.
      3.4.5 servlet-link: the one you type in web.xml for tag servlet-name
      3.4.6 handler-name: whatever you want

      3.5 Go to examples/processo and console type ant generate-artifacts

      4) The last step: deploy and interface writing

      In web.xml you specified a servlet class


      In src/main/java you have to recreate the same dir structure
      (/src/main/java/org/jbpm/bpel/tutorial/processo) and the file
      This class has to implement the interface Client that has been create in
      Implement the interface.

      4.1 Go to processo-binding you find in target/resources/web/wsdl and add
      import for client. I.e. the webservice providing the info for the receive
      and reply operation underthe bpel file

      Don't type ant deploy or you'll see org.jboss.ws.WSException in server log
      saying it isn't able to find the port type in the specified namespace

      4.2 Modificy jaxrpc-mapping.xml and processo-service.wsdl. To find the proper values
      you have to find the wsdl of the Client. Es Client.wsdl

      4.2.1 --> jaxrpc-mapping.xml

      You can read this values from Client.wsdl in field

      <wsdl:portType name="ClientPortType">

      Do the same with

      <wsdl-port-type xmlns:portTypeNS="http://j2ee.netbeans.org/wsdl/Client">portTypeNS:ClientPortType</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS="http://j2ee.netbeans.org/wsdl/Client">bindingNS:ClientBinding</wsdl-binding>

      and type for binding the value you find for Client.wsdl for binding

      <wsdl:binding name="ClientBinding" type="tns:ClientPortType">

      4.3 In examples/processo type ant deploy and if you read in server log something like

      INFO [TomcatDeployer] deploy, ctxPath=/processo, warUrl=.../tmp/deploy/tmp28869processo-exp.war/
      WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==
      INFO [IntegrationConfigurator] Message reception enabled for process: HelloWorld
      INFO [WSDLFilePublisher] WSDL published to: file:/home/zazzaz/Tesi_Workflow/jboss-4.0.5.GA/server/default/data/wsdl/processo.war/processo-service.wsdl
      INFO [ServiceEndpointManager] WebService started: http://zazzaz-desktop:8080/processo/client

      you won!

        • 1. Re: A tutorial to deploy a Netbeans created BPEL process und
          Burr Sutter Master

          Please consider taking this and putting together a wiki page along with the appropriate screenshots. It would make an awesome contribution to the project.


          • 3. Re: A tutorial to deploy a Netbeans created BPEL process und
            Daniel Epstein Newbie

            I have been trying to deploy a simple service created with the eclipse bpel designer on 4.0.4.GA and jbpm-bpel 1.1.3 beta, but I keep getting this message:

            16:27:28,250 INFO [[/jbpm-bpel]] processDeployServlet: deploying process definition: file=file:/C:/projects/jbpm-bpel-1.1.Beta3/examples/EchoService2/target/EchoService2-process.zip
            16:27:28,250 INFO [BpelReader] read wsdl definitions: EchoService2.wsdl
            16:27:28,250 ERROR [ProblemHandler] EchoService2.bpel activity not found [/bpws:process]
            16:27:28,250 INFO [BpelReader] read bpel process: EchoService2.bpel
            16:27:28,250 ERROR [[processDeployServlet]] Servlet.service() for servlet processDeployServlet threw exception
            org.jbpm.jpdl.JpdlException: [[ERROR] EchoService2.bpel activity not found [/bpws:process]]
             at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:84)
             at org.jbpm.bpel.web.ProcessDeployServlet.doGet(ProcessDeployServlet.java:50)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)

            The bpel and wsdl work fine in netbeans,
            here is the wsdl:
            <?xml version="1.0"?>
            <definitions name="EchoService2"
             <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
             <element name="EchoService2Request">
             <element name="request" type="string"/>
             <element name="EchoService2Response">
             <element name="response" type="string"/>
             <message name="EchoService2RequestMessage">
             <part name="payload" element="tns:EchoService2Request"/>
             <message name="EchoService2ResponseMessage">
             <part name="payload" element="tns:EchoService2Response"/>
             <!-- portType implemented by the EchoService2 BPEL process -->
             <portType name="EchoService2">
             <operation name="process">
             <input message="tns:EchoService2RequestMessage" />
             <output message="tns:EchoService2ResponseMessage"/>
             <plnk:partnerLinkType name="EchoService2PLT">
             <plnk:role name="EchoService2Provider" portType="tns:EchoService2"/>

            and here is the bpel:
            <?xml version="1.0" encoding="UTF-8"?>
            <bpws:process exitOnStandardFault="yes" name="EchoService2"
             xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://student.kuali.org/bpel/EchoService2">
             <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
             location="EchoService2.wsdl" namespace="http://student.kuali.org/bpel/EchoService2"/>
             <bpws:partnerLink myRole="EchoService2Provider" name="client" partnerLinkType="tns:EchoService2PLT"/>
             <bpws:variable messageType="tns:EchoService2RequestMessage" name="input"/>
             <bpws:variable messageType="tns:EchoService2ResponseMessage" name="output"/>
             <bpws:sequence name="main">
             <bpws:receive createInstance="yes" name="receiveInput"
             operation="process" partnerLink="client"
             portType="tns:EchoService2" variable="input"/>
             <bpws:assign name="Assign" validate="yes">
             <bpws:from part="payload" variable="input">
             <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/tns:request]]></bpws:query>
             <bpws:to part="payload" variable="output">
             <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/tns:response]]></bpws:query>
             <bpws:reply name="replyOutput" operation="process"
             partnerLink="client" portType="tns:EchoService2" variable="output"/>

            Here is the definition:
            <bpelDefinition location="EchoService2.bpel" xmlns="http://jbpm.org/bpel"
             <!-- makes WSDL interface elements available to the process -->
             <wsdl location="EchoService2.wsdl" />

            Am I missing something obvious? I can deploy the examples without any errors.

            • 4. Re: A tutorial to deploy a Netbeans created BPEL process und
              Alejandro Guizar Master

              jBPM BPEL supports a significant subset of WS-BPEL 2.0. However, you have to use the following namespace instead of the one used in the OASIS standard:


              The discrepancy is due to compatibility with the Eclipse BPEL designer.

              • 5. Re: A tutorial to deploy a Netbeans created BPEL process und
                Aldo Lezza Newbie

                I forgot one important thing.
                In webservices.xml substitute the param-value with the name of the partner-link on which you perform the receive


                name of the partner link served by this port


                • 6. Re: A tutorial to deploy a Netbeans created BPEL process und
                  Rashmi Roplekar Newbie

                  Hi depstei2,

                  As you are saying 'I can deploy the examples without any errors.', can you please let me know whether you deployed the jbpm-bpel1.1.1 examples in jBoss using NetBeans BPEL designer?

                  If yes, can you please share the steps?

                  I am struggling with it and need a solution urgently.

                  If anyone can help in this, it`ll be very helpful.