Skip to content

Commit

Permalink
Merge branch 'main' into CI-docker-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ttuffin authored Sep 27, 2023
2 parents 93e80e6 + db6de88 commit 1e4cf1e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/conditions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -966,3 +966,30 @@ Example:
| if an attribute exists before you use it in a condition. The rule engine
| will check for the existence and only then compare it. If its missing, the
| comparison fails.

| **Q:** If a condition string has an embedded colon followed by a space in it how do I escape it?
| **Ans:** During the rulebook parsing you would see this error message:
| ERROR - Terminating mapping values are not allowed here.
| To resove this eror you would have to quote the whole condition string or use the > or | and
| move the entire condition to a separate line.
Example:
.. code-block:: yaml
name: rule1
condition: 'event.abc == "test: 1"'
.. code-block:: yaml
name: rule1
condition: >
event.abc == "test: 1"
.. code-block:: yaml
name: rule1
condition: |
event.abc == "test: 1"

0 comments on commit 1e4cf1e

Please sign in to comment.