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.


#TechXchangePresenter
 View Only
  • 1.  How to sort DocList using FlowService

    Posted Fri March 16, 2007 04:44 AM

    Hi All,
    I have a DocList like
    DocList
    -Doc
    –Name
    –Age

    I want to sort this DocList using FlowService by order of Age
    I dont want to use java service

    Thanks a lot


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: How to sort DocList using FlowService

    Posted Mon March 19, 2007 09:49 AM

    Hello,
    You should create a merge sort or a quick sort (recommend). For quicksort, you pick the value at either the middle of the list or the middle minus one and call it pivot. Then make two lists that are either smaller than or equal to pivot or greater than pivot. You then recursively sort the smaller lists. When You detect that the list you have is one element or less, return that list. When you merge the lists upward, it should of course be [lower , higher]. You should try to actually do the sorting in place on the main list. You can do this by tracking the lower and upper index for a partition and bounds checking in the routine to only sub sort that partition space. Without this you will still sort but will have 2^(n-1) +1 : [where n is number of elements in start list] lists created. Good day.

    Yemi Bedu


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 3.  RE: How to sort DocList using FlowService

    Posted Mon March 19, 2007 12:13 PM

    Hello,
    I was wrong with the list growth. It is only 2n - 1 which is O(n) expensive. Not an issue is that regard. And the size will about 2n (twice the memory). So that should help to make a better judgement and implementation choice. Good day.

    Yemi Bedu


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 4.  RE: How to sort DocList using FlowService

    Posted Wed March 19, 2008 03:18 AM

    can u tell me the flow steps to be added…


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB