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.  how to add string lists

    Posted Thu August 12, 2010 01:30 PM

    Hi,Please can you say how to add two string list and store that result in string list.each string has five elements and how to add document list also ?


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


  • 2.  RE: how to add string lists

    Posted Thu August 12, 2010 02:00 PM

    Hi Vannur,

    1.WmPublic/pub.list:appendToStringList
    Map the Stringlist1 to toList serviceIn parameter and stringList2 map to fromList then serviceOut parameter toList parameter contains the both values.

    do the same proceess for documentList also
    2.WmPublic/pub.list:appendToDocumentList


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


  • 3.  RE: how to add string lists

    Posted Thu August 12, 2010 06:07 PM

    Hi jeevan,sorry because I did not explain briefly,I want add two stringlist values as per their array position,i.e I expect as per below type,please can you say alternate way…

    sl1[0]=10; sl2[0]=10; output string list sout[0]=20;
    sl1[1]=20; sl2[1]=20; sout[1]=40;
    sl1[2]=30; sl2[2]=30; sout[2]=60;
    sl1[3]=40: sl2[3]=40; sout[3]=80;
    sl1[4]=50; sl2[4]=50; sout[4]=100;


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


  • 4.  RE: how to add string lists

    Posted Thu August 12, 2010 10:52 PM

    one way to achive it:

    inputListA
    InputListB

    OutputList

    Loop over inputListA (with no output array)
    {
    $Iteration = IterationA
    Loop over InputListB (with output array as OutputList)
    {
    $Iteration = IterationB
    If (IterationA=IterationB) —Implement with branch
    {
    a+b = tempout – (Use pub.math.addInts)
    appendtoStringList/DocumentList (append tempout value in from item and constiture your outputList)
    }
    }

    – Hope its simple n understandable, let me know if you got qustions :stuck_out_tongue:

    cheers!
    nD


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


  • 5.  RE: how to add string lists

    Posted Fri August 13, 2010 07:53 PM

    In my opinion, your best bet would be to probably do it in Java. Here’s sample code for a Java service that takes two String Lists, a and b, and outputs c. NOTE: the code assumes b is the same length as a.

    Now if you want to stick with Flow, you can do something similar with three simple steps. Suppose the service takes the same inputs, a and b, and outputs c:

    That’s it!

    Good luck,
    Percio


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