Class Fail

java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.core.tasks.executions.Fail
All Implemented Interfaces:
RunnableTask<VoidOutput>

@Example(title="Fail on a switch branch",full=true,code="id: fail-on-switch\nnamespace: io.kestra.tests\n\ninputs:\n - name: param\n type: STRING\n required: true\n\ntasks:\n - id: switch\n type: io.kestra.core.tasks.flows.Switch\n value: \"{{inputs.param}}\"\n cases:\n case1:\n - id: case1\n type: io.kestra.core.tasks.log.Log\n message: Case 1\n case2:\n - id: case2\n type: io.kestra.core.tasks.log.Log\n message: Case 2\n notexist:\n - id: fail\n type: io.kestra.core.tasks.executions.Fail\n default:\n - id: default\n type: io.kestra.core.tasks.log.Log\n message: default") @Example(title="Fail on a condition",full=true,code="id: fail-on-condition\nnamespace: io.kestra.tests\n\ninputs:\n - name: param\n type: STRING\n required: true\n\ntasks:\n - id: before\n type: io.kestra.core.tasks.debugs.Echo\n format: I\'m before the fail on condition \n - id: fail\n type: io.kestra.core.tasks.executions.Fail\n condition: \'{{inputs.param == \"fail\"}}\'\n - id: after\n type: io.kestra.core.tasks.debugs.Echo\n format: I\'m after the fail on condition ") public class Fail extends Task implements RunnableTask<VoidOutput>