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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Looping over two lists at the same time

    Posted 12/09/05 06:04 PM

    Hi all,
    I have a condition where i need to loop over two different document lists at the same time -
    Say FileList and another AccountList
    Is it possible to loop over FileList & AccountList at the same time such that i can work with -
    FileList[0] & AccountList[0] and then
    FileList[1] & AccountList[1] and so on.
    Both the list counts will always be the same.

    Thanks for the help.
    Shantanu


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


  • 2.  RE: Looping over two lists at the same time

    Posted 12/09/05 06:26 PM

    You can loop over one of them and use the pipeline variable $iteration to access an element of the same index from the other document list.

    Shubhro


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


  • 3.  RE: Looping over two lists at the same time

    Posted 12/09/05 09:46 PM

    Thanks Shubhro.
    I tried making it work the way you explained. But it works if we have a ablsolute vlaue for the index.
    Suppose i look over FileList
    and try to acccess the firts element of AccountList
    these variable substitutions do not work –
    %AccountList[$iteration]%
    %AccountList[%$iteration%]%

    But if i try %AccountList[0]% - this works.
    where did i go wrong … or is it possible to do recursive variable substitution in webMethods.

    Thanks
    Shantanu


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


  • 4.  RE: Looping over two lists at the same time

    Posted 12/09/05 10:01 PM

    Try this:
    Loop over FileList.
    Create a map step. Map from AccountList to any element you want in the pipeline. Since you have not looped over AccountList yet you should see something called “indices” in the property window. Edit that and say $iteration.
    let me know if this works.

    Shubhro


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


  • 5.  RE: Looping over two lists at the same time

    Posted 12/10/05 06:00 PM

    What version of IS/Developer are you using? The ability to use variables for array indices was introduced with Developer 6.1, I believe.

    Mark


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


  • 6.  RE: Looping over two lists at the same time

    Posted 12/10/05 06:32 PM

    Thanks Shubhro !!
    It worked like a charm.

    Mark, I am using IS/Developer version 6.1. So i could use the feature mentioned by Shubhro. Thanks a lot for your help.

    Shantanu


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


  • 7.  RE: Looping over two lists at the same time

    Posted 12/16/05 06:36 PM

    Hello,

    Yemi Bedu


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