Sub-Workflow
Run a nested sub-workflow graph.
About this Node
Invokes another published workflow or reusable workspace component as an isolated child execution. Input and output ports are dynamically generated from the child workflow's declared `Inputs` and `Outputs` lists, allowing clean modular composition and reuse across diagrams.
Ports & Branches
inputPort 0Default input port (or dynamic ports declared in Inputs)outputPort 1Default output port (or dynamic ports declared in Outputs)How this Node Reads Data
| Input | Access | Field | Example | Description |
|---|---|---|---|---|
| Dynamic Input Ports | Port Map | — |
Inputs: ["customer_id", "invoice_pdf"] |
Each declared entry in `Inputs` spawns a dedicated input port (`0..M-1`) and maps matching scoped state keys into the child workflow's initial input. |
State Keys Written (Outputs)
| Key Pattern | Type | Role | Description |
|---|---|---|---|
<declared child Outputs> |
object |
Primary | Merges the child workflow's completed output state back into the parent workflow state, exposed via dynamic output ports (`M..M+N-1`). |
Tips & Best Practices
- Recursive sub-workflow chains are automatically guarded against infinite loops via depth and visited-workflow tracking.
- Use explicit Data Wires when the parent's state key name differs from the child Sub-Workflow's declared input key.
Commonly Paired With
Settings Parameters (0)
Configuration schema synchronized with the workflow catalog
This node requires no configuration fields in the catalog schema.
Reusable Enrichment Component
Call a published customer enrichment workflow that accepts `customer_email` and returns `crm_profile`.
Sample Input State
{
"customer_email": "alice@example.com"
}Expected Output State
{
"crm_profile": { "plan": "Enterprise", "owner": "sara" }
}Tip: Publish any workflow as a Reusable Component in the Designer to pin its Inputs/Outputs contract across projects.
Multi-Input Compliance Checker
Wire separate upstream outputs into a Sub-Workflow with two input ports (`document`, `policy_version`) and one output port (`compliance_report`).
Sample Input State
{
"document": "Contract draft...",
"policy_version": "2026-Q4"
}Expected Output State
{
"compliance_report": { "passed": true, "findings": [] }
}