From ef0f390e1c550cc3baa3b95371803c1021a1a2c9 Mon Sep 17 00:00:00 2001 From: Jesse Bacon Date: Fri, 22 Apr 2022 18:03:14 -0400 Subject: [PATCH 1/5] Setting these values to True or False results in an error. --- x-pack/docs/en/watcher/condition.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/docs/en/watcher/condition.asciidoc b/x-pack/docs/en/watcher/condition.asciidoc index c38d95733d395..a5231d36fd7ec 100644 --- a/x-pack/docs/en/watcher/condition.asciidoc +++ b/x-pack/docs/en/watcher/condition.asciidoc @@ -8,10 +8,10 @@ When a watch is triggered, its condition determines whether or not to execute the watch actions. {watcher} supports the following condition types: -* <>: set the watch condition to `true` so the watch -actions are always executed. -* <>: set the watch condition to `false` so the watch -actions are never executed. +* <>: set the watch condition to empty curly brackets +so the watch actions are never executed +* <>: set the watch condition to empty curly brackets +so the watch actions are never executed. * <>: perform simple comparisons against values in the watch payload to determine whether or not to execute the watch actions. * <>: compare an array of values in the From aea8a8ac5e6e8508eb7bd5caad45b94693351955 Mon Sep 17 00:00:00 2001 From: Joe Gallo Date: Thu, 19 May 2022 14:31:12 -0400 Subject: [PATCH 2/5] Oops, this should stay as 'always' --- x-pack/docs/en/watcher/condition.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/docs/en/watcher/condition.asciidoc b/x-pack/docs/en/watcher/condition.asciidoc index a5231d36fd7ec..8e50eeeed0a58 100644 --- a/x-pack/docs/en/watcher/condition.asciidoc +++ b/x-pack/docs/en/watcher/condition.asciidoc @@ -9,7 +9,7 @@ When a watch is triggered, its condition determines whether or not to execute the watch actions. {watcher} supports the following condition types: * <>: set the watch condition to empty curly brackets -so the watch actions are never executed +so the watch actions are always executed * <>: set the watch condition to empty curly brackets so the watch actions are never executed. * <>: perform simple comparisons against values From 0865d4902833a2559ba311c598f835bc445168ee Mon Sep 17 00:00:00 2001 From: Joe Gallo Date: Thu, 19 May 2022 14:33:01 -0400 Subject: [PATCH 3/5] Tidy up some whitespace --- x-pack/docs/en/watcher/condition.asciidoc | 8 ++++---- x-pack/docs/en/watcher/condition/always.asciidoc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/docs/en/watcher/condition.asciidoc b/x-pack/docs/en/watcher/condition.asciidoc index 8e50eeeed0a58..5a587f91425c9 100644 --- a/x-pack/docs/en/watcher/condition.asciidoc +++ b/x-pack/docs/en/watcher/condition.asciidoc @@ -6,16 +6,16 @@ ++++ When a watch is triggered, its condition determines whether or not to execute -the watch actions. {watcher} supports the following condition types: +the watch actions. {watcher} supports the following condition types: -* <>: set the watch condition to empty curly brackets +* <>: set the watch condition to empty curly brackets so the watch actions are always executed -* <>: set the watch condition to empty curly brackets +* <>: set the watch condition to empty curly brackets so the watch actions are never executed. * <>: perform simple comparisons against values in the watch payload to determine whether or not to execute the watch actions. * <>: compare an array of values in the -watch payload to a given value to determine whether or not to execute the watch +watch payload to a given value to determine whether or not to execute the watch actions. * <>: use a script to determine whether or not to execute the watch actions. diff --git a/x-pack/docs/en/watcher/condition/always.asciidoc b/x-pack/docs/en/watcher/condition/always.asciidoc index 0cc922ba8863d..db8ea7539b689 100644 --- a/x-pack/docs/en/watcher/condition/always.asciidoc +++ b/x-pack/docs/en/watcher/condition/always.asciidoc @@ -26,4 +26,4 @@ object: "always" : {} } -------------------------------------------------- -// NOTCONSOLE \ No newline at end of file +// NOTCONSOLE From 1279e81db9cdbf3b0837fec3881a2b9f1e2358e0 Mon Sep 17 00:00:00 2001 From: Joe Gallo Date: Thu, 19 May 2022 15:56:30 -0400 Subject: [PATCH 4/5] Reword these in terms of condition results --- x-pack/docs/en/watcher/condition.asciidoc | 8 ++++---- x-pack/docs/en/watcher/condition/always.asciidoc | 13 +++++++------ x-pack/docs/en/watcher/condition/never.asciidoc | 10 +++++----- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/x-pack/docs/en/watcher/condition.asciidoc b/x-pack/docs/en/watcher/condition.asciidoc index 5a587f91425c9..8dcf4c7765649 100644 --- a/x-pack/docs/en/watcher/condition.asciidoc +++ b/x-pack/docs/en/watcher/condition.asciidoc @@ -8,10 +8,10 @@ When a watch is triggered, its condition determines whether or not to execute the watch actions. {watcher} supports the following condition types: -* <>: set the watch condition to empty curly brackets -so the watch actions are always executed -* <>: set the watch condition to empty curly brackets -so the watch actions are never executed. +* <>: a condition whose result is `true`, so the watch +actions are always executed. +* <>: a condition whose result is `false`, so the watch +actions are never executed. * <>: perform simple comparisons against values in the watch payload to determine whether or not to execute the watch actions. * <>: compare an array of values in the diff --git a/x-pack/docs/en/watcher/condition/always.asciidoc b/x-pack/docs/en/watcher/condition/always.asciidoc index db8ea7539b689..70cd3a0c30ee3 100644 --- a/x-pack/docs/en/watcher/condition/always.asciidoc +++ b/x-pack/docs/en/watcher/condition/always.asciidoc @@ -5,19 +5,20 @@ Always condition ++++ -Use the `always` condition to set the condition to `true`. This forces the watch -actions to be executed unless they are <>. +Use the `always` condition so that watch actions will always be +executed when the watch is triggered, unless they are +<>. -The `always` condition enables you to perform watch actions on a fixed schedule, -such as, _"Every Friday at noon, send a status report email to +The `always` condition enables you to perform watch actions on a fixed schedule, +such as, _"Every Friday at noon, send a status report email to sys.admin@example.com."_ ==== Using the always condition This is the default if you omit the condition definition from a watch. -There are no attributes to specify for the `always` condition. To explicitly -use this condition, specify the condition type and associate it with an empty +There are no attributes to specify for the `always` condition. To explicitly +use this condition, specify the condition type and associate it with an empty object: [source,js] diff --git a/x-pack/docs/en/watcher/condition/never.asciidoc b/x-pack/docs/en/watcher/condition/never.asciidoc index d4e36323e57f2..f0ed0ed2f7692 100644 --- a/x-pack/docs/en/watcher/condition/never.asciidoc +++ b/x-pack/docs/en/watcher/condition/never.asciidoc @@ -5,10 +5,10 @@ Never condition ++++ -Use the `never` condition to set the condition to `false`. This means the -watch actions are never executed when the watch is triggered. The watch input is -executed, a record is added to the watch history, and the watch execution ends. -This condition is generally used for testing. +Use the `never` condition so that watch actions will never be executed +when the watch is triggered. The watch input is executed, a record is +added to the watch history, and the watch execution ends. This +condition is generally used for testing. ==== Using the never condition @@ -21,4 +21,4 @@ you specify the condition type and associate it with an empty object: "never" : {} } -------------------------------------------------- -// NOTCONSOLE \ No newline at end of file +// NOTCONSOLE From 921c1d035fe6402ac2a72c7e4aea4c17c3841244 Mon Sep 17 00:00:00 2001 From: Joe Gallo Date: Thu, 19 May 2022 18:10:47 -0400 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: debadair --- x-pack/docs/en/watcher/condition.asciidoc | 5 ++--- x-pack/docs/en/watcher/condition/always.asciidoc | 3 +-- x-pack/docs/en/watcher/condition/never.asciidoc | 7 +++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/x-pack/docs/en/watcher/condition.asciidoc b/x-pack/docs/en/watcher/condition.asciidoc index 8dcf4c7765649..c5b806c7cb9fa 100644 --- a/x-pack/docs/en/watcher/condition.asciidoc +++ b/x-pack/docs/en/watcher/condition.asciidoc @@ -8,9 +8,8 @@ When a watch is triggered, its condition determines whether or not to execute the watch actions. {watcher} supports the following condition types: -* <>: a condition whose result is `true`, so the watch -actions are always executed. -* <>: a condition whose result is `false`, so the watch +* <>: The condition always evaluates to `true`, so the watch actions are always performed. +* <>: The condition always evaluates to `false`, so the watch actions are never executed. * <>: perform simple comparisons against values in the watch payload to determine whether or not to execute the watch actions. diff --git a/x-pack/docs/en/watcher/condition/always.asciidoc b/x-pack/docs/en/watcher/condition/always.asciidoc index 70cd3a0c30ee3..30b44b313ec77 100644 --- a/x-pack/docs/en/watcher/condition/always.asciidoc +++ b/x-pack/docs/en/watcher/condition/always.asciidoc @@ -5,8 +5,7 @@ Always condition ++++ -Use the `always` condition so that watch actions will always be -executed when the watch is triggered, unless they are +Use the `always` condition to perform the watch actions whenever the watch is triggered, unless they are <>. The `always` condition enables you to perform watch actions on a fixed schedule, diff --git a/x-pack/docs/en/watcher/condition/never.asciidoc b/x-pack/docs/en/watcher/condition/never.asciidoc index f0ed0ed2f7692..a223e05736e02 100644 --- a/x-pack/docs/en/watcher/condition/never.asciidoc +++ b/x-pack/docs/en/watcher/condition/never.asciidoc @@ -5,10 +5,9 @@ Never condition ++++ -Use the `never` condition so that watch actions will never be executed -when the watch is triggered. The watch input is executed, a record is -added to the watch history, and the watch execution ends. This -condition is generally used for testing. +Use the `never` condition to skip performing the watch actions whenever the watch is triggered. The watch input is processed, a record is +added to the watch history, and watch execution ends. +This condition is generally used for testing. ==== Using the never condition