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 Practise Mapping Question

    Posted Wed May 03, 2006 11:03 AM

    I have to map Souce to Target Mapping

    Source Structure

    Header 1:M Detail (Detail is a loop inside Header Document)

    Detail has 10 Line Item Type (program goes 10 times inside loop), based on this Line Item type I need to extract the $ amount (another field) at Detail level, sum up the $ amounts for all line items and then map it to header Level Total $ amount.

    I know couple of options, store the $ amount in a 10 variables and them sum it up inside Detail loop 9 times using add built in service.

    Write a java code to add the sum.

    I am looking for the Best Practise recommended by webMethods.
    Any suggestions!


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


  • 2.  RE: Best Practise Mapping Question

    Posted Wed May 03, 2006 12:39 PM

    Hi

    The best practises could be found in the advantage site, there the GEAR methodology lists some of very useful tips .

    Cheers
    Jeevan


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


  • 3.  RE: Best Practise Mapping Question

    Posted Wed May 03, 2006 02:46 PM

    Guest,

    You can build this standard logic in a flowservice itself.Here it is if worth

    Before entering in the loop initialize a variable eg:total_lineAmount=0 and inside your loop depending on your LineItemType extract $amount.

    Invoke addInts map total_lineAmount to num1,$amount to num2 and map output value to total_lineAmount.Once your loop iteration is done you will have sum of all lineitems amount in total_lineAmount.Finally map it to Header total amount.

    Remember please dont drop total_lineAmount variable inside the loop it will hold its previous value in the pipeline to sum lineitem amounts.

    HTH,
    RMg


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


  • 4.  RE: Best Practise Mapping Question

    Posted Wed May 03, 2006 03:26 PM

    Sounds like an interview question to me. If so, my advice is not to read any documentation, work any examples or actually learn the product first. Just wing it. I’m sure it will be OK.


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


  • 5.  RE: Best Practise Mapping Question

    Posted Thu May 04, 2006 06:04 PM

    Thanks RMG for the solution.


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


  • 6.  RE: Best Practise Mapping Question

    Posted Thu May 04, 2006 06:05 PM

    RMG suggestion works…FYI…It wasn’t an interview question…


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


  • 7.  RE: Best Practise Mapping Question

    Posted Thu May 04, 2006 06:28 PM

    Sorry for the misunderstanding. We’ve had way too many questions here lately fishing for answers to interview or cert exam questions without willingness to do any real work first. I’ll take a sedative and back away a bit. :slight_smile:

    A best practice would be to not use a java service to do this.


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