Bug 1032043 - RETE-OO: CCE when using declarative agenda
RETE-OO: CCE when using declarative agenda
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ER6
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-19 07:49 EST by Marek Winkler
Modified: 2014-08-06 16:17 EDT (History)
0 users

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


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

  None (edit)
Description Marek Winkler 2013-11-19 07:49:50 EST
Created attachment 826039 [details]
Maven project with reproducer

Description of problem:

When using declarative agenda with RETE, the following ClassCastException is thrown:

java.lang.ClassCastException: org.drools.reteoo.common.ReteWorkingMemoryEntryPoint cannot be cast to org.drools.core.common.InternalWorkingMemoryEntryPoint
	at org.drools.reteoo.common.ReteAgenda.insertAndStageActivation(ReteAgenda.java:371)
	at org.drools.reteoo.common.ReteAgenda.addActivation(ReteAgenda.java:388)
	at org.drools.reteoo.nodes.ReteRuleTerminalNode.assertLeftTuple(ReteRuleTerminalNode.java:47)
	at org.drools.core.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:213)
	at org.drools.core.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:153)
	at org.drools.reteoo.nodes.ReteLeftInputAdapterNode.assertObject(ReteLeftInputAdapterNode.java:44)
	at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:60)
	at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369)
	at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
	at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
	at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
	at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
	at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1149)
	at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1093)
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:308)
	at org.drools.reteoo.DeclarativeAgendaTest.testActivationBlock(DeclarativeAgendaTest.java:35)

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 DeclarativeAgendaTest from the attached Maven project with setting drools engine to RETE:

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

The test passes, when executed with PHREAK:

mvn clean test -Dtest=DeclarativeAgendaTest -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 06:27:08 EST
Fixed by https://github.com/droolsjbpm/drools/commit/45ac63aae
Comment 2 Marek Winkler 2014-01-07 11:06:19 EST
Verified on BRMS 6.0.0 ER6.

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