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

Specifying the Number of Topic Occurrences

Specifying the Number of Topic Occurrences

Usually, you might want to specify the number of event occurrences from that topic required to activate a rule.
If you specify an event count for the topic, the rule activates when the specified number of events meet the rule condition. For example, the following rule activates when any one stock event has a price property that is greater than $10:
WHEN 1 stock WITH price > 10 then response
If 100 stock events occur with a stock price greater than $10, the rule activates 100 times.
The following rule activates when five stock events have a price greater than $10:
WHEN 5 stock WITH price > 10 then response
If you do not specify the number of event occurrences required to activate a rule, the rule activates for all events that meet the condition.
In the following example, the one news event must contain all of the symbols for every stock event that occurs:
WHEN stock s, 1 news n WITH n.headline contains s.symbol then response
You can specify the number of occurrences for the stock event. The following rule activates when the headline property of one News event contains the same stock symbol found in one stock event.
WHEN 1 stock s, 1 news n WITH n.headline contains s.symbol then response
Consider that you want to see whether the total amount of transactions for the day exceeds $10,000. You do not require to specify the number of events that meet the rule condition, because you want to evaluate all of the transaction events that occur that day. The following rule activates when the sum of all of the transactions for the day exceeds 10,000:
WHEN BankTransaction t WITH sum(t.amount) > 10,000 WITHIN 1 day then response

0 COMMENTS

We’d like to hear from you!