webMethods

webMethods

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
  • 1.  Issue with appendToRecordList used more than once in the loop

    Posted Tue December 31, 2002 03:48 PM

    Hi,
    I am trying to use 2 appendToRecordLists, one after the other, in the same loop, in order to capture 2 sets of values. However, the problem I am running into is that since the records are not actually appended as entries to the “toList” and there is a reference to the “fromList”, everytime the value changes, and the data gets crossed between the lists. How can I keep the 2 separate and yet get the individual recordlists for the 2 parameters? Your expertise in this area is solicited.

    Thanks in advance for all the replies.

    Anant


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


  • 2.  RE: Issue with appendToRecordList used more than once in the loop

    Posted Thu January 02, 2003 04:46 AM

    Did you try using appendToRecordList as a transformer in a map step instead?


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


  • 3.  RE: Issue with appendToRecordList used more than once in the loop

    Posted Thu January 02, 2003 09:04 AM


  • 4.  RE: Issue with appendToRecordList used more than once in the loop

    Posted Thu January 02, 2003 04:25 PM

    Hi,
    Cant we use some temporary variables to hold the data so that both the appendToRecordList steps generate seperate results?
    Thanks
    VR


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


  • 5.  RE: Issue with appendToRecordList used more than once in the loop

    Posted Thu January 02, 2003 05:04 PM

    VR is right on with using temp variables, and dropping toList/fromList/fromItem after the call to appendToRecordList.

    Keep in mind that lists hold references to objects. That means if you append a record to two lists then you have two lists that reference the same object. Changes to the object will be reflected in all references.

    If you want independent records within the two lists, then you need to clone the record and add the clone’s reference to one of the lists.

    HTH


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


  • 6.  RE: Issue with appendToRecordList used more than once in the loop

    Posted Fri January 03, 2003 02:40 PM

    As a side note:

    1. Create empty, temporary Record List variables before entering the loop using “Set Value…” and providing no inputs. [*]Do not specify an out-array in the LOOP step

    Inside the LOOP step, you should follow Rob’s suggestions above.


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