Core Plugins and tasks Subflow

Core Plugins and tasks Subflow

Certified

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.

yaml
type: io.kestra.plugin.core.flow.Subflow

Run a subflow with custom inputs.

yaml
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

The identifier of the subflow to be executed

Min length1

The namespace of the subflow to be executed

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaultfalse

Flag 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.

The inputs to pass to the subflow to be executed

The labels to pass to the subflow to be executed

DefaultRETRY_FAILED
Possible Values
NEW_EXECUTIONRETRY_FAILED

Action 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.""
Minimum>= 1

The revision of the subflow to be executed

By default, the last, i.e., the most recent, revision of the subflow is executed.

Don't trigger the subflow now but schedule it on a specific date.

Defaulttrue

Flag 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.

Defaulttrue

Flag specifying whether to wait for the subflow execution to finish before continuing the current execution.

The subflow execution ID

The outputs returned by the subflow execution

Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

The final state of the subflow execution

This output is only available if wait is set to true.