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

Duplicate Documents in Document list

  • 1.  Duplicate Documents in Document list

    Posted Wed April 04, 2012 12:33 PM

    Hi All,

    I need to delete the duplicate documents for the document list .

    Suppose I have list of document.

    ID Name Age
    2001 ABC 21
    2222 XYZ 22
    2001 ABX 21

    I need only distinct document…means only First and second…

    Any Idea…


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


  • 2.  RE: Duplicate Documents in Document list

    Posted Fri April 06, 2012 09:56 PM
    1. You might get some idea from the below link
      [url]wmusers.com

    2. You can search to find out ‘how to remove duplicates from array’ - logic remains the same, it’s just that you have to replicate using different services in webMethods

    3. Works, but may not be ‘the best’ way to achieve what you are looking for!
      First, sort using ps.util.list:sortDocumentListByKey from PSUtilities package
      Create a temporary docList and also a “key”
      Loop over the sorted doclist as input array and start building the the final output array using ‘appendToDocumentList’ after verifying the “key” with previous value in the loop. Just like iteration 0 of the key to be checked with iteration 1 so that they don’t repeat again!

    hope it helps!


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