Nodes
Sub-decision
Runs another published decision and writes its outputs into the flow.
The Sub-decision node calls another published decision as if it were a single step. It lets you build big decisions out of small, separately owned ones.
When to use it
- Reuse logic across decisions: a KYC check, a pricing step.
- Split a large flow so that each part can be tested and versioned on its own.
How it works
- The published version of the child is resolved, at the version pinned when the parent was published.
- The input mapping builds the child's payload, which is validated against the child's own input model.
- The child runs its whole flow, with its own trace.
- Its outputs are written into the parent as variables, and the parent continues through Next.
Ports
| Port | Taken when |
|---|---|
Next | Always, after the child answers. |
Configuration
| Field | What it does |
|---|---|
| Name | Label shown on the canvas and in the trace. |
| Decision | The published decision to run. Its version is pinned at publish. |
| Input mapping | Child input field to expression of the parent. |
| Store results in | A variable name. Blank spreads the child outputs directly into the variables. |
What it writes
The child outputs, as variables (vars.decision) or as one object (vars.kyc.verified). The trace keeps the child trace inside the step, and the child's actions are collected into the parent execution.
In a real flow
The parent calls the published kyc-check decision and branches on what it returned. The child can be edited and republished on its own; the parent keeps using the version it was published with.
When it fails
- The child has no published version:
DECISION_NOT_FOUND. - The mapped input does not match the child's model:
VALIDATION_FAILED. - The child fails: the parent fails with the child's error code.
- Decisions that call each other in a circle (
SUB_DECISION_CYCLE) or nest more than 5 levels deep (SUB_DECISION_DEPTH_EXCEEDED) are refused.
Good to know
- Only published decisions appear in the picker. Publish the child first.