Bug 1032040 - RETE-OO: CCE when using time or length windows
Summary: RETE-OO: CCE when using time or length windows
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER6
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-19 12:44 UTC by Marek Winkler
Modified: 2014-08-06 20:19 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:19:01 UTC
Type: Bug


Attachments (Terms of Use)
Maven project with reproducer (13.96 KB, application/zip)
2013-11-19 12:44 UTC, Marek Winkler
no flags Details

Description Marek Winkler 2013-11-19 12:44:04 UTC
Created attachment 826037 [details]
Maven project with reproducer

Description of problem:

When using time or length windows in DRL with RETE, the following ClassCastException is thrown:

Exception executing consequence for rule "TestLengthWindow" in org.drools.reteoo.window: java.lang.ClassCastException: org.drools.reteoo.nodes.ReteQueryTerminalNode cannot be cast to org.drools.core.reteoo.RuleTerminalNode
	at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
	at org.drools.reteoo.common.ReteAgenda.fireActivation(ReteAgenda.java:1296)
	at org.drools.reteoo.common.ReteAgenda.fireNextItem(ReteAgenda.java:1202)
	at org.drools.reteoo.common.ReteAgenda.fireAllRules(ReteAgenda.java:1446)
	at org.drools.reteoo.common.ReteWorkingMemory.fireAllRules(ReteWorkingMemory.java:104)
	at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:932)
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
	at org.drools.reteoo.WindowTest.testLengthWindow(WindowTest.java:74)

Using PHREAK, the test passes.

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT
BRMS 6.0.0 ER4

How reproducible:

Run WindowTest from the attached Maven project with setting drools engine to RETE:

mvn clean test -Dtest=WindowTest -Ddrools.ruleEngine=reteoo

The test passes, when executed with PHREAK:

mvn clean test -Dtest=WindowTest -Ddrools.ruleEngine=phreak

Actual results:

The test fails.

Expected results:

The test passes (as it does with PHREAK).

Comment 1 Mario Fusco 2013-11-27 14:06:00 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/41618d8b2

Comment 2 Marek Winkler 2014-01-07 16:05:52 UTC
Verified on BRMS 6.0.0 ER6.


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