Bug 973677 - Declaration of sliding windows don't work.
Declaration of sliding windows don't work.
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
high Severity high
: ER5
: 6.0.0
Assigned To: Mario Fusco
Tomas David
Depends On:
  Show dependency treegraph
Reported: 2013-06-12 09:35 EDT by Tomas David
Modified: 2014-08-06 16:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:20:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomas David 2013-06-12 09:35:42 EDT
Description of problem:
When events are inserted into kiesession, declarated sliding window is used in rule or in query and rule is fired or query is called, then result doesn't contain required events limited by sliding window.

Version-Release number of selected component (if applicable):
Drools 6.0.0.Beta3

How reproducible:
Pull request #214 submited in Drools.

Steps to Reproduce:
1. Make a drl file with declaration of sliding (length or time) window, write rule or query, which use this window and returns number of inserted events limited by sliding window.
2. Write a test. Gradually insert events into kiesession one by one.
3. After each insertion, fire all rules or call query. 

Actual results:
Results are all inserted events, even events above limit (defined by sliding window).

Expected results:
Results should be events, which are under limit (defined by sliding window). For example: last ten events or events in the last 100ms

Additional info:
Declarations of both types (time and length) of sliding windows don't work. When declaration of sliding window is not used only time sliding window works (bug #973661).
Comment 4 Mario Fusco 2013-10-10 04:19:23 EDT
I merged the tests and checked that they are passing now. Very likely the problem was caused by the fact that the kieBase was running in cloud mode (even if properly configured in the provided test to run in stream mode). I also added a check to enforce that stream mode is used when necessary. This means that if you now try to run in cloud mode a kiebasae that actually requires the stream one (because it uses sliding windown or other fusion related features) it will throw a RuntimeException saying:

"The requested KieBase $kiebasename has been set to run in CLOUD mode but requires features only available in STREAM mode"
Comment 5 Tomas David 2013-11-29 10:36:23 EST
Verified on BRMS 6.0.0.ER5.

Note You need to log in before you can comment on or make changes to this bug.