yaml
type: "io.kestra.plugin.core.execution.Exit"
Exit the execution: terminate it in the state defined by the property state
.
Note that if this execution has running tasks, for example in a parallel branch, the tasks will not be terminated except if state
is set to KILLED
.
Examples
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
- Type: string
- Dynamic: ✔️
- Required: ✔️
- Default:
SUCCESS
- Possible Values:
SUCCESS
WARNING
KILLED
FAILED
CANCELED
The execution exit state
Using
KILLED
will end existing running tasks, and any other execution with a different state will continue to run.