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
Expand all | Collapse all

append to StringList

  • 1.  append to StringList

    Posted Fri May 21, 2010 09:52 AM

    append to string list storing only the last value…

    need to loop over document list and inside that i have one document which has some fileds, i would like to strore one perticular field value to list…i.e append to String list …after each iteration…

    But its storing only the last value to ToList. How can i do that?

    need help ??


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


  • 2.  RE: append to StringList

    Posted Fri May 21, 2010 01:18 PM

    hi prasanth,

    Drop the from item inside the loop


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


  • 3.  RE: append to StringList

    Posted Sat May 22, 2010 12:59 PM


  • 4.  RE: append to StringList

    Posted Sat May 22, 2010 02:54 PM

    As Shan suggested you most likely are not dropping the variable. Why don’t you send us the screen shot of your pipeline where you are using append to String list function ?


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


  • 5.  RE: append to StringList

    Posted Sat May 22, 2010 06:55 PM

    please find the screen shot… i need the two values to be stored in string list.

    i.e aa and bb. but list contains only last value i.e bb after iterations.

    help me plz.
    1.zip (11.6 KB)


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


  • 6.  RE: append to StringList

    Posted Sat May 22, 2010 07:18 PM

    and also need how to convert a document list to string list


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


  • 7.  RE: append to StringList

    Posted Sun May 23, 2010 11:58 AM

    Prasanth,

    Attach is the example how you to use to appendToStringList service, also if you would have check the “Built In Services Guide” you would have solve this issue long before so I would recommend to check the documentation of the service before using it.

    Also there is no builtin service which converts documentList to stringList, but if you want to do that, you can simply loop over the documentList and append that to stringList like you are doing in the above example but with any branch step.
    appendToStringList Example.jpg


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


  • 8.  RE: append to StringList

    Posted Tue September 15, 2020 03:31 AM


  • 9.  RE: append to StringList

    Posted Tue September 15, 2020 08:14 AM

    Hi Lavanya,

    can you explain your problem please?
    Please provide a screenshot of your loop definition (esp. values for input array and output array).

    I just have rebuilt your service as shown above on wM 9.12 and it works.

    Regards,
    Holger


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


  • 10.  RE: append to StringList

    Posted Tue September 15, 2020 10:07 AM

    Hi Holger,

    Thanks for your reply!
    I wanted to know that my input consists of String list of A,B,C . But output string list consists of only lowercase ‘a’.

    Please find the below snip for your reference.


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


  • 11.  RE: append to StringList

    Posted Tue September 15, 2020 10:11 AM

    Hi Lavanya,

    you have to click on the output list and scroll down a little bit (eventually moving the divider bar up a little bit) to see the complete content of the list.
    In the overview it is only showing the first element of the list.
    Same applies to the input list.

    Regards,
    Holger


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


  • 12.  RE: append to StringList

    Posted Tue September 15, 2020 10:07 AM

    Hi Lavanya,

    Even when using a ForEach-Transformer (while disabling the loop-variant) with embedded toLower transformer I get the expected results.

    Regards,
    Holger


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


  • 13.  RE: append to StringList

    Posted Tue September 15, 2020 09:52 AM

    Hi Lavanya,

    your screenshot already showing the result as lowercase, so any other problem you forgot to mention here.

    Regards,
    Firoz N


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


  • 14.  RE: append to StringList

    Posted Tue September 15, 2020 10:08 AM

    Hi Firoz,

    Thanks for your reply!
    input string list have A,B,C
    But output String list have only ‘a’ ? why not lowercase ‘b,c’


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


  • 15.  RE: append to StringList

    Posted Tue September 15, 2020 10:15 AM

    Lavanya,

    Ensure your mapping string input to the input parameter of toLowerCase built-in service and output to an output string variable. If you properly define input and output array for the loop then put a map step under the loop, they will show up correctly.

    You can cross verify this once if you still see only ‘a’ in output

    Regards,
    Firoz N


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


  • 16.  RE: append to StringList

    Posted Tue September 15, 2020 10:24 AM


  • 17.  RE: append to StringList

    Posted Tue September 15, 2020 10:31 AM

    If it is working whatever might be the issue, then we should be good. Thanks for letting us know


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


  • 18.  RE: append to StringList

    Posted Tue September 15, 2020 11:09 AM

    As far as I can tell this was just a displaying issue in Designer in the results view, where in the pipeline overview the lists are only displayed with their first item.
    When clicking on one of them their complete content will be shown below the pipeline overview.

    Regards,
    Holger


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