Skip to content

Commit

Permalink
feat: add blueprint for flow condition flow-condition-executionstatus (
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutimantri authored Jan 21, 2025
1 parent 1189008 commit 5c6266c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flow-condition-executionnamespace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: flow-condition-executionnamespace
namespace: demo
namespace: company.team

tasks:
- id: send_slack_message
Expand Down
37 changes: 37 additions & 0 deletions flow-condition-executionstatus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
id: flow-condition-executionstatus
namespace: company.team

tasks:
- id: send_slack_message
type: io.kestra.plugin.notifications.slack.SlackExecution
url: "{{ secret('SLACK_WEBHOOK') }}"
channel: "#alert-engineering"
executionId: "{{ trigger.executionId }}"
payload: "The workflow execution {{ trigger.executionId }} failed for the flow {{ trigger.flowId }} in the namespace {{ trigger.namespace }}"

triggers:
- id: flow
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- FAILED

extend:
title: Executes flow on flow trigger with ExecutionStatus condition
description: >-
This flow trigger executes the flow based on the ExecutionStatus condition.
When any flow enters into the state specified in the `in` list of ExecutionStatus
condition, this flow will get triggered.
In this case, when any flow enters the `FAILED` state, this flow will get
triggered. This flow will send a slack message about the flow execution that has
failed, and in turn resulted in the triggering of this flow.
With ExecutionStatus condition, you can enforce the condition on flow trigger that
is based on the execution status of another flow.
tags:
- Trigger
ee: false
demo: true
meta_description: This flow executes on flow trigger with ExecutionStatus condition.

0 comments on commit 5c6266c

Please sign in to comment.