Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536.1K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
Xpath evaluating to multiple nodes after using for-each activity

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>