subflow) solve this by allowing any complete workflow to be packaged as a single reusable node that can be dropped into parent workflows.
1. Why Use Subflows?
1. Cross-Team Reusability
Instead of every QA engineer or developer building a 5-step customer onboarding chain from scratch, the Identity squad publishes a single “Provision Customer” Subflow. Other teams (Billing, Checkout, Loans, Inventory) simply drag the subflow node onto their canvas.2. Single Point of Maintenance (DRY)
When the identity service adds a mandatory header or alters an onboarding step, the Identity team updates the subflow once. All parent workflows across the organization automatically run the updated logic without breaking.3. Encapsulation & Canvas Clarity
Hides complex plumbing (token exchange, error handling, session cookies) inside the subflow, keeping parent business flows clean, readable, and focused on core business logic.2. Input & Output Contract Mapping
Every subflow defines explicit input parameters and output values:Input Parameters (Parent Subflow)
The parent flow passes variables into the subflow:Output Contracts (Subflow Parent)
The subflow designates which internal node responses are exposed to the parent flow:Variables a subflow sets
Outputs rules (Share Output Data as Flow Variables) on steps inside a subflow run when the subflow runs inside another flow, so later steps of the subflow can use them (e.g.{{customerId}} from response.id). The value also reaches the parent flow: the parent’s variables panel and the Variables tab of the binding helper list such variables with a from subflow: <name> tag, usable in steps after the subflow node. You can also bind them by subflow: {{CreateANewCustomer.vars.customerId}} (the ResponseBinding picker lists vars under the subflow’s alias).
Declaring outputs
In the subflow’s Flow Info → Variables → Outputs to a parent flow, declare which values a parent flow gets (exposed name → variable of the subflow). With outputs declared only those reach the parent; without, every variable the subflow’s steps share is passed on.The Nodes tab
A subflow node’s Nodes tab shows the steps of the subflow (nested subflows included) even before the parent flow has run it: steps that have not run yet are marked Not run yet, and steps the subflow ran on its own show their last result. If the subflow is the first step of a flow, the binding helper’s ResponseBinding tab has nothing earlier to bind to and points you to QMock, QPlugin and flow variables instead.3. Scope Isolation & Runtime State
- Variable Isolation: Subflows execute within their own scoped variable context. Internal temporary variables created during subflow execution do not pollute the parent flow’s state.
- Failure Propagation: If any step within a subflow fails, configurable policies determine whether the parent flow halts or executes a fallback branch.