Queries succeed against a running workflow, but are rejected while the workflow is paused. Unpausing makes it queryable again.
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/queries/worker.pyStart the workflow in a second terminal:
uv run workflow_pause/queries/starter.pyQuery it while running — this returns the current count:
temporal workflow query -w pause-queries-wf --type current_countPause it:
temporal workflow pause -w pause-queries-wf --reason demoQuery again — it is now rejected:
temporal workflow query -w pause-queries-wf --type current_count
# Error: query was rejected, workflow has status: PausedUnpause it and the query works again:
temporal workflow unpause -w pause-queries-wf
temporal workflow query -w pause-queries-wf --type current_count