Sous-Workflow
Executes another workflow as a sub-function. Allows reusing existing workflows and creating modular architectures (max 5 levels).
Parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
functionId | text | Yes | No | Identifier of the workflow to execute as a sub-process. |
functionVersion | number | No | No | Specific workflow version to use. Empty for the latest version. |
inputMappings | array | No | No | Input data mappings passed to the subflow. Each entry maps a subflow parameter to a value or variable. |
inheritContext | boolean | No | No | Inherit the parent workflow context (variables, configuration). (Default: true) |
outputVariable | text | No | No | Output variable name containing the subflow result. |
Output
Output variable : subflowResult
{
"result": "..."
}
Example
Call a validation sub-workflow.
Input :
{"functionId": "wf-validation-123"}
Output :
{"result": {"valid": true, "score": 95}}
Common errors
| Problem | Solution |
|---|---|
| Maximum depth reached | Sub-workflows are limited to 5 nesting levels. |
Tip
{{subflowResult.result}} contains the sub-workflow output. Default timeout is 60 seconds.