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.  Remove record in IS document

    Posted Thu April 30, 2009 05:20 PM

    Hello All,

    I’m having a brain fart. This should be simple. I have IS document which I wuold like to do some record cleanup. Does anyone know how to remove a record from a document based on the column names? For example, if column1 is null, remove the record.


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


  • 2.  RE: Remove record in IS document

    Posted Thu April 30, 2009 06:32 PM

    Loop over the list and for each record you want to keep use appendToDocumentList to create a new list.


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


  • 3.  RE: Remove record in IS document

    Posted Thu April 30, 2009 07:58 PM

    Thanks Reamon. That’s exactly what I did before the email. I knew it was something really simple. Thanks again for the response.


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


  • 4.  RE: Remove record in IS document

    Posted Fri May 01, 2009 05:52 AM

    pthcincy,

    if you are working on big set of records avoid using appendToDocumentList service. This service do a full allocation of object.length+1 and a copy of the contents on each call. This is fine for arrays with tens or maybe hundreds of items, but bogs down when called often on large arrays.

    Instead add your IData to linked list and convert it to array after the loop. PS utilites has these services provided under list folder.

    My two cent !


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


  • 5.  RE: Remove record in IS document

    Posted Fri May 01, 2009 06:21 AM

    Agreed. If the list is large (800+ or so, YMMV) it can become quite slow. Using one of the Java collection classes with simple IS wrapper services (new list, add item, convert to doc list) will perform much better for larger lists.


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


  • 6.  RE: Remove record in IS document

    Posted Fri May 01, 2009 09:14 PM

    Thanks jitengupta for the suggestion. I will use the PSUtilities for linked list instead vs using appendToDocumentList.

    Does anyone have any objection for using string table to store data temporary? There will be over thousands of rows store in a string table. Why would anyone ever want to use string table?


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