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

Appending Recods in version 351

  • 1.  Appending Recods in version 351

    Posted Tue September 16, 2003 11:50 PM

    I have read a number of posts on this subject. None seem to touch on the problem at hand. I have created a flow that does the following. First I query (execSQL) a DB table based on an input value. This returns 0 - n rows. (works fine). Next I loop on the recordlist returned form the first DB call and execSQL for each row. This call returns 1 - n rows on each loop. What I’m trying to do is accumulate the records from this second record list. Each subsequent loop will produce 1 - n additional records to be appended. I have had no luck getting this to work. For each loop iteration I can get all records retrieved by the execSQL appended (basically by mapping the recordlist returned), but each supsequent loop overwrites the last loop’s appends.

    invoke getFirsRecords
    loop (in-array = firstRecords)
    invoke getSecondRecords

    From here I have tried everything I have read. For example:

    invoke getFirsRecords
    loop (in-array = firstRecords, out-array = secondRecords)
    invoke getSecondRecords
    map (results -> secondRecords)

    This one returns the secondRecords retrieved on the last iteration only. I have tried appending here too, no luck.

    I’ve tried:

    invoke getFirsRecords
    loop (in-array = firstRecords)
    invoke getSecondRecords
    loop (in-array = secondRecords)
    map (secondRecord -> tempRecord)
    map (tempRecord -> appendtoList -> allsecondRecords)
    map (drop tempRecords)

    This one returns only the last record retrieved, less information than the approach above.

    I have spent quite a bit of time looking through posts here and elsewhere. I have tried various approaches based on posts and what seemed to make sense. No luck. I understand the difference between a reference and value copy. What doesn’t seem to be working is the append. If I step into this and watch the output, it looks like values are never appended but rather always inserted at the front of the allsecondsRecords. I am also wondering if these techniques work for our older version 3.5.1.

    Any direction is appreciated.


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


  • 2.  RE: Appending Recods in version 351

    Posted Wed September 17, 2003 03:41 AM

    OK, got this working. I was using appendToRecordList as a transformer. Once I invoked it separately, the append worked correctly


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