Here is my bpel. <!-- tstbpel BPEL Process [Generated by the Eclipse BPEL Designer] --> <!-- Date: Mon Jul 27 14:57:23 CEST 2015 -->
<bpel:process name="tstbpel" targetNamespace="http://eclipse.org/bpel/tstbpel" suppressJoinFailure="yes" xmlns:tns="http://eclipse.org/bpel/tstbpel" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns="http://sample.bpel.org/bpel/ShippingOrderAsynchCaller" xmlns:xsd="http://shippingservice.services.com" xmlns:ns1="http://www.w3.org/2001/XMLSchema"> <!-- Import the client WSDL --> <bpel:import namespace="http://shippingservice.services.com" location="1.xsd" importType="http://www.w3.org/2001/XMLSchema"></bpel:import> <bpel:import location="tstbpelArtifacts.wsdl" namespace="http://eclipse.org/bpel/tstbpel" importType="http://schemas.xmlsoap.org/wsdl/" /> <!-- ================================================================= --> <!-- PARTNERLINKS --> <!-- List of services participating in this BPEL process --> <!-- ================================================================= --> <bpel:partnerLinks> <!-- The 'client' role represents the requester of this service. It is used for callback. The location and correlation information associated with the client role are automatically set using WS-Addressing. --> <bpel:partnerLink name="client" partnerLinkType="tns:process" myRole="process" /> <bpel:partnerLink name="PartnerLink" partnerLinkType="tns:partner" partnerRole="partnerRole"></bpel:partnerLink> </bpel:partnerLinks> <!-- ================================================================= --> <!-- VARIABLES --> <!-- List of messages and XML documents used within this BPEL process --> <!-- ================================================================= --> <bpel:variables> <!-- Reference to the message passed as input during initiation --> <bpel:variable name="input" messageType="tns:tstbpelRequestMessage" /> <!-- Reference to the message that will be sent back to the requester during callback --> <bpel:variable name="clientRequest" messageType="tns:secondOpRequest"></bpel:variable> <bpel:variable name="clientRequest1" messageType="tns:Op3Request"></bpel:variable> <bpel:variable name="clientRequest2" messageType="tns:Op4Request"></bpel:variable> <bpel:variable name="counter" type="ns1:int"></bpel:variable> <bpel:variable name="PartnerLinkRequest1" messageType="ns:onResult"></bpel:variable> </bpel:variables> <!-- ================================================================= --> <!-- ORCHESTRATION LOGIC --> <!-- Set of activities coordinating the flow of messages across the --> <!-- services integrated within this business process --> <!-- ================================================================= --> <bpel:correlationSets> <bpel:correlationSet name="CorrelationSet" properties="tns:id"></bpel:correlationSet> </bpel:correlationSets> <bpel:sequence name="main"> <bpel:sequence name="Sequence"> <bpel:receive name="receiveOp1" partnerLink="client" portType="tns:tstbpel" operation="initiate" variable="input" createInstance="yes"> <bpel:correlations> <bpel:correlation set="CorrelationSet" initiate="yes"></bpel:correlation> </bpel:correlations> </bpel:receive> <bpel:assign validate="no" name="assign"> <bpel:copy> <bpel:from> <bpel:literal> <tns:OrderShippingResponse xmlns:tns="http://shippingservice.services.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:confirmationNo>tns:confirmationNo</tns:confirmationNo> <tns:estimatedDate>tns:estimatedDate</tns:estimatedDate> </tns:OrderShippingResponse> </bpel:literal> </bpel:from> <bpel:to variable="PartnerLinkRequest1" part="payload"></bpel:to> </bpel:copy> <bpel:copy> <bpel:from part="payload" variable="input"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA[tns:input]]> </bpel:query> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:confirmationNo]]></bpel:query> </bpel:to> </bpel:copy> <bpel:copy> <bpel:from part="payload" variable="input"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:estimatedDate]]></bpel:query> </bpel:to> </bpel:copy> </bpel:assign> <bpel:assign validate="no" name="Assigncounter"> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA[0]]> </bpel:from> <bpel:to variable="counter"></bpel:to> </bpel:copy> </bpel:assign> <bpel:invoke name="InvokePrintService" partnerLink="PartnerLink" operation="onResult" portType="ns:ShippingOrderAsynchCallerCallback" inputVariable="PartnerLinkRequest1"></bpel:invoke> <bpel:wait name="WaitFor20Second"> <bpel:for><![CDATA['PT15S']]></bpel:for> </bpel:wait> <bpel:while name="While"> <bpel:condition expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[$counter<1]]></bpel:condition> <bpel:sequence> <bpel:assign validate="no" name="Assign1"> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA[$counter+1]]> </bpel:from> <bpel:to variable="counter"></bpel:to> </bpel:copy> </bpel:assign> <bpel:pick name="Pick"> <bpel:onMessage partnerLink="client" operation="Op3" portType="tns:tstbpel" variable="clientRequest1"> <bpel:sequence name="Sequence1"> <bpel:assign validate="no" name="Assign2"> <bpel:copy> <bpel:from> <bpel:literal> <tns:OrderShippingResponse xmlns:tns="http://shippingservice.services.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:confirmationNo>tns:confirmationNo</tns:confirmationNo> <tns:estimatedDate>tns:estimatedDate</tns:estimatedDate> </tns:OrderShippingResponse> </bpel:literal> </bpel:from> <bpel:to variable="PartnerLinkRequest1" part="payload"></bpel:to> </bpel:copy> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA["op3"]]> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:confirmationNo]]></bpel:query> </bpel:to> </bpel:copy> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA["op3"]]> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:estimatedDate]]></bpel:query> </bpel:to> </bpel:copy> </bpel:assign> <bpel:invoke name="InvokePrintService" partnerLink="PartnerLink" operation="onResult" portType="ns:ShippingOrderAsynchCallerCallback" inputVariable="PartnerLinkRequest1"> </bpel:invoke> </bpel:sequence> <bpel:correlations> <bpel:correlation set="CorrelationSet" initiate="no"></bpel:correlation> </bpel:correlations> </bpel:onMessage> <bpel:onMessage partnerLink="client" operation="Op4" portType="tns:tstbpel" variable="clientRequest2"> <bpel:sequence name="Sequence1"> <bpel:assign validate="no" name="Assign3"> <bpel:copy> <bpel:from> <bpel:literal> <tns:OrderShippingResponse xmlns:tns="http://shippingservice.services.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:confirmationNo>tns:confirmationNo</tns:confirmationNo> <tns:estimatedDate>tns:estimatedDate</tns:estimatedDate> </tns:OrderShippingResponse> </bpel:literal> </bpel:from> <bpel:to variable="PartnerLinkRequest1" part="payload"></bpel:to> </bpel:copy> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA["op4"]]> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:confirmationNo]]></bpel:query> </bpel:to> </bpel:copy> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA["op4"]]> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:estimatedDate]]></bpel:query> </bpel:to> </bpel:copy> </bpel:assign> <bpel:invoke name="InvokePrintService" partnerLink="PartnerLink" operation="onResult" portType="ns:ShippingOrderAsynchCallerCallback" inputVariable="PartnerLinkRequest1"> </bpel:invoke> </bpel:sequence> <bpel:correlations> <bpel:correlation set="CorrelationSet" initiate="no"></bpel:correlation> </bpel:correlations> </bpel:onMessage> <bpel:onAlarm> <bpel:scope> <bpel:sequence name="Sequence1"> <bpel:assign validate="no" name="Assign4"> <bpel:copy> <bpel:from> <bpel:literal> <tns:OrderShippingResponse xmlns:tns="http://shippingservice.services.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:confirmationNo>tns:confirmationNo </tns:confirmationNo> <tns:estimatedDate>tns:estimatedDate</tns:estimatedDate> </tns:OrderShippingResponse> </bpel:literal> </bpel:from> <bpel:to variable="PartnerLinkRequest1" part="payload"></bpel:to> </bpel:copy> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA["onAlarm"]]> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:confirmationNo]]></bpel:query> </bpel:to> </bpel:copy> <bpel:copy> <bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"> <![CDATA["onAlarm"]]> </bpel:from> <bpel:to part="payload" variable="PartnerLinkRequest1"> <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[xsd:estimatedDate]]></bpel:query> </bpel:to> </bpel:copy> </bpel:assign> <bpel:invoke name="InvokePrintService" partnerLink="PartnerLink" operation="onResult" portType="ns:ShippingOrderAsynchCallerCallback" inputVariable="PartnerLinkRequest1"> </bpel:invoke> </bpel:sequence> </bpel:scope> <bpel:for><![CDATA['PT2S']]></bpel:for> </bpel:onAlarm> </bpel:pick> <bpel:wait name="Wait1"> <bpel:for><![CDATA['PT0S']]></bpel:for> </bpel:wait> </bpel:sequence> </bpel:while> </bpel:sequence> </bpel:sequence> </bpel:process> -----Message d'origine----- De : Sathwik B P [mailto:[email protected]] Envoyé : mercredi 9 septembre 2015 19:05 À : [email protected] Objet : Re: question Hi, Attachments will not come through. Embed your bpel inline. regards, sathwik On Wed, Sep 9, 2015 at 8:05 PM, TMAR Fadwa <[email protected]> wrote: > Hi, > > I’m testing the behavior of <pick> <on message> if there are more than > one message that was already sent and the pick has to choose among > several events. > > I want to test with many messages so I do this experiment with a > <while> and a <wait> (before the <while>) to be sure that I received > many messages before entering to the while and executing the pick (I > attached a screen shot of my process). > > By sending only two messages, one to invoke op3 and one to invoke op4, > the process executed the while more than 2 times and each time the > process executed the branches attached to <on op3> and <on op4>. > Normally it must execute twice (one for each received message) and then > execute on alarm. > Could anybody give me an explanation of this behavior? > >
