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.  Record count while Looping and branching

    Posted Sat July 24, 2004 11:25 PM

    I have folowing Senario:
    I’m looping a recordset of 10 records,
    Then branching it into 2 categories based on some criteria and finally writing them into two different recordsets.
    …my question is is there any way of putting record Num to each record under a record set .
    i.e if the main recordset has 10 record and first child recorset has 3 records then records in first child set shld have num 1,2,3 and in second it shld be 1,2,3,4,5,6,7.
    I dont want to loop agian on the child recordsets once they the done to put the recordnum(using $iteration value).

    is there any other way out…i.e to store value somewhere and keep on adding 1 when we write into child record set ? .


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


  • 2.  RE: Record count while Looping and branching

    Posted Mon July 26, 2004 01:27 AM

    Use the pub.math:addInts service to keep on adding1(ie to store the value) and this logic should be inside the loop…

    HTH,


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


  • 3.  RE: Record count while Looping and branching

    Posted Mon July 26, 2004 05:35 PM

    is there any way to keep the variable value, when u enter the loop again…because every time loop iterates …the value is getting initilized.
    so is there any way to declare the variable which will behave like $iteration variable…i.e keeping the old value


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


  • 4.  RE: Record count while Looping and branching

    Posted Tue July 27, 2004 05:55 PM

    Ran-

    I've attached a simple skeleton package that demonstrates the behavior you are requesting.  It uses very simple record structures (with members data and number) it uses data to decide which sub-list the record should be placed in and it updates number to count up from 1 independently for each sub-list.  If you have any questions just post them and I'll help you where I can.
    

    ListSeparator
    wMUsersSolutions.zip (8.3 k)

    -Dave


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