BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
12 / 81 · Module 6 — Mule Routing and Orchestration · filtered: interview← prev⊞ allnext →

6.10Variables inside loops

Suppose you want to count failures.

Conceptually:

vars.failureCount = 0

For Each
    ↓
process item
    ↓
if failed
   increment failure count

However, mutable state becomes trickier when parallelism enters the picture.

That's one reason to avoid casual use of shared variables in concurrent processing.