Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Xpath evaluating to multiple nodes after using for-each activity

Syed QadriAug 29 2021

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>

Comments

Post Details

Added on Aug 29 2021
0 comments
295 views