ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre SAPANEL <alexandre.sapa...@photobox.com>
Subject RE: Parallel foreach with correlation
Date Wed, 13 Jul 2011 15:01:49 GMT
I am using the 1.3.5 version

-----Message d'origine-----
De : Tammo van Lessen [mailto:tvanlessen@gmail.com]
Envoyé : mercredi 13 juillet 2011 17:00
À : user@ode.apache.org
Objet : Re: Parallel foreach with correlation

Hi Alexandre,

which ODE version do you use?

I could look only briefly at your example, I think it should work
actually. What you could try is moving the partnerlink declaration into
the scope within the foreach, this should actually work.

Tammo

On 13.07.2011 16:30, Alexandre SAPANEL wrote:
> Hi,
>
>
>
> I have a process which defines a parallel foreach which contains an
invoke
> and a receive with correlation. It is defined as following:
>
>
>
> …
>
> <vprop:property name=*"prodOrderId"* type=*"p:long"*/>
>
>       <vprop:property name=*"itemComponentId"* type=*"p:long"*/>
>
>       </vprop:propertyAlias>
>
>       <vprop:propertyAlias messageType=*"pim:processPictures"* part=*
> "parameters"* propertyName=*"tns:itemComponentId"*>
>
>
<vprop:query>//*[local-name()='printingComponentId']</vprop:query>
>
>     </vprop:propertyAlias>
>
>       <vprop:propertyAlias messageType=*
> "tns:processedOrderPicturesRequestMessage"* part=*"parameters"*
propertyName
> =*"tns:itemComponentId"*>
>
>
<vprop:query>//*[local-name()='itemComponentId']</vprop:query>
>
>       </vprop:propertyAlias>
>
>       <vprop:propertyAlias messageType=*
> "tns:processedOrderPicturesRequestMessage"* part=*"parameters"*
propertyName
> =*"tns:prodOrderId"*>
>
>
<vprop:query>//*[local-name()='productionOrderId']</vprop:query>
>
>       </vprop:propertyAlias>
>
> …
>
> <bpel:forEach parallel=*"yes"* counterName=*"CounterItemComponent"*
>
>                                                name=*
> "ForEach_Component_In_OrderItem"*>
>
>                                                <bpel:startCounterValue
>> <![CDATA[1]]></bpel:startCounterValue>
>
>                                                <bpel:finalCounterValue
>> <![CDATA[$nbItemComponent]]></bpel:finalCounterValue>
>
>                                                <bpel:scope name=*
> "SplitOrderItemIntoComponents"*>
>
>                                                      <bpel:variables>
>
>
<bpel:variable
> name=*"itemComponent"* type=*"dom:itemComponent"* />
>
>                                                      </bpel:variables>
>
>
>
>                                                      <bpel:sequence
name=*
> "Sequence1"*>
>
>                                                            <bpel:assign
> validate=*"no"* name=*"AssignComponent"*>
>
>
<bpel:copy>
>
>                                                                        <
> bpel:from>
>
>
> <![CDATA[$orderItem/dom:components/dom:component[position()
> = $CounterItemComponent]]]>
>
>
</
> bpel:from>
>
>                                                                        <
> bpel:to variable=*"itemComponent"*></bpel:to>
>
>
</bpel:copy
>>
>
>
</bpel:assign>
>
>                                                            <bpel:if
name=*
> "If_Printable"*>
>
>                                                                  <
>
bpel:condition><![CDATA[$itemComponent/dom:type/dom:printable='true']]></
> bpel:condition>
>
>
<bpel:scope
> name=*"processItemPrintingComponentPictures"*>
>
>                                                                        <
> bpel:variables>
>
>
> <bpel:variable name=*"processPicturesInput"*
>
>
>             messageType=*"pim:processPictures"*></bpel:variable>
>
>
> <bpel:variable name=*"processedOrderPicturesStatus"*
>
>
>             messageType=*"process:processedOrderPicturesRequestMessage"*
/>
>
>
</
> bpel:variables>
>
>                                                                        <
> bpel:correlationSets>
>
>
> <bpel:correlationSet name=*"ItemComponent"*
>
>
>
properties=*"process:itemComponentId"*></bpel:correlationSet>
>
>
</
> bpel:correlationSets>
>
>                                                                        <
> bpel:sequence>
>
>
> <bpel:assign validate=*"no"* name=*"prepareProcessPictures"*>
>
>
>             <bpel:copy>
>
>
>                   <bpel:from>
>
>
>                         <bpel:literal xml:space=*"preserve"*>
>
>
>                               <tns:processOrderPictures
>
>
>                               xmlns:tns=*"xxx"*
>
>
>                               xmlns:xsi=*"
> http://www.w3.org/2001/XMLSchema-instance"*>
>
>
>                                     <printingComponentId>23</
> printingComponentId>
>
>
>                               </tns:processOrderPictures>
>
>
>                         </bpel:literal>
>
>
>                   </bpel:from>
>
>
>                   <bpel:to part=*"parameters"* variable=*
> "processPicturesInput"* />
>
>
>             </bpel:copy>
>
>
>             <bpel:copy>
>
>
>                   <bpel:from> <![CDATA[$itemComponent/dom:id]]>
>
>
>                   </bpel:from>
>
>
>                   <bpel:to part=*"parameters"* variable=*
> "processPicturesInput"*>
>
>
>                         <bpel:query
>
>
>                               queryLanguage=*
> "urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"*>
>
>
>                               <![CDATA[printingComponentId]]>
>
>
>                         </bpel:query>
>
>
>                   </bpel:to>
>
>
>             </bpel:copy>
>
>
> </bpel:assign>
>
>
> <bpel:invoke name=*"InvokeProcessPictures"*
>
>
>             partnerLink=*"PictureServicePartner"* operation=*
> "processPictures"*
>
>
>             portType=*"pim:PictureService"* inputVariable=*
> "processPicturesInput"*>
>
>
>
>
>             <bpel:correlations>
>
>
>                   <bpel:correlation set=*"ProductionOrder"*
>
>
>                         initiate=*"no"* pattern=*"response"*></
> bpel:correlation>
>
>
>                   <bpel:correlation set=*"ItemComponent"*
>
>
>                         initiate=*"yes"* pattern=*"request"*></
> bpel:correlation>
>
>
>             </bpel:correlations>
>
>
> </bpel:invoke>
>
>
> <bpel:receive name=*"ReceiveProcessPictures"*
>
>
>             partnerLink=*"PictureServicePartner"* operation=*
> "processedOrderPictures"*
>
>
>             portType=*"process:PictureServiceCallbackPT"* variable=*
> "processedOrderPicturesStatus"*>
>
>
>
>
>
>             <bpel:correlations>
>
>
>                   <bpel:correlation set=*"ProductionOrder"*
>
>
>                         initiate=*"no"*></bpel:correlation>
>
>
>                   <bpel:correlation set=*"ItemComponent"*
>
>
>                         initiate=*"no"*></bpel:correlation>
>
>
>             </bpel:correlations>
>
>
> </bpel:receive>
>
>
</
> bpel:sequence>
>
>                                                                  </
> bpel:scope>
>
>
>
>
<bpel:else>
>
>                                                                        <
> bpel:empty name=*"Empty"*></bpel:empty>
>
>
</bpel:else
>>
>
>                                                            </bpel:if>
>
>                                                      </bpel:sequence>
>
>                                                </bpel:scope>
>
>                                          </bpel:forEach>
>
>
>
>
>
> After the processPictures operation is invoked for each item in the
loop,
> ODE sends a conflictingReceive error.
>
>
>
> I found on different forums that I am not the only one having problems
with
> parallel foreach with correlation but I did not find any working
solution …
>
>
>
> Any help will be appreciated
>
>
>
> Thanks
>
>
>
> Alexandre
>

--
Tammo van Lessen - http://www.taval.de

Mime
View raw message