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

Remove dulicated from documentlist

  • 1.  Remove dulicated from documentlist

    Posted Fri February 18, 2005 09:25 PM

    Hi,
    I need some pointer on the best way to remove the duplicate records from the documentlist. The document list is having about 3000 documents. I can do this with the help of some loop but it seems not to be a good idea as far as performance is concern.

    Please Advice.

    Thanks
    Rameshwaram


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


  • 2.  RE: Remove dulicated from documentlist

    Posted Sat February 19, 2005 07:06 AM

    Rameshwaram

    I think using .,… recordList to record, or recordListToTable would be a good option becos, these services works on Key values so that u can eliminate the dupilcates…Do some R&D on them…

    Please let me know if this helps…!!!

    Thanks
    Rakesh


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


  • 3.  RE: Remove dulicated from documentlist

    Posted Tue February 22, 2005 03:12 AM

    There is a sort method in com.wm.data.IDataUtil
    IData sortIDataArrayByKey(IData dataArray, String key, int compareType, boolean descending)

    If there is a specific key who’s value means the documents are the same, you can sort and then do a loop through adding the unique documents to a real List object and then convert that List to an IData (i.e. a documentList).

    See WmSamples sample.complexMapping.largeDoc.messageBuilder:createList, addToList, listToArray for methods that implement a real List (vector) object.

    HTH,
    Fred


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