Bug 1022374

Summary: GetFactCount doesn't return number of facts, when facts are inserted from rule through insertLogical and persisted kieSession is used.
Product: [Retired] JBoss BRMS Platform 6 Reporter: Tomas David <tdavid>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas David <tdavid>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: mwinkler, rzhang
Target Milestone: ER 7   
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:16:57 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:

Description Tomas David 2013-10-23 07:38:42 UTC
Description of problem:
When persisted kieSession is used and some facts are inserted from rule through insertLogical and ksession.getFactCount() is called after ksession.fireAllRules(), zero count of facts is returned.

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

How reproducible:
Pull request #273 submited in Drools.

Steps to Reproduce:
1. Create drl file with one rule. Rule should insert some fact through insertLogical() on the right hand side.
2. Create test with persisted kieSession. Call getFactCount() after fireAllRules().
3. Run test.

Actual results:
ksession.getFactCount() returns zero.

Expected results:
ksession.getFactCount() should return one.

Additional info:

Comment 2 Mario Fusco 2013-12-17 08:30:25 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/523531ea7

Comment 3 Tomas David 2014-01-10 09:28:49 UTC
Verified on BRMS 6.0.0.ER7.