Managing Workflows
Follow these steps in order. Report a step you skip as skip: <reason>. Every
mutation consumes the exact definition, run, or grant identity a read or a prior
mutation returned; a name, label, or filesystem path is not authority. Use live
operation schemas for arguments.
- Validate the definition (
tracedecay_workflow_validate_definition). skip:
the request controls an existing run; go to step 4.
- Register it (
tracedecay_workflow_register_definition) and keep the
definition identity it returns.
- Activate it (
tracedecay_workflow_activate_definition). Rejection and
retirement (tracedecay_workflow_reject_definition,
tracedecay_workflow_retire_definition) are typed lifecycle transitions,
not deletions.
- Start a run from an Active version (
tracedecay_workflow_start_run), or
control an existing run (tracedecay_workflow_pause_run,
tracedecay_workflow_resume_run, tracedecay_workflow_cancel_run). Inspect
terminal effects before retrying an interrupted request.
- Issue a handoff (
tracedecay_workflow_handoff_issue) only for a step of an
Active version and a run started from it, and redeem
(tracedecay_workflow_handoff_redeem) only the grant it returned. skip: no
handoff was requested.
- Act on a refusal by its type.
stalecarries the requested and current
expected_revision or expected_sequence in detail: refresh and resend.
conflict is an illegal lifecycle edge or a run from an inactive version.
reauthorize needs a new handoff from its issuer.
tracedecay_workflows reads historical wf_* session runs and controls
nothing; that history belongs to managing-session-context, and task, attempt,
and placement operations belong to managing-work.
Report: the definition or run identity, the lifecycle state it reached, and
any typed refusal with its detail. Do not resend a stale or conflict request
unchanged.