RulePoint
- RulePoint 6.1.2
- All Products
WHEN 2 stocks WITH average(s.price) > 14 slide within 5 seconds then testresponse
Events - Price values
| Time window
| Incoming events
| Combination of events set that can form when a new event arrives
| Cache condition evaluation
|
---|---|---|---|---|
10
| 0 seconds
| e1
| -
| No activation
|
12
| 2 seconds
| e2
| (e2,e1)
| No activation
|
14
| 4 seconds
| e3
| (e3,e1), (e3,e2)
| No activation as the event set combination does not match the condition.
|
16
| 6 seconds
| e4
| (e4,e2), (e4,e3)
| One activation seen for (e4,e3) as the condition matches the rule. e1 expires in time. e2 is still active.
When you use sliding windows in a rule, all the events which do not match the rule or those events that exist within the specified time continue to survive.
|
38
| 8 seconds
| e5
| e5
| No activation. e2 expires with time and will not form an event set combination.
|
WHEN 2 stocks WITH average(s.price) > 14 slide within 3 events then testresponse
Events - Price value
| Events count in window
| Incoming events
| Combination of events set that can form when a new event arrives
| Cache condition evaluation
|
---|---|---|---|---|
10
| 1
| e1
| No activation
| |
12
| 2
| e2
| (e2,e1)
| No activation
|
14
| 3
| e3
| (e3,e1), (e3,e2), (e2,e1)
| No activation as none of the set combinations do not match the condition.
|
16
| 3
| e4
| (e4,e2), (e4,e3)
| One activation seen for (e4,e3). e1 expires with count (e4, e3, and e2 are only considered) and hence will not form an event set combination.
In sliding windows, all the events which do not match the rule or exists within the specified count will continue to be active.
|
18
| 2
| e5
| (e5,e2)
| One activation. e2 does not expire, but count since (e4,e3) expires.
|
The following table shows how a single topic rule that uses a window clause tumbles for a size of 5 seconds and when condition is 2:WHEN 2 stocks WITH average(s.price) > 14 tumble within 5 seconds then testresponse
Event price value
| Time window
| Incoming events
| Possible event set combination when new event arrives
| Cache condition evaluation
|
---|---|---|---|---|
10
| 0 seconds
| e1
| No activation.
| |
12
| 2 seconds
| e2
| (e2,e1)
| No activation.
|
14
| 4 seconds
| e3
| (e3,e1), (e3,e2)
| No activation. Since none of the set combination does not match the condition.
|
16
| 6 seconds
| e4
| (e4,e2), ( e4,e3)
| One activation. e1 expires with time and hence will not form an event set combination. Since one event combination matches the rule condition, all other events will expire in the tumbling condition. e2 also expires.
|
18
| 8 seconds
| e5
| Only e5
| No activation. e2, e3, and e4 have expired earlier because of the specified tumbling condition.
|
The following table shows how a single topic rule that uses a tumbling window clause tumbles for a size of 3 events and when condition is 2:WHEN 2 stocks WITH average(s.price) > 14 tumble within 3 events then testresponse
Event price value
| Events count in window
| Incoming events
| Possible event set combination when new event arrives
| Cache condition evaluation
|
---|---|---|---|---|
10
| 1
| e1
| -
| No activation.
|
12
| 2
| e2
| (e2,e1)
| No activation.
|
14
| 3
| e3
| (e3,e1), (e3,e2)
| No activation as none of the set combinations do not match the condition.
|
16
| 3
| e4
| (e4,e2), (e4,e3)
| One activation. e1 expires with count and hence will not form a set combination. Since one event combination matches the rule condition, all other events will expire in a tumbling condition. e2 also expires.
|
18
| 1
| e5
| Only e5
| N o activation. e2 has expired earlier because of the tumbling condition.
|