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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Document sort

    Posted 01/23/06 04:33 PM

    I have a document with two fileds. I need to sort the document on one of the field (fld2 in example). Please let me know how to do this. I am using webMethods 6.1. Also, I tried IDataUtil.sortIDataArrayByKey but not working. Looks like I am not creating proper input document and feeding to this java method.

    eg:
    Document
    Fld1
    Fld2

    I appriciate your responce.

    Thanks,
    Brijesh


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


  • 2.  RE: Document sort

    Posted 01/23/06 04:51 PM

    It is possible to develop a java service that does this. I know of at least one regular wMUsers contributer who has done so.

    His approach involved building an IDataComparator class that implemented java.util.Comparator.

    Mark


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


  • 3.  RE: Document sort

    Posted 01/23/06 06:06 PM

    Yes as Mark said I would still go with writing Java service as sorting is a very time consuming and intensive process. I would rather use a quick sort algoritham java service and sort the document accordingly.


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


  • 4.  RE: Document sort

    Posted 01/25/06 12:58 AM

    Brijesh,

    I wanna make sure that I understand you correctly, cuz my answer will be subject to my understanding. When you say you have a document that you wanna sort, I believe you meant you wanna sort a documentList.

    I have used IDataUtil.sortIDataArrayByKey and it worked just fine for me. In fact, I was on my way to create a Java service for that - using a quick sort (which I had earlier used to sort a string list), but then realized that I was reinventing the wheel. Writing a Java service of your own is obviously one way to go, but if your requirement is as simple as you have put in your post, I think the sortIDataArrayByKey should take care of it.

    If you are sure that it isn’t working for you, post your sample data and I can try it out n let you know.

    HTH, Rohit


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


  • 5.  RE: Document sort

    Posted 01/25/06 04:38 AM

    See this post for a Java service that can sort a document list using a field within the document.
    [url]wmusers.com


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