Repeating the same steps across a whole collection is one of the most fundamental ideas in programming. Sim gives you two blocks for it: the Loop block and the Parallel block. They do the same job and differ only in how they run.
What you will learn
A container over a collection
Drop blocks inside a Loop or Parallel and hand it a collection; it runs those blocks once for every item.
Loop runs one at a time
The Loop block iterates sequentially, item by item in order, when each step can depend on the last.
Parallel runs concurrent batches
The Parallel block runs independent items concurrently, using a configurable batch size.
A block that holds blocks
A Loop (or Parallel) is a container, a block you drop other blocks inside. You hand it a collection, and it runs whatever's inside once for every item in that collection, turning a single step into many.
Here's the shape of it: a container wrapping the blocks it repeats over the collection:
What each run knows
Inside the container, every iteration gets the current item to work on (and its index). That's how one lane of blocks becomes a run per lead, per row, or per file: the steps stay the same, the data changes each pass.
Sequential or concurrent
- Loop runs items sequentially: one finishes before the next begins. Use it when an iteration depends on the previous one or the calls need to stay in order.
- Parallel runs independent items in concurrent batches. Set Batch Size from 1 to 20; larger collections run in successive batches. Choose a size that fits the service you are calling.
Swapping the container
Because the two blocks share the same shape, you can swap a Loop for a Parallel (or back) without rewiring anything inside. Same logic, different execution, sequential or concurrent, chosen by which container you wrap it in.