RulePoint evaluates AND and OR conditions from left to right.
The AND operator takes precedence over the OR operator. You should always use parentheses to group the conditions appropriately.
If the first part of an AND clause is false, RulePoint does not evaluate the remaining clause.
Consider the following rule:
WHEN 1 stock WITH s.price > 10 AND (symbol = "XYZ" OR symbol="ABCD")
To activate this rule, either both of the conditions around the AND operator (s.price > 10 and s.symbol = “XYZ”) must be met, or only the condition after the OR operator. The price of the stock topic event must be greater than 10 and its symbol must be XYZ, or the stock symbol of the stock topic event must be ABCD.
Use the OR operator ONLY between conditions for the same topic. For example, in the following rule, the OR operator applies only to the stock topic:
WHEN 1 stock s, 1 news n WITH s.symbol in n.title AND (s.symbol = "XYZ" OR s.symbol="ABCD")
When using the OR operator, all of the properties referenced in the conditions must exist in the events present in the system for RulePoint to evaluate a rule.