[Users] Loop ForEach in Orchestra component
nguyen
petals-components at ebmwebsourcing.com
Wed Mar 16 10:26:03 CET 2011
Hi,
I tried to use the While activity in my bpel process for replace the ForEach. But it don't work correctly. In fact, I got the following error :
Code:
22 dÚc. 2008 13:55:45 org.ow2.orchestra.lang.jaxen.XPathEvaluator createElement
GRAVE: cannot create element for step with non-numeric predicate: [(DefaultNameS
tep): tns:ecart]
[Petals.Container.Components.petals-se-orchestra]-SEVERE 2008-12-22 13:55:45,233
OrchestraException: Message can not be processed
This is my code :
Code:
<bpws:assign validate="no" name="Assign">
<bpws:copy>
<bpws:from>
<![CDATA[1]]>
</bpws:from>
<bpws:to variable="counter"></bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:while name="While">
<bpws:condition><![CDATA[$counter<=count($XC01PLResponse.xc01ResponsePart/ecarts/ecart)]]></bpws:condition>
<bpws:sequence>
<bpws:assign validate="no" name="ExtraiteXC01ResultToReleveDetteResponse">
<bpws:copy>
<bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[$counter]/xsd:CodePeriode]]>
</bpws:from>
<bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[$counter]/tns:CodePeriode]]>
</bpws:to>
</bpws:copy>
</bpws:assign>
<bpws:assign validate="no" name="Loop">
<bpws:copy>
<bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$counter+1]]>
</bpws:from>
<bpws:to variable="counter"></bpws:to>
</bpws:copy>
</bpws:assign>
</bpws:sequence>
</bpws:while>
However, my bpel process work correctly when I replace the While activity by an sequence of <copy> clauses :
Code:
<bpws:assign validate="no" name="ExtraiteXC01ResultToReleveDetteResponse">
<bpws:copy>
<bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[1]/xsd:CodePeriode]]>
</bpws:from>
<bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[1]/tns:CodePeriode]]>
</bpws:to>
</bpws:copy>
<bpws:copy>
<bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$XC01PLResponse.xc01ResponsePart/ecarts/ecart[2]/xsd:CodePeriode]]>
</bpws:from>
<bpws:to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$output.ReleveDetteResponse/tns:ecarts/tns:ecart[2]/tns:CodePeriode]]>
</bpws:to>
</bpws:copy>
. . . . . .
</bpws:assign>
-------------------- m2f --------------------
Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=370#370
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/2912d18f/attachment.htm>
More information about the Users
mailing list