Skip to Content

Access to results after for-each atom

Hi all,

I have a integration scenario of invoices. Because of the items of the invoice manage serial numbers I need to query the SysSerial of each one in the receiver system in order to match with the serial number given. This process is achieved using a for-each atom, but the problem I have is how to access the result of each query, because the process generate a <bfa:unbranch> node and the xPath I try to use doesn't work.


Let's see:

the message after the for-each looks like this:

This is the process flow:

In atom4 I call for results of for-each

but the xPath doesn't work.

How can I access the node <SysSerial>?

design1.png (80.9 kB)
result-for-each.png (230.7 kB)
atom4-2.png (26.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 03, 2017 at 07:43 PM

    Here an answer from my colleague Bastian S., I tested in my scenario and it works fine!

    Please don’t use the graphical flow for your for-each, do it in xslt instead

    Here is an example of a transform atom3, the sql statements are separated by semicolon:

       <xsl:for-each select="$externalSalesDocumentDataQuery_sync/Item">
          <xsl:variable name="recipientid" select="./Product/RecipientID"></xsl:variable>
           SELECT "ItemCode", "UgpEntry" FROM "OITM" WHERE "ItemCode"='<xsl:value-of select="./Product/RecipientID"/>'; ==>Note the final ; in order to separate the sql sentences!

    In the sql atom, you need to reference to this transformation atom

    As result you’ll get the complete result of the sql statement and you’ll have access. From processing point of view it’s much more effective, please try to avoid these graphical for-each constructs if you can do it within xslt.

    Best regards Bastian.

    Add comment
    10|10000 characters needed characters exceeded