ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinay Vijay <vinay.vi...@altair.com>
Subject RE: FW: Issue with asynchronous web service call in ODE 1.3.6
Date Wed, 10 Jun 2015 06:09:01 GMT
Hi Sathwik,

                Find below the bpel code and wsdl for asynchronous web service. Is there some
issue with correlation here?



BPEL

<?xml version="1.0" encoding="UTF-8"?>

<process

    name="PrcWithAsyncService"

    targetNamespace="http://enterprise.netbeans.org/bpel/PrcWithAsynchronousService/PrcWithAsyncService"

    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"

    xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"

    xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"

    xmlns:tns="http://enterprise.netbeans.org/bpel/PrcWithAsynchronousService/PrcWithAsyncService"

    xmlns:ns0="http://examples.home.dev/jobprocessor"

    xmlns:ns1="http://enterprise.netbeans.org/wsdl/PrcWithAsynchronousService/PrcWithAsyncService"
xmlns:ns2="http://examples.home.dev/jobprocessor/types">



<import location="PrcWithAsyncService.wsdl" namespace="http://enterprise.netbeans.org/wsdl/PrcWithAsynchronousService/PrcWithAsyncService"
importType="http://schemas.xmlsoap.org/wsdl/" />

<import location="jobprocessor.wsdl" namespace="http://examples.home.dev/jobprocessor"
importType="http://schemas.xmlsoap.org/wsdl/" />

<import namespace="http://www.altair.com/WF/Framework/EPMODEBridgeService" location="EPMODEBridgeService.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>

<partnerLinks>

     <partnerLink name="EPMODEPL" xmlns:tns="http://www.altair.com/WF/Framework/EPMODEBridgeService"
partnerLinkType="tns:EPMODEBridgePLT" partnerRole="EPMODEBridgeServiceInvokeRole"/>

     <partnerLink name="PrcWithAsyncServicePL" xmlns:tns="http://enterprise.netbeans.org/wsdl/PrcWithAsynchronousService/PrcWithAsyncService"
partnerLinkType="tns:PrcWithAsyncService" myRole="PrcWithAsyncServiceProvider" partnerRole="PrcWithAsyncServiceRequester"/>

    <partnerLink partnerLinkType="ns0:JobProcessorLinkType"  name="JobProcessor" myRole="NotifyJobCompletionPortTypeRole"
partnerRole="JobProcessorRole" initializePartnerRole="yes" />

</partnerLinks>



    <variables>

        <variable name="GetCorrelationIDOut" xmlns:tns="http://www.altair.com/WF/Framework/EPMODEBridgeService"
messageType="tns:GetCorrelationIDReply"/>

        <variable name="GetCorrelationIDIn" xmlns:tns="http://www.altair.com/WF/Framework/EPMODEBridgeService"
messageType="tns:GetCorrelationIDRequest"/>

        <variable name="InitiateIn" messageType="ns1:PrcWithAsyncServiceRequestMessage"/>

        <variable name="ReplyFinishedJobIn" messageType="ns0:JobReply"/>

        <variable name="ProcessJobIn" xmlns:ns0="http://examples.home.dev/jobprocessor"
messageType="ns0:Job"/>

    </variables>

      <correlationSets>

       <correlationSet name="JobCorrelator" properties="ns0:Id"/>

      </correlationSets>



    <sequence>

        <receive name="Receive1" createInstance="yes" partnerLink="PrcWithAsyncServicePL"
operation="initiate" portType="ns1:PrcWithAsyncService" variable="InitiateIn"/>

        <assign name="Assign2">

            <copy>

                <from>'AsynPrc'</from>

                <to variable="GetCorrelationIDIn" part="partGetCorrelationIDRequest"/>

            </copy>

        </assign>

        <invoke name="Invoke2" partnerLink="EPMODEPL" operation="GetCorrelationID" xmlns:tns="http://www.altair.com/WF/Framework/EPMODEBridgeService"
portType="tns:EPMODEBridgeServicePortType" inputVariable="GetCorrelationIDIn" outputVariable="GetCorrelationIDOut"/>

        <assign name="Assign1">

            <copy>

                <from>

                    <literal>

                        <ns2:Job>

                            <ns2:jobId></ns2:jobId>

                            <ns2:payload></ns2:payload>

                        </ns2:Job>

                    </literal>

                </from>

                <to>$ProcessJobIn.job</to>

            </copy>

            <copy>

                <from>'HelloWorld'</from>

                <to>$ProcessJobIn.job/ns2:payload</to>

            </copy>

            <copy>

                <from variable="GetCorrelationIDOut" part="partGetCorrelationIDReply"/>

                <to>$ProcessJobIn.job/ns2:jobId</to>

            </copy>

        </assign>

        <invoke name="Invoke1" partnerLink="JobProcessor" operation="processJob" xmlns:ns0="http://examples.home.dev/jobprocessor"
portType="ns0:JobProcessor" inputVariable="ProcessJobIn">

            <correlations>

                <correlation set="JobCorrelator" initiate="yes"/>

            </correlations>

        </invoke>

        <receive name="Receive2" createInstance="no" partnerLink="JobProcessor" operation="replyFinishedJob"
portType="ns0:JobProcessorNotify" variable="ReplyFinishedJobIn">

            <correlations>

                <correlation set="JobCorrelator" initiate="no"/>

            </correlations>

        </receive>

    </sequence>

</process>



Asynchronous web service WSDL

<?xml version="1.0" encoding="UTF-8" ?>

