BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
112 / 278 · Module 6 — Mule Routing and Orchestration · filtered: code← prev⊞ allnext →

6.6For Each

For Each processes every element in a collection.

Input:

[
  {"id": "C001"},
  {"id": "C002"},
  {"id": "C003"}
]

Flow:

payload[]
   ↓
For Each
   │
   ├── C001 → processors
   ├── C002 → processors
   └── C003 → processors

Conceptually:

for (const customer of customers) {
    await processCustomer(customer);
}

The important characteristic:

For Each is sequential.