Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1050940

Summary: RETE-OO: Declarative agenda behaves different from PHREAK
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: rrajasek
Target Milestone: CR1   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:15:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Maven project with reproducer none

Description Marek Winkler 2014-01-09 11:44:50 UTC
Created attachment 847592 [details]
Maven project with reproducer

Description of problem:

When using declarative agenda with RETE-OO, one less than expected rule matches. Please see the attached test case for details.

The test contains two test methods, the second one illustrates a test which fails because of different order of rule matches. Could you please verify that this order is expected? I assume so, but I would be happy to have this confirmed from engineering.

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

BRMS 6.0.0 ER7
Drools 6.0.1-SNAPSHOT

How reproducible:

Please run DeclarativeAgendaTest from the attached Maven project:

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

The same tests with PHREAK pass.

Actual results:

One less than expected rule matches are caught by an AgendaEventListener and tests fail.

Expected results:

Tests pass.

Comment 1 Mario Fusco 2014-01-09 19:08:06 UTC
This is working as expected. In order to have the same behaviour between Rete and Phreak you should annotate all the rules interested by the declarative agenda (that in your test case are all the rules in the declarative-agenda.drl) with @Eager when using Phreak.

Comment 2 Marek Winkler 2014-01-23 17:39:41 UTC
Marking as verified in CR1, since this is actually working as expected.