ExecutionOutputs​Execution​Outputs

Condition based on the outputs of an upstream execution.

The condition returns false if the execution has no output. If the result is an empty string, a space, or false, the condition will also be considered as false.

yaml
type: "io.kestra.plugin.core.condition.ExecutionOutputs"

The upstream flow_a must explicitly define its outputs to be used in the ExecutionOutputs condition.

yaml
id: flow_a
namespace: company.team

inputs: 
  - id: user_value
    type: STRING
    defaults: hello

tasks: 
  - id: hello
    type: io.kestra.plugin.core.debug.Return
    format: "{{ inputs.user_value }}"

outputs: 
  - id: flow_a_output
    type: STRING
    value: "{{ outputs.hello.value }}"

The flow_condition_executionoutputs will run whenever flow_a finishes successfully and returns an output matching the value 'hello':

yaml
id: flow_condition_executionoutputs
namespace: company.team

tasks:
  - id: upstream_outputs
    type: io.kestra.plugin.core.log.Log
    message: hello from a downstream flow

triggers:
  - id: condition_on_flow_execution_outputs
    type: io.kestra.plugin.core.trigger.Flow
    states:
      - SUCCESS
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionOutputs
        expression: "{{ trigger.outputs.flow_a_output == 'hello' }}"
Properties