Associating a Script with a Loop

Scripts can be associated with processing loops in the Properties view for the task to which a loop has been applied.

Procedure

  1. On the General tab of the Properties view for the task, select either Standard Loop or Multi-instance Loop.
    Note: When using a multi-instance loop, you should set an additional instance expression which must evaluate to 0. When the loop has finished it looks to see if this exists. If you do not set this to 0, then your multi-instance loop will not be able to end.
  2. When either of these is selected the Loops tab becomes available. This tab specifies the scripts you can enter for each type of loop. Select JavaScript from the Script Defined As: field and enter the script itself in the area provided.

Result

See the TIBCO Business Studio Modeling User’s Guide for a full description of how to create a loop and the significance of the different types of script you can assign to it.