Table of Contents

Search

  1. Preface
  2. RulePoint
  3. RulePoint Concepts
  4. Using RulePoint
  5. RulePoint Objects
  6. Working with Topics
  7. Working with Connections
  8. Working with Sources
  9. Working with Responders
  10. Working with Responses
  11. Working with Watchlists
  12. Working with Analytics
  13. DRQL
  14. Working with Rules
  15. Working with Alerts
  16. Setting Access Controls
  17. Troubleshooting RulePoint Issues
  18. Connecting to an Ultra Messaging Application
  19. Creating an Ultra Messaging JMS Source

User Guide

User Guide

Equal and Not Equal Operators

Equal and Not Equal Operators

You can use the equal and not equal operators to compare both text and numeric values.
You can use the equal and not equal operators for the following sets of conditions:
  • When the rule includes two items, the equal operator verifies that the left hand item is equal to the right hand item.
    For example, the rule
    WHEN 1 stock WITH price = 10
    evaluates true after each of the following events arrives:
    Topic: Stock Event 1, Symbol ABCD, Price 10 Event 2, Symbol XYZ, Price 10
    The rule,
    WHEN 1 stock WITH symbol = "XYZ"
    evaluates true after each of the following events arrives:
    Topic: Stock Event 1, Symbol XYZ, Price 9 Event 2, Symbol XYZ, Price 10
  • When the rule includes an item and a list, the equal operator verifies that the item must be equal to every item in the list. Consider an example of a set of three stock events. The equal operator verifies that all three stock event properties are equal to the item.
    The rule
    WHEN 3 stock WITH price = 10
    evaluates true after each of the following events arrives:
    Topic: Stock Event 1, Symbol ABCD, Price 10 Event 2, Symbol XYZ, Price 10 Event 2, Symbol EFG, Price 10
    The rule
    WHEN 3 stock WITH symbol = "XYZ"
    evaluates true after each of the following events arrives:
    Topic: Stock Event 1, Symbol ABCD, Price 11 Event 2, Symbol XYZ, Price 10 Event 2, Symbol EFG, Price 9
  • 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

0 COMMENTS

We’d like to hear from you!