Finish
finishAbandon or terminate the workflow early.
About this Node
Immediately terminates the workflow run with a chosen completion status (`Completed`, `Failed`, or `Canceled`) and an optional message drawn either statically or from upstream state. When reached on any branch, Finish cancels any leftover concurrent tasks and records `_finish_message` and `_workflow_output`.
Ports & Branches
inPort 0Terminal inbound execution flowHow this Node Reads Data
| Input | Access | Field | Example | Description |
|---|---|---|---|---|
| Dynamic Finish Message / Payload | Payload | source_from_input |
error_summary |
When `source_from_input` is true, resolves the final message/payload from incoming state (`entire_state`, `specific_key`, or `custom_template`). |
State Keys Written (Outputs)
| Key Pattern | Type | Role | Description |
|---|---|---|---|
_finish_message |
string |
Primary | Final human-readable completion or termination reason recorded in the run log. |
_workflow_output |
object | string | any |
Primary | Final evaluated output payload captured when the workflow terminates. |
Tips & Best Practices
- Terminal node (`IsTerminal = true`): has input port `0` only and short-circuits any other active parallel tasks once reached.
- Choose `Completed` for expected no-op exits so monitoring alerts only trigger on genuine `Failed` runs.
Commonly Paired With
Settings Parameters (3)
Configuration schema synchronized with the workflow catalog
| Field | Type | Default | Allowed Options | Description |
|---|---|---|---|---|
termination_type |
string |
Completed |
— | How the workflow completion status should be recorded. |
source_from_input |
boolean |
false |
— | Whether to source the message from the connected input node. |
message |
string |
Criteria not met. Gracefully exiting. |
— | The finish/abandonment message to log or return. |
Graceful Early Exit on Empty Dataset
Attach Finish (`Completed`) to the `false` branch of a Condition node when there are zero new records to process.
Node Configuration
{
"Id": "output_finish_1",
"Type": "output_finish",
"Config": {
"termination_type": "Completed",
"source_from_input": false,
"message": "No new records found for this partition."
}
}Sample Input State
{
"sales_snapshot_count": 0
}Expected Output State
{
"_finish_message": "No new records found for this partition."
}Tip: Alias `finish` resolves to `output_finish` in authoring specs and `/docs?node=finish`.
Explicit Validation Failure with Dynamic Message
Terminate the workflow with `Failed` status when an upstream validation step produces an error reason in state.
Node Configuration
{
"Id": "output_finish_1",
"Type": "output_finish",
"Config": {
"termination_type": "Failed",
"source_from_input": true,
"message": "Validation failed"
}
}Sample Input State
{
"validation_error": "Missing required tax ID"
}Expected Output State
{
"_finish_message": "Missing required tax ID"
}