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.  best practice loop

    Posted 04/02/08 02:48 PM

    hi Experts,

    Thanks for reading this thread.
    Question is the following:
    What is the best way to copy values from an input list to an output list?

    • loop over the input list and appendToDocList? (not what I would go for)
    • specify in-array and out-array on the loop? (probably my preferred solution)
    • no loop, just mapping of elements from the input list to the output list (is it safe to develop this way)
      Apparently, the third way does work (so far at least), it just looks so terribly wrong, and I can vaguely remember doing it and running into issues some time ago…

    Anybody care to comment on this?

    cheers,

    Loic


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


  • 2.  RE: best practice loop

    Posted 04/02/08 07:27 PM

    Using in-array and out-array on a loop is generally the way to go.

    appendToList tends to bog down when the number of elements gets to be several hundred (there are threads on this).

    If plain ol’ mapping does what you need, keeping elements in the right places and in the right order, then would seem to be little reason not to do it this way. Can you share the example you’re using?


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


  • 3.  RE: best practice loop

    Posted 04/03/08 06:51 AM

    If you use In-Array and Out-Array when there are conditions to be applied on mapping inside the loop, then you probably would get some empty or null docs in the final list. If all you need to do is one-to-one field mapping, then you can directly map the fields from List1 to List2, as Rob Said.
    Adn finally, this depends on your requirement.

    Cheers
    Guna


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


  • 4.  RE: best practice loop

    Posted 04/04/08 04:50 PM

    Hi Guna, Rob,

    Thanks for commenting on this. Pretty much the reaction I would have expected.
    For the sake of the example : it is indeed one-one mapping, just copying values from one list to the other.
    Apparently, the IS gets mixed up when you use transformers though, so like you both say - as long as its simple…
    Thanks for the input!

    Cheers,

    Loic


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


  • 5.  RE: best practice loop

    Posted 04/04/08 09:21 PM

    “IS gets mixed up when you use transformers though”

    This is a popular opinion but not accurate. Even if you call a service directly, instead of via a transformer, it won’t know how to deal with a list if that’s not what it accepts as input.


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