Loop Block

Use the Loop block, along with the Loop Exit Block, to add a simple loop in your flow. The Loop block is similar to an infinite Do-While loop. A Loop Exit is always required within a Loop block.

Loop and Loop Exit are generally used with an If/Else statement to loop until a condition is met and then continue processing the next block outside the loop.

Note: In TIBCO Cloud™ Integration - Connect, the Loop block is set to stop after ten thousand (10,000) iterations. If you need to change this limit, contact TIBCO Support.

Loop Block Example

A Loop block can be useful when inserting child records. Assume you have Sales Order records with child Sales Order Detail records within the Loop:

  1. If salesorderid equals salesorderdetailsid, meaning if the Detail record is a child of this Sales Order.
  2. Then, insert a new salesorderdetail record into the target.
  3. Else, end the loop and continue to the next salesorder record.
Tip: Unless your flow is designed to get a new record, TIBCO Cloud™ Integration - Connect processes the same record on each iteration.
Note: To improve the readability of a flow, select the collapse () or expand () icons on the block to display or hide all of the blocks included within the selected block.

Block Properties - General Tab

From the General tab, you can change the Block Label and add a description.

Block Properties - Errors and Warnings Tab

If there are any errors or warnings for this block, the Errors and Warnings tab displays the number of errors or warnings in the tab name. See Block And Flow Errors And Warnings.

Once you have corrected the errors, select the Validate button to update the Errors and Warnings tab.

Related Topics

Control Blocks

If/Else Block

Loop Exit Block