Sebastian Morales
2013-03-01 20:29:02 UTC
Sebastian Morales [https://community.jboss.org/people/smorales] created the discussion
"Use For Each in Bpel Process"
To view the discussion, visit: https://community.jboss.org/message/800393#800393
--------------------------------------------------------------
Hello,
I'm trying to iterate a List from a Webservice SOAP with ForEach
<bpel:forEach parallel="no" counterName="i" name="ForEach">
           <bpel:startCounterValue>
               <![CDATA[1]]>
           </bpel:startCounterValue>
           <bpel:finalCounterValue><![CDATA[count($SAPCCResponse.centroCostoResponse/return/zcoCecos/item)]]></bpel:finalCounterValue>
           <bpel:scope>
               <bpel:assign validate="no" name="Assign1">
                   <bpel:copy>
                       <bpel:from part="centroCostoResponse" variable="SAPCCResponse">
                           <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[return/zcoCecos/item[$i]/Ceco]]></bpel:query>
                       </bpel:from>
                       <bpel:to part="payload" variable="CentroCostoLinkResponse">
                           <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
                               <![CDATA[ItabCecos/item[number($i)]/Ceco]]>
                           </bpel:query>
                       </bpel:to>
                   </bpel:copy>
               </bpel:assign>
           </bpel:scope>
       </bpel:forEach>
But when I consume de Bpel process throws an exception:
*I changue to 2.0Â Â urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0*
16:18:36,254 INFOÂ [UDDIClerk] entityKey uddi:riftsaw.jboss.org:service
_sapcentrocostosservicio was not found in the registry
 16:18:36,694 INFO [ASSIGN] Assignment Fault: { http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=149,faultExplanation=No http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=149,faultExplanation=No results for expression: 'ItabCecos/item[number($i)]/Ceco' against '<?xml version="1.0" encoding="UTF-8"?>
 <ZcoCecoGetResponse xmlns=" http://SAPCentroCostos/wsdl http://SAPCentroCostos/wsdl"/>'
*I changue to* *2.0Â Â urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0 quitando el atributo number()*
 16:20:06,308 INFO [UDDIClerk] entityKey uddi:riftsaw.jboss.org:service_sapcentrocostosservicio was not found in the registry
16:20:06,824 INFOÂ [ASSIGN] Assignment Fault: { http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DsubLanguageExecutionFault,lineNo=149,faultExplanation=An http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault,lineNo=149,faultExplanation=An exception occured while evaluating "{OXPath10Expression return/zcoCecos/item[$i]/Ceco}": Error while executing an XPath expression:
*I changue to**Â Â urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0*
16:22:06,331 INFOÂ [UDDIClerk] entityKey uddi:riftsaw.jboss.org:service_sapcentrocostosservicio was not found in the registry
 16:22:06,785 INFO [ASSIGN] Assignment Fault: { http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=149,faultExplanation=Multiple http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=149,faultExplanation=Multiple results for expression: {OXPath10Expression return/zcoCecos/item[$i]/Ceco}
Any Idea why I get this error and the Bpel Process don't operate.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/800393#800393]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"Use For Each in Bpel Process"
To view the discussion, visit: https://community.jboss.org/message/800393#800393
--------------------------------------------------------------
Hello,
I'm trying to iterate a List from a Webservice SOAP with ForEach
<bpel:forEach parallel="no" counterName="i" name="ForEach">
           <bpel:startCounterValue>
               <![CDATA[1]]>
           </bpel:startCounterValue>
           <bpel:finalCounterValue><![CDATA[count($SAPCCResponse.centroCostoResponse/return/zcoCecos/item)]]></bpel:finalCounterValue>
           <bpel:scope>
               <bpel:assign validate="no" name="Assign1">
                   <bpel:copy>
                       <bpel:from part="centroCostoResponse" variable="SAPCCResponse">
                           <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[return/zcoCecos/item[$i]/Ceco]]></bpel:query>
                       </bpel:from>
                       <bpel:to part="payload" variable="CentroCostoLinkResponse">
                           <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
                               <![CDATA[ItabCecos/item[number($i)]/Ceco]]>
                           </bpel:query>
                       </bpel:to>
                   </bpel:copy>
               </bpel:assign>
           </bpel:scope>
       </bpel:forEach>
But when I consume de Bpel process throws an exception:
*I changue to 2.0Â Â urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0*
16:18:36,254 INFOÂ [UDDIClerk] entityKey uddi:riftsaw.jboss.org:service
_sapcentrocostosservicio was not found in the registry
 16:18:36,694 INFO [ASSIGN] Assignment Fault: { http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=149,faultExplanation=No http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=149,faultExplanation=No results for expression: 'ItabCecos/item[number($i)]/Ceco' against '<?xml version="1.0" encoding="UTF-8"?>
 <ZcoCecoGetResponse xmlns=" http://SAPCentroCostos/wsdl http://SAPCentroCostos/wsdl"/>'
*I changue to* *2.0Â Â urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0 quitando el atributo number()*
 16:20:06,308 INFO [UDDIClerk] entityKey uddi:riftsaw.jboss.org:service_sapcentrocostosservicio was not found in the registry
16:20:06,824 INFOÂ [ASSIGN] Assignment Fault: { http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DsubLanguageExecutionFault,lineNo=149,faultExplanation=An http://docs.oasis-open.org/wsbpel/2.0/process/executable}subLanguageExecutionFault,lineNo=149,faultExplanation=An exception occured while evaluating "{OXPath10Expression return/zcoCecos/item[$i]/Ceco}": Error while executing an XPath expression:
*I changue to**Â Â urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0*
16:22:06,331 INFOÂ [UDDIClerk] entityKey uddi:riftsaw.jboss.org:service_sapcentrocostosservicio was not found in the registry
 16:22:06,785 INFO [ASSIGN] Assignment Fault: { http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure,lineNo=149,faultExplanation=Multiple http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure,lineNo=149,faultExplanation=Multiple results for expression: {OXPath10Expression return/zcoCecos/item[$i]/Ceco}
Any Idea why I get this error and the Bpel Process don't operate.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/800393#800393]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]