For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Flow/v1.0.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Flow/v1.0.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Flow/v1.0.0/en/nodes/complete.md.

Complete flow.complete

A complete node commits a successful terminal outcome and final return value. When control arrives, output_expression constructs serializable JSON from start input, step results, or child-run outcomes. After the completion event reaches history, the current run segment is closed and accepts no later tasks, signals, or terminal decisions. Every normal business path should converge on an explicit outcome node.

Final output

The output expression reads only committed data. Large documents, images, and raw model responses should live in object storage, with the workflow returning a stable reference, digest, and required metadata. This keeps event history bounded and lets the host enforce retention and permission rules. If a public API relies on a fixed response shape, validate required properties and version that contract before publication.

Data may arrive through the output port or be read directly by the expression. When both mechanisms are present, confirm which connected value and field paths are used. The node has no outgoing ports because execution is terminal. Use flow.continue-as-new to begin another history segment, or a child workflow when a parent must wait for an independently managed process.

Completion checks

The engine rejects early completion while managed child workflows still require parent ownership. A cancellation cleanup path also cannot hide the cancellation behind a successful outcome. Test empty output, nested objects, large object references, unresolved children, duplicate submission, and a process exit before the terminal event commits. Operational reporting should distinguish completion from failure, cancellation, and timeout so the result reflects the actual business conclusion.

Use it to commit a successful terminal outcome and return value. The output expression can combine input and prior node results, and the full value is stored in history.

Runtime behavior

After completion commits, the run segment accepts no later events. The engine rejects early completion while a child workflow still requires parent ownership.

Node contract

Type
flow.complete
Role
Durable runtime command
Runtime binding
complete
Durable identity
Defined by graph structure

Configuration properties

PropertyType and controlDefaultRules
output_expressionFinal outputdictA3SFlowExpressionInput{"apiVersion":"a3s.dev/flow-expression/v1","expression":{"op":"field","path":"input"}}Choose the workflow data saved as the successful result.Required

Ports

DirectionPort IDKindValue types
InputinIncontrolFlowControl
InputoutputOutputdataJsonValue

Node JSON example

The CLI creates the same structure from manifest defaults. Canvas position, title, and selection are presentation data.

workflow.json
{
  "position": {
    "x": 320,
    "y": 160
  },
  "id": "example-flow-complete",
  "data": {
    "output_expression": {
      "apiVersion": "a3s.dev/flow-expression/v1",
      "expression": {
        "op": "field",
        "path": "input"
      }
    },
    "type": "flow.complete"
  }
}

CLI usage

Inspect the installed manifest first, then create the node and validate the complete workflow. Every command emits JSON.

Terminal
a3s-flow node flow.complete --pretty
a3s-flow new flow.complete --id example-flow-complete --pretty
a3s-flow validate workflow.json --pretty
a3s-flow compile workflow.json --pretty
a3s-flow digest workflow.json --pretty

Skill usage

The package includes the a3s-flow Skill. It queries the CLI catalog before creating, validating, compiling, and digesting a workflow.

Prompt
Use $a3s-flow to add the "flow.complete" node to workflow.json, connect valid ports, and validate the result.

CLI usage · Skill usage

Operational notes

  • Keep successful output serializable.
  • A cancellation cleanup path cannot complete successfully.
  • Store object references instead of very large result bodies.