On Tue, Jul 1, 2008 at 8:38 PM, Matthieu Riou <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 1, 2008 at 8:12 AM, Stelianos G. Sfakianakis <[EMAIL PROTECTED]>
> wrote:
>>
>> On Tue, Jul 1, 2008 at 5:52 PM, Matthieu Riou <[EMAIL PROTECTED]>
>> wrote:
>> > The stateful exchange protocol is the specification, implicit
>> > correlation
>> > describes its implementation in ODE. So they both describe the same
>> > thing,
>> > only the first is generic whereas the second describes how it works in
>> > ODE.
>> >
>> > Both only apply when you're dealing with services that support this
>> > protocol, so you would have to implement it. Otherwise you have to rely
>> > on
>> > classic correlation which would be the only way for the engine to know
>> > which
>> > process instance is supposed to be called back. Thing is, even if in
>> > your
>> > service doesn't really have state, as soon as you start a process
>> > instance
>> > and mean to call it back, state exists. Because the engine needs to a
>> > way to
>> > differentiate that specific instance from the others. Correlation is
>> > then a
>> > way to "bind" that state to the data present in messages.
>> >
>> > Btw you have attached all your WSDL documents but not your BPEL so I
>> > can't
>> > really see on which message you would be able to correlate.
>>
>> Hi Matthieu, thanks for your prompt response,
>> I have changed the setup to use explicit correlation. I have attached
>> the relevant files ready for deployment in ODE. Now, this new version is
>> deployed ok but when invoked I get a NPE back (see the complete log
>> attached):
>>
>> ERROR - GeronimoLog.error(108) | Method "run" in class
>> "org.apache.ode.bpel.runtime.INVOKE" threw an unexpected exception.
>> java.lang.NullPointerException
>> at
>> org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl.invoke(MyRoleMessageExchangeImpl.java:134)
>> at
>> org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeContextImpl.java:760)
>> at org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:88)
>> at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> ...
>>
>> Any ideas?
>
> Which version of ODE are you currently using? I have a feeling this has been
> solved but I'd need to know what you're running to be sure.
>
it's the war version 1.1.1. By the way the BPEL file seems that can't
make it through the ode-users mailing list, so I am attaching it as
txt in this email.
Best,
Stelios
<?xml version="1.0" encoding="UTF-8"?>
<bpws:process exitOnStandardFault="yes" name="Test2"
suppressJoinFailure="yes" targetNamespace="urn:test2:stelios"
xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns="urn:test2:steliosArtifacts"
xmlns:ns0="http://sample.bpel.org/bpel/sample"
xmlns:ode="http://www.apache.org/ode/type/extension"
xmlns:tns="urn:test2:stelios" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="Test2.wsdl" namespace="urn:test2:stelios"/>
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="AsyncHello.wsdl"
namespace="http://sample.bpel.org/bpel/sample"/>
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
location="Test2Artifacts.wsdl" namespace="urn:test2:steliosArtifacts"/>
<bpws:partnerLinks>
<bpws:partnerLink myRole="Test2Provider" name="client"
partnerLinkType="tns:Test2"/>
<bpws:partnerLink initializePartnerRole="yes"
myRole="EchoHelloRequester" name="EchoHelloPL"
partnerLinkType="ns:EchoHelloPLT" partnerRole="EchoHelloServer"/>
</bpws:partnerLinks>
<bpws:variables>
<bpws:variable messageType="tns:Test2RequestMessage" name="input"/>
<bpws:variable messageType="tns:Test2ResponseMessage" name="output"/>
<bpws:variable messageType="ns0:HelloWorldRequestMessage"
name="EchoHelloPLRequest"/>
<bpws:variable messageType="ns0:HelloWorldResponseMessage"
name="EchoHelloPLResponse"/>
<bpws:variable name="OrderId" type="xsd:string"/>
</bpws:variables>
<bpws:correlationSets>
<bpws:correlationSet name="Cor" properties="ns:OrderId"/>
</bpws:correlationSets>
<bpws:sequence name="main">
<bpws:receive createInstance="yes" name="receiveInput"
operation="process" partnerLink="client"
portType="tns:Test2" variable="input"/>
<bpws:assign name="CreateOrderId" validate="no">
<bpws:copy>
<bpws:from
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$ode:pid]]></bpws:from>
<bpws:to variable="OrderId"/>
</bpws:copy>
</bpws:assign>
<bpws:assign name="ConstructMsg" validate="no">
<bpws:copy>
<bpws:from>
<bpws:literal>
<HelloWorldRequest
xmlns="http://sample.bpel.org/bpel/sample">
<input>Hadadad</input>
<OrderId>42</OrderId>
</HelloWorldRequest>
</bpws:literal>
</bpws:from>
<bpws:to
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$EchoHelloPLRequest.payload]]></bpws:to>
</bpws:copy>
<bpws:copy>
<bpws:from
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$OrderId]]></bpws:from>
<bpws:to
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$EchoHelloPLRequest.payload/ns0:OrderId]]></bpws:to>
</bpws:copy>
<bpws:copy>
<bpws:from
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$input.payload/tns:input]]></bpws:from>
<bpws:to
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"><![CDATA[$EchoHelloPLRequest.payload/ns0:input]]></bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:invoke inputVariable="EchoHelloPLRequest"
name="InitiateEcho" operation="initiate"
partnerLink="EchoHelloPL" portType="ns0:MyHelloWorld">
<bpws:correlations>
<bpws:correlation initiate="yes" set="Cor"/>
</bpws:correlations>
</bpws:invoke>
<bpws:assign name="InitClbkOutput" validate="no">
<bpws:copy>
<bpws:from>
<bpws:literal>
<HelloWorldResponse
xmlns="http://sample.bpel.org/bpel/sample">
<result>Hadadad</result>
<OrderId>42</OrderId>
</HelloWorldResponse>
</bpws:literal>
</bpws:from>
<bpws:to part="payload" variable="EchoHelloPLResponse"/>
</bpws:copy>
</bpws:assign>
<bpws:receive name="ReceiveCallback" operation="onResult"
partnerLink="EchoHelloPL" portType="ns0:HelloWorldCallback"
variable="EchoHelloPLResponse">
<bpws:correlations>
<bpws:correlation initiate="no" set="Cor"/>
</bpws:correlations>
</bpws:receive>
<bpws:assign name="ConstructRetMsg" validate="no">
<bpws:copy>
<bpws:from part="payload" variable="EchoHelloPLResponse">
<bpws:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/ns0:result]]></bpws:query>
</bpws:from>
<bpws:to part="payload" variable="output">
<bpws:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[/tns:result]]></bpws:query>
</bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:reply name="replyOutput" operation="process"
partnerLink="client" portType="tns:Test2" variable="output"/>
</bpws:sequence>
</bpws:process>