Create a subflow execution.
Subflows offer a modular way to reuse workflow logic by calling other flows just like calling a function in a programming language. Restarting a parent flow will restart any subflows that has previously been executed.
type: "io.kestra.plugin.core.flow.subflow"
Examples
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
1
The namespace of the subflow to be executed.
inheritLabels booleanstring
false
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.
restartBehavior Non-dynamicstring
RETRY_FAILED
NEW_EXECUTION
RETRY_FAILED
What to do 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
>= 1
The revision of the subflow to be executed.
By default, the last, i.e. the most recent, revision of the subflow is executed.
scheduleDate string
date-time
Don't trigger the subflow now but schedule it on a specific date.
transmitFailed Non-dynamicboolean
true
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
true
Whether to wait for the subflow execution to finish before continuing the current execution.
Outputs
executionId string
The ID of the subflow execution.
outputs object
The extracted outputs from the subflow execution.
state string
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
The final state of the subflow execution.
This output is only available if wait
is set to true
.