[configuration/rules-dsl.md] Textual Rules -> Rule Name Uniqueness (#627)

* Textual Rules -> Rule Name Uniqueness

Add information on requirement for uniqueness of rule names.

Signed-off-by: Garry Mitchell garrymitchell@my105e.com (github: ConfusedTA)

* Textual Rules -> Rule Name Uniqueness

Amended per suggestions to include rule details as a list, tweak of wording, and amendment of sample rules to follow suggestion of wrapping quotes around rule names.

Signed-off-by: Garry Mitchell garrymitchell@my105e.com (github: ConfusedTA)

* Textual Rules -> Rule Name Uniqueness

Amend rule syntax, make syntax sections into a list.

Signed-off-by: Garry Mitchell garrymitchell@my105e.com (github: ConfusedTA)

* Textual Rules -> Rule Name Uniqueness

Updated based upon suggestions to further clarify points.

Signed-off-by: Garry Mitchell garrymitchell@my105e.com (github: ConfusedTA)

* Update rules-dsl.md
pull/631/head
ConfusedTA 2018-01-16 16:14:06 +00:00 committed by Jerome L
parent 0c65337b94
commit 5597733082
1 changed files with 6 additions and 8 deletions

View File

@ -90,19 +90,17 @@ The **Rules** section contains a list of rules.
Each rule has the following syntax:
```java
rule "rule name"
rule "<RULE_NAME>"
when
<TRIGGER CONDITION1> or
<TRIGGER_CONDITION2> or
<TRIGGER_CONDITION3>
...
<TRIGGER_CONDITION> [or <TRIGGER_CONDITION2> [or ...]]
then
<SCRIPT_BLOCK>
end
```
A rule can have any number of trigger conditions, but must at least have one.
The `SCRIPT_BLOCK` contains the code that should be executed, when a trigger condition is met, see the [script](#scripts) section for details on its syntax.
- `<RULE_NAME>` - Each rule must have a unique name (given within quotes). It is recommended that you choose a name that has meaning when spoken.
- `<TRIGGER_CONDITION>` - The triggering event upon which the rule logic is executed. A rule is executed in reaction to one or more trigger conditions. Multiple conditions are separated by the keyword `or`. Please see below for different possible triggers.
- `<SCRIPT_BLOCK>` - Contains the logic that should be executed when a trigger condition is met, see the [script](#scripts) section for details on its syntax.
{: #rule-triggers}
### Rule Triggers
@ -734,7 +732,7 @@ var Number counter
// setting the counter to some initial value
// we could have done this in the variable declaration already
rule Startup
rule "Startup"
when
System started
then