Skip to main content

Module handlers

Module handlers 

Source
Expand description

Shared workflow operation handlers used by transports. Shared handler layer over Engine.

Module layout:

  • deploy — operator deploy (load/list/route/unload) handlers.
  • workflows — start/signal/query/cancel workflow operation handlers.
  • visibility — the shared list handler.
  • describe — describe-workflow handler.
  • runs — run-id resolution and terminal-status reads.
  • payload — required-field and envelope encode/decode helpers.
  • managed_workers — the managed-worker projection and failure mapping shared by GET /workers/managed and DeployService.
  • error — engine-error-to-wire-error mapping.

Modules§

deploy
Operator deploy handlers shared by both transports. Shared operator-deploy handlers used by both transports.

Structs§

RunDocumentAccess
An authorized read of one workflow’s document under one package hash: the caller is scoped, the workflow is theirs, and the hash is one the workflow’s own history recorded. Holds the scoped engine so the archive read that follows happens in the same scope the check ran in.

Constants§

RUN_PACKAGE_NOT_RECORDED
The error type of a well-formed hash no generation of the workflow started under. Distinct from WorkflowNotFound (the workflow itself) and from the archive refusals (DeployedVersionNotFound, DeployedAwlSourceAbsent).

Functions§

authorize_run_document
Authorizes a run-document read: scopes the caller to namespace and verifies the workflow exactly as describe does, then requires content_hash to be recorded on one of the workflow’s WorkflowStarted events (any generation of its continue-as-new chain).
cancel
Handles a decoded cancel request.
describe
Handles a decoded describe-workflow request.
list
Handles a list-workflows request: one page of the contract, read from the visibility projection through the scoped engine.
pause
Handles a decoded pause request (#204).
query
Handles a decoded query request.
rename
Handles a decoded rename request (#211).
reopen
Handles a decoded reopen request.
resume
Handles a decoded resume request (#204).
retire_workloop
Retires a WORKLOOP: runs its declared retire body (when its deployed document declares one), records LoopRetired + its WorkflowCompleted terminal in one atomic batch, and removes the loop from the sweep set.
signal
Handles a decoded signal request.
start
Handles a decoded start-workflow request.
start_with_placement
Start a workflow, optionally with a placement id chosen by the routing edge so the new execution lands on a locally-owned shard (R-1 unsteered-start remint). placement = None is the default path: the engine mints the id, so the single-node / non-clustered behaviour is unchanged.