Study guides / Workflow Implementation / Expert

Reason about concurrency and recovery

Advanced workflow design is about preserving business invariants when requests overlap, processes crash, and dependencies disagree.

Usevra Learn · learn.usevra.com/guides/workflow-expert

Make the invariant atomic

A check followed by a separate write is vulnerable to concurrent requests. For a limited resource, the availability check and allocation must share an atomic transaction or supported conditional update. Adding a second read does not turn a non-atomic sequence into a lock.

Separate intent, execution, and reconciliation

Persist an approved intent before executing an external effect. Track delivery and acknowledgement, and reconcile uncertain outcomes. Transactional outbox patterns help coordinate database changes with message delivery, but recipients still need duplicate handling.

Budget for overload and degradation

Define timeouts, concurrency limits, retry budgets, and a safe degraded mode. Unlimited retries can amplify an outage. Monitor business outcomes such as duplicate orders and stuck approvals as well as latency and error rates. Test recovery from failures between individual steps.

A worked example

Two requests compete for the last available booking.

Use an atomic reservation at the source of truth. Only the winner can create the approved booking. Make subsequent confirmation retryable, and reconcile a lost response using the reservation ID.

The point: Correctness comes from the protected state transition, not from how quickly the checks run.

Check your understanding

These are learning exercises, separate from the scored exams. Choose an answer, then check the explanation.

1. Two workers read one remaining slot. Which control preserves the limit?
2. A dependency is overloaded. Which response reduces amplification?

Before you take the exam

Explain these concepts in your own words, work through a different example, and describe why the tempting alternatives fail. Use the references to go deeper.

Expert assessment: 60 questions · 90 minutes · 90% pass mark. Check the assessment page for current rules.
View the assessment ↗

Reading progress stays on this browser. It is not an exam result.