Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: tweaks

...

Notice that a rule follows a definite sequence of evaluation. Assuming a rule is selected for evaluation, within each ruleset the evaluation will occur in the order in which rules are defined within the ruleset. Different rulesets may contain rules which are selected for an event. The order of evaluation within each ruleset is guaranteed, but it is not defined across different rulesets.

Looping

If a foreach is present, it will apply to the remainder of the rule, which will be evaluated once per item in the map or array computed by the <EXPR>. Each time through the loop, the first identifier in the setting clause will have a value from the map or array, and the second identifier (if named) will have the corresponding key or index value.

...

Code Block
<action>          ::= <simple action> | <compound action>
<compound action> ::= every { <action list> } | choose <EXPR> { <choice list> }
<actions list>    ::= <action> | <action list> ; <action> [;]
<choice list>     ::= <choice> | <choice list> ; <choice> [;]
<choice>          ::= <id> => <action>
<simple action>   ::= noop()
                    | <SEND DIRECTIVE>
                    | <HTTP POST>
                    | <DEFINED ACTION>
                    | <BUILT-IN ACTION>

The expression in the choose compound action must evaluate to a string which follows the rules for a KRL identifier. The id in a choice is given as a bare word, and the choices are considered in the order in which they appear in the choice list. The first choice for which the id equals the string computed by the expression has its action taken and the choose expression is complete. No further choices will be considered.

noop() action

The grammar for the conditional action portion of a rule (repeated here for convenience> 

...