Forum Stats

  • 3,759,046 Users
  • 2,251,494 Discussions
  • 7,870,477 Comments

Discussions

Xpath evaluating to multiple nodes after using for-each activity

User_3YQO6
User_3YQO6 Member Posts: 21 Red Ribbon

Hi,

I have an XML node in the format below in which I am trying to use a counter to get each tag of <ImageInfo> and write an output to different csv files. However, I am getting an error in the Assign statement :


In my assign statement I am trying to break the values as follows :

Source

$VarImgCopy/ImageInfo/ImageList/SourcePrefix[$n]


To a Target variable called SourcePrefix. SourcePrefix is an element inside the <ImageInfo>. n is my counter in my for loop. I do see it gets the right number of values in my for each loop : I have 12 rows of data for <ImageInfo> but am unable to get the values of one of the elements one by one. Can anyone tell me what I am doing wrong here ?


Thanks

ForEachImage

[2021/08/28 19:54:42]

BPEL "forEach" activity: startCounterValue is "1", finalCounterValue is "12".



Exception is thrown because the from-spec at line 307 is evaluated to multiple nodes

-

<details>

-

<from-spec>


<from xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">$VarImgCopy/ImageInfo/ImageList/SourcePrefix[$n]</from>

</from-spec>

-

<variable>


<message>VarImgCopy</message>

</variable>

-

<fault>


-

<bpelFault>

<faultType>0</faultType>

<selectionFailure xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"/>

</bpelFault>

</fault>

</details>




<VarImgCopy>

-

<ImageCopy xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/" xmlns:ns2="http://schemas.oracle.com/bpel/extension" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/TollInfo" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/TollService/TollProcessByTransactionID/SelectTolls" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:client="http://xmlns.oracle.com/TollService/TollProcessByTransactionID/ProcessTolls">

-

<ImageInfo>

<MessageID>TOLL</MessageID>

<RTCSTransactionID>2008210704155641691</RTCSTransactionID>

<ImagesCaptured>1</ImagesCaptured>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

+

<ImageList></ImageList>

</ImageInfo>

</ImageCopy>

</VarImgCopy>