
Core Plugins and tasks Exit
CertifiedTerminate the current execution with a chosen state.
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.ExitExamples
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
state string
Default
SUCCESSPossible Values
SUCCESSWARNINGKILLEDFAILEDCANCELLEDThe execution exit state
Using KILLED will end existing running tasks, and any other execution with a different state will continue to run.