-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d1a0d1
commit d341761
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
id: run-if | ||
namespace: company.team | ||
|
||
inputs: | ||
- id: run_everything | ||
type: BOOLEAN | ||
defaults: true | ||
|
||
tasks: | ||
- id: step1 | ||
type: io.kestra.plugin.core.log.Log | ||
message: "This will always run" | ||
|
||
- id: if | ||
type: io.kestra.plugin.core.flow.If | ||
condition: "{{ inputs.run_everything == true }}" | ||
then: | ||
- id: step2 | ||
type: io.kestra.plugin.core.log.Log | ||
message: "This will only run if set to true" | ||
|
||
triggers: | ||
- id: schedule | ||
type: io.kestra.plugin.core.trigger.Schedule | ||
cron: 0 10 * * * | ||
inputs: | ||
run_everything: true | ||
|
||
extend: | ||
title: Run everything if input set to true | ||
description: >- | ||
This workflow will only run `step2` if the input `run_everything` | ||
is set to `true`. This allows you to build a workflow where you | ||
can decide to run all of it or specific parts based on inputs. | ||
It also uses a schedule that sets the input to `true`. This is a good | ||
way to have the schedule run different parts of the workflow, or have | ||
a debug mode that you only use when executing the flow manually. | ||
tags: | ||
- If | ||
- Schedule | ||
- Trigger | ||
ee: false | ||
demo: true | ||
meta_description: This workflow activates only when a query yields results, | ||
checking for new rows matching specific criteria and then performing tasks | ||
like data transfer, event messaging, process automation, and record updates | ||
to prevent duplicates. |