Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 973661 - Sliding length window doesn't work
Sliding length window doesn'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:01 EDT by Tomas David
Modified: 2014-08-06 16:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:15:44 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:01:04 EDT
Description of problem:
When length sliding windows is defined in query with specific value X in drl file, events are gradually inserted into kiesession and query is called, result always contains all inserted events, but it should contains only X last values.

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 one query (using length sliding window), which accumulates last ten events and returns number of accumulated events.
2. Write a test, gradually insert into kiesession events one by one.
3. After each insertion, run query.

Actual results:
Returns all inserted events (1, 2, 3, ..., 10, 11, 12, 13, 14, ...)-

Expected results:
It should returns last ten events (1, 2, 3, ..., 10, 10, 10, 10, ...).

Additional info:
Comment 4 Mario Fusco 2013-10-10 04:18:51 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-25 06:31:47 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.