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

Hi Plz give some Example on Out Array of Loop

  • 1.  Hi Plz give some Example on Out Array of Loop

    Posted Fri June 02, 2006 10:44 AM

    Hi ALL

    Could anybody plz give some Example on OutArray of the Loop and how it works.

    Thanks
    Sreekanth


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


  • 2.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Fri June 02, 2006 04:33 PM

    Try building this service.

    Svc Name: tryLoop
    Svc input: inList (stringList)
    Svc output: outList (stringList)

    first statement: LOOP
    LOOP property (inArray): /inList
    LOOP property (outArray): /outList

    second statement: MAP (indented under the LOOP)
    connect PI variable (inList) to PO variable (outList) [note, within the LOOP both varables appear as type string, not stringList]

    Run this service
    Enter some values for inList
    Observe that outList contains an entry for each entry in inList.
    tryLoop.zip (3.97 KB)


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


  • 3.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Thu June 08, 2006 11:24 AM


  • 4.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Thu June 08, 2006 04:36 PM

    Hi,
    In the inner loop i have given input as
    “Ram Naresh”, then can u pls tell me how to take RAM & NARESH in two seperate strings, now it is showing the RAM in String[0] and Naresh in string[1] so when i take the two strings and map them i am getting NARESH in the both the strings.

    thanks,
    Hari


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


  • 5.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Thu June 08, 2006 04:52 PM

    Hi Hari,
    Can you post detail what did you do?

    As per your post you have stringList[0]=RAM and stringList[1]=Naresh

    Try something like:

    MAP (init with blank a stringList variable called outStringList)
    LOOP (inArray: /stringList; outArray: /outStringList)
    —> MAP stringList to outStringList
    MAP (placeholder). Here you should find that outStringList[0]=RAM and outStringList[1]=Naresh

    HTH,
    Bhawesh


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


  • 6.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Thu June 08, 2006 07:26 PM

    Hi,
    yes i am getting the same way but take two strings as firstname & lastname which are of type strings, now i want to map the output string list[0] to firstname and output string list[1] to lastname.

    for ex:

    Input string list:

    inputstringlist[0] Ram
    inputstringlist[1] Naresh

    output string list:

    outputstringlist[0] Ram
    outputstringlist[1] Naresh

    Now i want Ram in firstname and Naresh in lastname in which firstname and lastname are strings

    Thanks
    Hari


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


  • 7.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Thu June 08, 2006 07:46 PM

    Hari,

    If your output stringlist holds Ram and Naresh and you want to map to 2 seperate string variables then when you map link to firstname and lastname in link properties specify index[0] for Ram and [1] for Naresh then you should see the pipelineout as expected.

    HTH,
    RMG


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


  • 8.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Fri June 09, 2006 01:13 PM

    Hi,
    while i am using the loop i am getting the input stringlist as string with in the loop, so when i map the input stringlist to the firstname and lastname it is showing the zeorth element of the stringlist for both.

    Thanks,
    Hari
    tryLoop.zip (4.26 KB)


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


  • 9.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Fri June 09, 2006 02:37 PM

    Hi Hari,
    When rmg suggested “map link to firstname and lastname in link properties specify index[0] for Ram and [1] for Naresh”.

    Do this MAP step after you come out of the loop.

    • Bhawesh.

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


  • 10.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Fri June 09, 2006 02:46 PM

    When you loop on stringlist then inside the loop you can map directly the strings firstname,lastname variables to the target variables the map link properties will not show any indexes it says fields not indexable.

    How many fields are there in your stringlist? I am confused of your statements.

    HTH,
    RMG


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


  • 11.  RE: Hi Plz give some Example on Out Array of Loop

    Posted Fri June 09, 2006 03:41 PM

    Hi,

    Thanks for ur help I got it. Actually I am splitting into three names (firstname, middlename, last name) but by mistake i have specified two name in the group.

    Thanks,
    Hari


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