1 Reply Latest reply on May 29, 2008 11:05 AM by Mike Jackson

    Simple BPEL Process - Assignment Problem

    Mike Jackson Newbie

      I am experimenting using jbpm-BPEL-1.1.GA under jboss-4.2.2.GA.
      Using the Eclipse BPEL designer I have put together a simple process to accept input from the client (a single String parameter), and pass it on to an invoke activity for a third party webservice (also taking a single String parameter) using an Assign to copy the input String to the output String.

      The Assign part of the generated BPEL looks like this:

      <bpws:assign name="Assign" validate="no">
       <bpws:from part="payload" variable="inputData">
       <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/tns:input]]></bpws:query>
       <bpws:to part="parameters" variable="ClientOutboundRequest">
       <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/result]]></bpws:query>

      However, when I deploy and invoke the service, my console output shows:

      ERROR [XPathEvaluator] selection of size other than one: []

      and the jboss log reports:
      2008-05-29 10:28:37,705 DEBUG [org.jbpm.bpel.graph.scope.FaultActionHandler] handling fault exception: org.jbpm.bpel.graph.exe.ScopeInstance@cdd309[name=global,token=/,state=performingPrimaryActivity]
      org.jbpm.bpel.graph.exe.BpelFaultException: org.jbpm.bpel.graph.exe.FaultInstance@12462d5[name={http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure]
       at org.jbpm.bpel.sublang.xpath.XPathEvaluator.narrowToSingleNode(XPathEvaluator.java:258)
       at org.jbpm.bpel.sublang.xpath.XPathVariableQueryEvaluator.evaluate(XPathVariableQueryEvaluator.java:63)
       at org.jbpm.bpel.graph.basic.assign.FromVariable.extract(FromVariable.java:63)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      Can anyone shed any light as to what I am doing wrong? I have tried generating the BPEL with other tools (like the netbeans designer) with the same result...

      Thanks in advance

        • 1. Re: Simple BPEL Process - Assignment Problem
          Mike Jackson Newbie

          Ok, having given up with the Eclipse BPEL Designer generated Assign code, I came up with the following:

          <bpws:assign name="InitialiseClientReq" validate="no">
           <ns0:importDeclarationResult xmlns:ns0="http://component.mule.ksb.client.cxc.kewill.com/">
           <bpws:to part="parameters" variable="ClientOutboundRequest"/>
           <bpws:assign name="Assign" validate="no">
           <from part="payload" variable="inputData">/tns:input</from>
           <to part="parameters" variable="ClientOutboundRequest">/ns0:result</to>

          Note that this is actually 2 Assigns, the first being to initialise the outbound request before trying to access it for setting using xpath.

          Now this deployment seemed to get much further, as far as trying to invoke the 3rd party web service, but then this failed because...

          2008-05-29 15:45:32,419 ERROR [org.jbpm.graph.def.GraphElement] action threw exception: no port implements the required port type: portType={http://component.mule.ksb.client.cxc.kewill.com/}ClientWebserviceHandler
          org.jbpm.bpel.BpelException: no port implements the required port type: portType={http://component.mule.ksb.client.cxc.kewill.com/}ClientWebserviceHandler
           at org.jbpm.bpel.endpointref.SoapEndpointReference.selectPort(SoapEndpointReference.java:97)
           at org.jbpm.bpel.endpointref.SoapEndpointReference.selectPort(SoapEndpointReference.java:52)
           at org.jbpm.bpel.integration.jms.IntegrationControl.createPartnerClient(IntegrationControl.java:258)
           at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:239)
           at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:172)
           at org.jbpm.bpel.integration.def.InvokeAction.execute(InvokeAction.java:76)

          So, I do a bit more googling and discover here: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995885 that I may have trouble accessing remote webservices not hosted under JBoss. Mine are actually hosted locally as CXF endpoints under Mule ESB 2.0.1.

          I had another good look but could not find much mention of the bpel-application.xml anywhere, and certainly not in the 1.1GA documentation.

          What do I need to do in order to access remote webservices from my BPEL process??