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
  • 1.  String list to record list

    Posted Wed November 05, 2003 03:13 PM

    I am facing a problem here while mapping from a string list to a Record list. I use the string array in may in-array inside the loop´s properties and the record array as the out-array. But the out-array takes only the last value of the in-array. Do you have any idea?


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


  • 2.  RE: String list to record list

    Posted Wed November 05, 2003 07:40 PM

    Raphael,

    Loop over your string list by making it the in-array. Add one map step in the loop that uses the pub.list:appendToRecordList service to add your string to a string value in the record list.

    HTH,

    Mark


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


  • 3.  RE: String list to record list

    Posted Wed November 05, 2003 08:04 PM


  • 4.  RE: String list to record list

    Posted Wed November 05, 2003 08:08 PM

    … and lastly, there’s the built-in service “pub.list:stringListToRecordList” which accepts a stringList and a keyname and produces a recordList with child nodes of the keyname you specify.

    -mdc


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


  • 5.  RE: String list to record list

    Posted Mon November 10, 2003 06:29 PM

    Mark
    Thanks a lot for your tips they really helped me.


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


  • 6.  RE: String list to record list

    Posted Mon November 10, 2003 08:42 PM

    Mark there is one problem, I used your first tip and it works very well when I have only one string list but i have three in this case how can I do


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


  • 7.  RE: String list to record list

    Posted Tue November 11, 2003 06:30 PM

    Raphael,

    Let me be sure I understand what you need to do. You have three string lists with the same number of elements and you want to combine them so that you have a recordlist with three child elements in each entry.

    For example you have three string lists strList1, strList2 and strList3 which each have 10 elements and you want to create a single recordlist, recList1, that has 10 child nodes each containing three strings (one from each of the source lists).

    If so, then the attached java service may get you started. You could also do this with Flow by first creating your recordlist with the right number of child elements and then looping over each string list in turn to assign the stings in each element of the record list appropriately.

    In this case, I think it is more straightforward to use a java service since you only have to loop through the lists once.

    Hope this helps,

    Mark

    MergeStringLists java service
    mergeStringLists.java (2.8 k)


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