
Core Plugins and tasks Subflow
CertifiedCall another flow as a subflow.
Core Plugins and tasks Subflow
Call another flow as a subflow.
Starts a separate execution of namespace/flowId (optionally a specific revision), passing inputs and labels, and optionally waits for completion. If the parent restarts, previously started subflows are restarted too.
Use wait/transmitFailed to control propagation of the subflow result back to the parent.
type: io.kestra.plugin.core.flow.SubflowExamples
Run a subflow with custom inputs.
id: parent_flow
namespace: company.team
tasks:
- id: call_subflow
type: io.kestra.plugin.core.flow.Subflow
namespace: company.team
flowId: subflow
inputs:
user: Rick Astley
favorite_song: Never Gonna Give You Up
wait: true
transmitFailed: true
Properties
flowId *Requiredstring
The identifier of the subflow to be executed
namespace *Requiredstring
1The namespace of the subflow to be executed
inheritLabels booleanstring
falseFlag specifying whether the subflow should inherit labels from this execution that triggered it.
By default, labels are not passed to the subflow execution. If you set this option to true, the child flow execution will inherit all labels from the parent execution.
inputs object
The inputs to pass to the subflow to be executed
labels arrayobject
The labels to pass to the subflow to be executed
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
restartBehavior Non-dynamicstring
RETRY_FAILEDNEW_EXECUTIONRETRY_FAILEDAction to take when a failed execution is restarting
- RETRY_FAILED (default): will restart the subflow execution if it's failed.
- NEW_EXECUTION: will create a new subflow execution.""
revision integer
>= 1The revision of the subflow to be executed
By default, the last, i.e., the most recent, revision of the subflow is executed.
scheduleDate string
Don't trigger the subflow now but schedule it on a specific date.
transmitFailed Non-dynamicboolean
trueFlag specifying whether to fail the current execution if the subflow execution fails or is killed.
Note that this option works only if wait is set to true.
wait Non-dynamicboolean
trueFlag specifying whether to wait for the subflow execution to finish before continuing the current execution.
Outputs
executionId string
The subflow execution ID
outputs object
The outputs returned by the subflow execution
state string
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDThe final state of the subflow execution
This output is only available if wait is set to true.