When the rule includes two lists, the equal operator verifies that both lists have the same items in the same order. If order of the items in the list is not relevant, use the
contains analytic.
For example, consider two watchlists, MyPrices and MyStocks. The Watchlist type is list. Watchlist values for MyPrices are 10, 15, and 12. Watchlist values for MyStocks are XYZ, ABCD, and EFG. The rules in this example contains the equal operator that verifies that all three stock event properties are equal to the items in the specified watchlist.
The rule,
WHEN 3 stock s WITH s.price contains watchlist:MyPrices
evaluates true after the third of the following events arrives:
Topic: Stock
Event 1, Symbol EFG, Price 10
Event 2, Symbol XYZ, Price 15
Event 2, Symbol ABCD, Price 12
The rule,
WHEN 3 stock s WITH s.symbol contains watchlist:MyStocks
evaluates true after the third of the following events arrives:
Topic: Stock
Event 1, Symbol XYZ, Price 14
Event 2, Symbol ABCD, Price 11
Event 2, Symbol EFG, Price 13