<definitions targetNamespace="http://examples.home.dev/jobprocessor"

                                                 xmlns:jpt="http://examples.home.dev/jobprocessor/types"

                                                 xmlns:jp="http://examples.home.dev/jobprocessor"

                                                 xmlns="http://schemas.xmlsoap.org/wsdl/"

                                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

                                                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"

                                                 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

                                                 xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"

                                                 xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"

                                                 xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"

             xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/varprop"

             xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">

  <types>

                <xsd:schema targetNamespace="http://examples.home.dev/jobprocessor/types"

                                                                elementFormDefault="qualified">

                  <xsd:include schemaLocation="jobprocessor.xsd"/>

                </xsd:schema>

  </types>

  <message name="Job">

                <part name="job" element="jpt:Job"/>

  </message>

  <message name="JobReply">

                <part name="jobReply" element="jpt:JobReply"/>

  </message>

  <portType name="JobProcessor">

                <operation name="processJob">

                  <input message="jp:Job" wsaw:Action="http://examples.home.dev/jobprocessor/processJob"/>

                </operation>

  </portType>

  <portType name="JobProcessorNotify">

                <operation name="replyFinishedJob">

                  <input message="jp:JobReply" wsaw:Action="http://examples.home.dev/jobprocessor/replyFinishedJob"/>

                </operation>

  </portType>

  <binding name="JobProcessor" type="jp:JobProcessor">

                <wsaw:UsingAddressing wsdl:required="true"/>

                <soap:binding style="document"

                                                                  transport="http://schemas.xmlsoap.org/soap/http"/>

                <operation name="processJob">

                  <soap:operation style="document"

                                                                                  soapAction="http://examples.home.dev/jobprocessor/processJob"/>

                  <input>

                                <soap:body use="literal" parts="job"/>

                  </input>

                </operation>

  </binding>

  <binding name="JobProcessorNotify" type="jp:JobProcessorNotify">



                <wsaw:UsingAddressing required="true"/>

                <soap:binding style="document"

                                                                  transport="http://schemas.xmlsoap.org/soap/http"/>

                <operation name="replyFinishedJob">

                  <soap:operation style="document"

                                                                                  soapAction="http://examples.home.dev/jobprocessor/replyFinishedJob"/>

                  <input>

                                <soap:body use="literal" parts="jobReply"/>

                  </input>

                </operation>

  </binding>

  <service name="JobProcessor">

                <port name="jobProcessor" binding="jp:JobProcessor">

                  <soap:address location="http://localhost:8086/AsynchronousWebService/jobProcessor"/>

                </port>

  </service>

  <service name="JobProcessorNotify">

                <port name="jobProcessorNotify" binding="jp:JobProcessorNotify">

                  <soap:address location="http://localhost:8086/ode/processes/JobProcessorNotify.jobProcessorNotify"/>

                </port>

  </service>



    <bpws:property name="Id" type="xsd:string" />



     <bpws:propertyAlias propertyName="jp:Id" messageType="jp:Job" part="job">

      <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">

                jpt:jobId

      </bpws:query>

    </bpws:propertyAlias>



   <bpws:propertyAlias propertyName="jp:Id" messageType="jp:JobReply" part="jobReply">

      <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">

                jpt:jobId

      </bpws:query>

   </bpws:propertyAlias>



       <plnk:partnerLinkType name="JobProcessorLinkType">

        <plnk:role name="JobProcessorRole" portType="jp:JobProcessor"/>

        <plnk:role name="NotifyJobCompletionPortTypeRole" portType="jp:JobProcessorNotify"/>

    </plnk:partnerLinkType>

</definitions>







Regards,

Vinay



-----Original Message-----
From: Sathwik B P [mailto:sathwik.bp@gmail.com]
Sent: Tuesday, June 09, 2015 10:48 PM
To: user@ode.apache.org
Subject: Re: FW: Issue with asynchronous web service call in ODE 1.3.6



You probably have improper correlations. Hence the incoming message cannot be routed.



On Tue, Jun 9, 2015 at 8:38 PM, Vinay Vijay <vinay.vijay@altair.com<mailto:vinay.vijay@altair.com>>
wrote:



> Hi,

>                 I am trying to deploy a process invoking an

> asynchronous service in ODE 1.3.6. The process first calls a service

> which gives a random number which I use as correlator for the next

> asynchronous partner link call. The second partner link call invokes a

> web service which waits for anywhere between 5 to 10 seconds randomly

> and then calls back the process.

>

>                 When I run the process all the calls and callbacks are

> happening, but the process is not completing. In the BPEL_EVENT table

> the last event is ActivityStartEvent for the Receive activity. There

> is no activity completion event for the Receive, nor is a process

> completion event present. When I inspect the ode logs I am getting the

> following debug

> messages:

>

> 268024 [ODEServer-3] DEBUG

> org.apache.ode.bpel.engine.BpelRuntimeContextImpl  - MatcherEvent handling:

> correlatorId=JobProcessor.replyFinishedJob, ckeySet=[{CorrelationKey

> setId=JobCorrelator, values=[AsynPrc_283316883906124]}]

> 268055 [ODEServer-3] DEBUG

> org.apache.ode.bpel.engine.BpelRuntimeContextImpl  - MatcherEvent handling:

> nothing to do, no matching message in DB

>

>                 When I go to the ode source code, in

> BpelRuntimeContextImpl.matcherEvent(), the MessageExchangeDAO is

> coming as null for the CorrelationKeySet passed. This means there is

> no message exchange record for the CorrelationKeySet passed. What is

> it am I missing which is causing this piece of data not to be there in database?

>

>                Any help is greatly appreciated.

>

> Regards,

> Vinay

>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message