IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Multi level nested loops

  • 1.  Multi level nested loops

    Posted Wed November 28, 2018 04:14 AM

    Hi,

    My document structure is->
    Orders [ DocumentList - 0 or more]
    Palette [ DocumentList - 0 or more]
    Lpn [ DocumentList - 0 or more]
    LpnDetails [ DocumentList - 0 or more]
    LpnItemAttributes [Record]

    Now, I’m looping as follows:
    Loop /Orders
    Loop /Orders/Palette
    Loop /Orders/Palette/Lpn
    Loop /Orders/Palette/Lpn/LpnDetails
    Perform mapping of LpnItemAttributes

    This works fine as long as each of Orders, Palette, Lpn, LpnDetails have multiple records.

    But suppose I’ve following structure.
    Orders [6 records]
    Palette [1 record]
    Lpn [ 1 record]
    LpnDetails [1 record]

    It loops only through Orders and doesn’t loop through others for LpnItemAttributes mapping.
    I’m passing xml data as string and converting to node then document.
    That time Palette, Lpn and LpnDetails are not getting converted to seingle record list. But get converted to single record.

    Any solution?

    Thanks,
    Shyam


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Multi level nested loops

    Posted Wed November 28, 2018 04:48 AM

    xmlNodeToDocument has the facility to specify arrays parameter wherein you can specify names of elements to appear as arrays irrespective of how many times they occur.

    Sorry for the oversight.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods