The simplest demonstration of Workflow Pause. The workflow loops, sleeping on a timer each iteration. While it is paused the timer does not advance and the iteration count stops; unpausing resumes it.
Workflow Pause is experimental. The dev server must be started with the pause flag enabled — see the workflow_pause README for prerequisites. First see the main README.md for general prerequisites.
Run the worker in one terminal:
uv run workflow_pause/basic/worker.pyStart the workflow in a second terminal:
uv run workflow_pause/basic/starter.pyWatch the worker terminal log "Completed iteration N". Now pause it:
temporal workflow pause -w pause-basic-wf --reason demoThe iterations stop — no new "Completed iteration" lines appear. Confirm it is paused:
temporal workflow describe -w pause-basic-wfThe output shows a Pause Info section. Now unpause it:
temporal workflow unpause -w pause-basic-wfThe worker resumes logging iterations and the workflow runs to completion.