Core Plugins and tasks Exit

Core Plugins and tasks Exit

Certified

Terminate the current execution with a chosen state.

Updates the execution to SUCCESS, WARNING, FAILED, CANCELED, or KILLED. When set to KILLED, an out-of-band kill event is sent so running task runs are stopped; other states simply mark the execution and parent task runs as finished.

Use with care inside parallel branches: only KILLED stops sibling tasks.

yaml
type: io.kestra.plugin.core.execution.Exit
yaml
id: exit
namespace: company.team

inputs:
  - id: state
    type: SELECT
    values:
      - CONTINUE
      - END
    defaults: CONTINUE

tasks:
  - id: if
    type: io.kestra.plugin.core.flow.If
    condition: "{{inputs.state == 'CONTINUE'}}"
    then:
      - id: hello
        type: io.kestra.plugin.core.log.Log
        message: I'm continuing
    else:
      - id: exit
        type: io.kestra.plugin.core.execution.Exit
        state: KILLED
  - id: end
    type: io.kestra.plugin.core.log.Log
    message: I'm ending
Properties

Reference (ref) of the pluginDefaults to apply to this task.

DefaultSUCCESS
Possible Values
SUCCESSWARNINGKILLEDFAILEDCANCELEDCANCELLED

The execution exit state

Using KILLED will end existing running tasks, and any other execution with a different state will continue to run.