On this page

workflow

Intent

A named orchestration graph connecting operation/workflow calls, event waits, data bindings, policies, transitions, and outputs.

Exact selection subject:

yaml
subject: workflow

The current Runtime IR is evidence, not authority. Target improvements needed for a usable template contract are called out explicitly.

Scope envelope

ScopeContext
eachworkflow: WorkflowContext
allworkflows: WorkflowContext[]
collection candidatescollects.group, collects.feature

For collects.<dimension>, the singular collector is added beside the plural selected-subject array. A collector is valid only when ownership is semantically provable.

Context tree

Context pathTypeMeaning / template use
workflow.idstringOpaque stable semantic identity.
workflow.nameNameContextStable semantic identity and finite naming variants.
workflow.descriptionstring|nullHuman semantic description.
workflow.tagsstring[]Semantic classifiers; empty when none.
workflow.explanationsExplanationContext[]Advisory usage/security/implementation notes.
workflow.groupSemanticLinkContext|nullOwning semantic group.
workflow.featureSemanticLinkContext|nullCanonical owning feature.
workflow.inputsValuePortContext[]Named ordered inputs; each port.value uses SemanticValueContext.
workflow.outputsValuePortContext[]Named ordered outputs; each port.value uses SemanticValueContext.
workflow.startWorkflowStepLinkContextStarting step.
workflow.stepsWorkflowStepContext[]Named deterministic steps.
workflow.steps[].nameNameContextStep identity.
workflow.steps[].kindoperation|workflow|waitStructural variant.
workflow.steps[].operationSemanticLinkContext|nullOperation target.
workflow.steps[].workflowSemanticLinkContext|nullNested workflow target.
workflow.steps[].eventSemanticLinkContext|nullWaited event.
workflow.steps[].timeout.secondsinteger|nullWait timeout.
workflow.steps[].inputsStepInputBindingContext[]Target input ← workflow/step/event source.
workflow.transitionsWorkflowTransitionContext[]From/to step links plus optional policy.
workflow.output_bindingsWorkflowOutputBindingContext[]Workflow output ← semantic source.

Usage rules

  • Step maps become arrays with explicit names.
  • All source/target refs resolve to bounded port/step/link objects.
  • Workflow ports need semantic names for generated APIs.

Runtime IR implications to audit

  • Add stable names to workflow ports.
  • Ensure step identities are explicit, not map-key-only.
  • Promote workflow.step to a subject only if proof packs generate artifacts per step.

Template example — Jinja / orchestration skeleton

jinja
async def {{ file.symbol }}({% for p in workflow.inputs %}{{ p.name.snake }}{% if not loop.last %}, {% endif %}{% endfor %}):
{% for step in workflow.steps %}
    # {{ step.name.local }} — {{ step.kind }}
{% if step.kind == "operation" %}
    await {{ step.operation.name.snake }}(...)
{% endif %}
{% endfor %}

The example uses semantic context only. Any renderType/render_type helper shown is a pack-owned macro/partial consuming the documented TypeContext, not hidden Dryv context.

Audit questions

  • Can a real workflow pack generate code without parsing raw IR storage conventions?
  • Is any field here present only because the current IR happens to store it?
  • Does any nested item need first-class selection of its own?
Search in