From 7f7a7bf9ea717e89a1205479bc090322a4b547d2 Mon Sep 17 00:00:00 2001 From: Jared Davis <96386496+JaredDavis22@users.noreply.github.com> Date: Thu, 1 Aug 2024 05:10:04 -0400 Subject: [PATCH] Documentation nits #6034 (#6035) * removed full-time from example rule name and comments * removed full-time from example rule name and comments * Replaced "at least" with "more than" for > tests * Adjusted text and format of not forall note * Revert "Adjusted text and format of not forall note" This reverts commit 1662bfb5cad5aa3338b9ee3ac9875ea5ff2d0b71. * Change = to == for equality tests --- .../_drl-rules-WHEN-con.adoc | 4 ++-- .../_drl-rules-WHEN-elements-ref.adoc | 8 ++++---- .../ROOT/pages/language-reference/_drl-rules.adoc | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-con.adoc b/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-con.adoc index 0d4a35c99b3..2cff887d478 100644 --- a/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-con.adoc +++ b/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-con.adoc @@ -242,10 +242,10 @@ For groups of constraints, you can use a delimiting comma `,` to use implicit `a .Example patterns with multiple constraints [source] ---- -// Person is at least 50 years old and weighs at least 80 kilograms: +// Person is more than 50 years old and weighs more than 80 kilograms: Person( age > 50, weight > 80 ) -// Person is at least 50 years old, weighs at least 80 kilograms, and is taller than 2 meters: +// Person is more than 50 years old, weighs more than 80 kilograms, and is taller than 2 meters: Person( age > 50, weight > 80, height > 2 ) ---- diff --git a/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-elements-ref.adoc b/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-elements-ref.adoc index 09bc091dbdb..0143ef7f0ce 100644 --- a/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-elements-ref.adoc +++ b/drools-docs/src/modules/ROOT/pages/language-reference-traditional/_drl-rules-WHEN-elements-ref.adoc @@ -161,7 +161,7 @@ endif::[] rule "All full-time employees have red ID badges" when forall( $emp : Employee( type == "fulltime" ) - Employee( this == $emp, badgeColor = "red" ) ) + Employee( this == $emp, badgeColor == "red" ) ) then // True, all full-time employees have red ID badges. end @@ -174,11 +174,11 @@ To state that all facts of a given type in the working memory of the {RULE_ENGIN .Example rule with `forall` and a single pattern [source] ---- -rule "All full-time employees have red ID badges" +rule "All employees have red ID badges" when - forall( Employee( badgeColor = "red" ) ) + forall( Employee( badgeColor == "red" ) ) then - // True, all full-time employees have red ID badges. + // True, all employees have red ID badges. end ---- diff --git a/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc b/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc index f0831e34554..e1c85f980ac 100644 --- a/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc +++ b/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc @@ -1345,10 +1345,10 @@ For groups of constraints, you can use a delimiting comma `,` to use implicit `a .Example patterns with multiple constraints [source] ---- -// Person is at least 50 years old and weighs at least 80 kilograms: +// Person is more than 50 years old and weighs more than 80 kilograms: /persons[ age > 50, weight > 80 ] -// Person is at least 50 years old, weighs at least 80 kilograms, and is taller than 2 meters: +// Person is more than 50 years old, weighs more than 80 kilograms, and is taller than 2 meters: /persons[ age > 50, weight > 80, height > 2 ] ---- @@ -2062,7 +2062,7 @@ image::language-reference/forall.png[align="center"] rule "All full-time employees have red ID badges" when forall( $emp : /employees[ type == "fulltime" ] - /employees[ this == $emp, badgeColor = "red" ] ) + /employees[ this == $emp, badgeColor == "red" ] ) then // True, all full-time employees have red ID badges. end @@ -2075,11 +2075,11 @@ To state that all facts of a given type in the working memory of the {RULE_ENGIN .Example rule with `forall` and a single pattern [source] ---- -rule "All full-time employees have red ID badges" +rule "All employees have red ID badges" when - forall( /employees[ badgeColor = "red" ] ) + forall( /employees[ badgeColor == "red" ] ) then - // True, all full-time employees have red ID badges. + // True, all employees have red ID badges. end ----