LESSON 23.12 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Checkpoints and resumable workflows
Eight payments survive a crash and a slow approval with a journal of checkpoints.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 23.12 · WORKFLOW BAY8 PAYMENTS · 10 STEPS · 11 CALLS
01
Stage 1 of 5 · State machine
A workflow pays the 8 payments in order. Each payment is a state machine: events move it between states.
Explain it simply
The workflow is a loop over the 8 payments, one at a time. Each payment sits in one state, a box on the chart. An event, such as an ok reply, moves it along one arrow. A solid arrow was used in this run; a dashed arrow was not.
A chart of seven states: queued, approval, charging, paid, rejected, expired and failed. Below it, worker 1 runs 10 steps. That is a charge for each paid payment, plus the ask and the answer for payment 5.
steps run livejournal and waitscrashes and errorsok and chargesdashed: replay, wait, unused, by service
Toy: 8 payments one at a time · a tool that fails 30% of calls · payment 5 needs a person
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The next state depends only on the state now and the event.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.