Blueprints

Using finally to run the task at the end of the flow

Source

yaml
id: finally
namespace: company.team

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "This flow executes successfully!"

finally:
  - id: final_task
    type: io.kestra.plugin.core.log.Log
    message: "This task gets executed irrespective of whether the flow is successful
      or failed."

About this blueprint

Software Engineering

This flow demonstrates that the tasks in the finally block gets executed even when all the tasks in the flow are run successfully.

Log

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra