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

Referring to an array index in a label BRANCH

  • 1.  Referring to an array index in a label BRANCH

    Posted Tue May 13, 2003 10:54 PM

    size = sizeOf(myRecList);
    /myRecList[%size%-1]/field1:BRANCH (evaluate labels = true)
    ABC:SEQUENCE
    BLAH…BLAH…BLAH…

    I am looking at the value of the field1 in the last index of myRecList. This does not seem to work! Any help appreciated.

    thanks
    ck


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


  • 2.  RE: Referring to an array index in a label BRANCH

    Posted Wed May 14, 2003 01:18 AM

    Evaluate labels = true specifies to evaluate the labels of child steps, not the label of the branch statement itself. Also, to refer to an array var, the syntax is %/myRecList[0]%. This prohibits the use of %size% for the index value. You’ll need to use another technique. Try this:

    size = sizeOf(myRecList);
    size = subtractInts(size, 1);
    rec = getRecordListItem(size);
    BRANCH: /rec/field1 (eval labels = false)
    …ABC:SEQUENCE
    blah, blah, blah


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


  • 3.  RE: Referring to an array index in a label BRANCH

    Posted Wed May 14, 2003 01:25 PM

    Try this:
    size = sizeOf(myRecList);
    MAP: variable1 = /myRecList[%size%-1]/field1
    variable1:BRANCH (evaluate labels = true)
    variable1 == “ABC”:SEQUENCE
    BLAH…BLAH…BLAH…

    Thanks


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