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

6.33Sequential consistency

Suppose input says:

[
  {
    "customerId": "C001",
    "sequence": 1,
    "status": "Active"
  },
  {
    "customerId": "C001",
    "sequence": 2,
    "status": "Suspended"
  }
]

Parallel processing could yield:

sequence 2 completes first
sequence 1 completes later

Final Salesforce state:

Active

which is wrong.

So if updates for the same entity must preserve order:

Parallel For Each

could be dangerous.

This is a great interview example.