[jboss-user] [jBPM] - Use For Each in Bpel Process

Sebastian Morales do-not-reply at jboss.com
Fri Mar 1 15:29:02 EST 2013


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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130301/29befd79/attachment.html 


More information about the jboss-user mailing list