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
  • 1.  Best approach to consolidate record

    Posted Tue July 29, 2008 03:11 PM

    Hi,

    I’m trying to figure the best approach to consolidate data. Okay, I have a document list that looks something like below:

    orderList
    orderList[0]
    field1 = 1
    field2 = 3
    refnum = 100
    orderList[1]
    field1 = 2
    field2 = 5
    refnum = 200
    orderList[2]
    field1 = 3
    field2 = 4
    refnum = 200

    Each refnum should be unique. The above list would consolidate to:

    orderList[0]
    field1 = 1
    field2 = 3
    refnum = 100
    orderList[1]
    field1 = 5
    field2 = 9
    refnum = 200


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


  • 2.  RE: Best approach to consolidate record

    Posted Tue July 29, 2008 04:35 PM


  • 3.  RE: Best approach to consolidate record

    Posted Tue July 29, 2008 04:38 PM

    I’ve found a solution. Basically, loop through the list and check to see if the refnum equal the last refnum. If so, map field1 and field2. If it doesn’t, then appendToDocumentList. Then loop through the the list again and apply the same check and them add field1 and field2 to the list.


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


  • 4.  RE: Best approach to consolidate record

    Posted Wed July 30, 2008 04:00 PM

    If anyone has any input, I would greatly appreciated. The solution that I came up with doesn’t work 100%. Wondering if this could be accomplish through flow service or writing custom java service.


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


  • 5.  RE: Best approach to consolidate record

    Posted Wed July 30, 2008 04:04 PM

    You should be able to do this using FLOW.

    Can you describe the scenarios where your service does not work?


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


  • 6.  RE: Best approach to consolidate record

    Posted Wed July 30, 2008 08:27 PM

    I’ve done it all in flow. I believe I have it resolved this time. I had to have a placeholder for the first data and then added some more logic to see which $iteration I’m on and if the last id equals the current id and such. I think I could create the service a bit better but what I’ve done thus far will work.


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