Skip to content

Commit

Permalink
fix(docs): Multipleconditions documentation (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye authored Jun 29, 2023
1 parent ac8630e commit cae86b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
14 changes: 13 additions & 1 deletion content/docs/07.flow-examples/multiplecondition-listener.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@
title: Multiple condition listener
---

This flow will start only if `multiplecondition-flow-a` and `multiplecondition-flow-b` are successful during the last 24h. You need the two flows [multiplecondition-flow-a](/examples/flows_multiplecondition-flow-a.yml) and [multiplecondition-flow-b](/examples/flows_multiplecondition-flow-b.yml) for it to work.
This flow will start only if `multiplecondition-flow-a` and `multiplecondition-flow-b` are successful during the last 24h.

## Activation Process

* Both `multiplecondition-flow-a` and `multiplecondition-flow-b` must have executions in a success state.
* The trigger condition checks for these successful executions within the defined time window (P1D or 24 hours).
* If both flow executions meet the success condition within the time window, the flow is triggered.
* Once triggered, the conditions reset.
* If `multiplecondition-flow-a` succeeds again, the trigger will not be reactivated immediately.
The trigger will wait for a new execution of `multiplecondition-flow-b` within the next 24 hours following the success of `multiplecondition-flow-a`.
Only when both conditions are met again within the specified time window will the flow be triggered once more.

You need the two flows [multiplecondition-flow-a](/examples/flows_multiplecondition-flow-a.yml) and [multiplecondition-flow-b](/examples/flows_multiplecondition-flow-b.yml) for it to work.

```yaml file=public/examples/flows_multiplecondition-listeners.yml
```
8 changes: 4 additions & 4 deletions public/examples/flows_multiplecondition-listeners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ tasks:
format: "childs"

triggers:
- id: flow-status-conditions
type: io.kestra.core.models.conditions.types.ExecutionStatusCondition
in:
- SUCCESS
- id: multiple-listen-flow
type: io.kestra.core.models.triggers.types.Flow
conditions:
Expand All @@ -18,10 +22,6 @@ triggers:
window: P1D
windowAdvance: P0D
conditions:
success:
type: io.kestra.core.models.conditions.types.ExecutionStatusCondition
in:
- SUCCESS
flow-a:
type: io.kestra.core.models.conditions.types.ExecutionFlowCondition
namespace: io.kestra.demo
Expand Down

1 comment on commit cae86b7

@vercel
Copy link

@vercel vercel bot commented on cae86b7 Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kestra-io – ./

kestra-io.vercel.app
kestra-io-git-main-kestra.vercel.app
kestra-io-kestra.vercel.app

Please sign in to comment.