webMethods

webMethods

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.  Looping over record list

    Posted Thu August 01, 2002 05:34 PM

    Why is it that if my record list has only one element, the loop fails to execute my code to process that single element?


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


  • 2.  RE: Looping over record list

    Posted Mon August 05, 2002 07:21 AM

    The loop should work for a list, even with one element only. Probably your loop fails because the element is not element of a list but a single structure. Make sure that the documentToRecord service that should produce the recordList is configured correctly.


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


  • 3.  RE: Looping over record list

    Posted Mon August 05, 2002 06:38 PM

    huub,
    Could you please give a few more details. Still cannot loop over the single record in a record list.


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


  • 4.  RE: Looping over record list

    Posted Mon August 05, 2002 08:15 PM

    I believe what happen here is that when it is only one element, the XML was parsed as a single element instead of an array – if you trace your code with one element, you will find out.


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


  • 5.  RE: Looping over record list

    Posted Tue August 06, 2002 03:10 AM

    I had a similar problem. Try to set the recordname in the recordName field of documentToRecord (eg. FolderName.SubFolderName:RecordName)
    Also set makeArrays to false.
    That worked for me!

    Hope it helps,

    Holger.


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


  • 6.  RE: Looping over record list

    Posted Tue August 06, 2002 07:31 PM

    Thanks for the valuable input. My code is not working. I set the recordName and set the makarrays variable to false and all is ok.

    Thanks again to all who responded.


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