Bug 1022374 - GetFactCount doesn't return number of facts, when facts are inserted from rule through insertLogical and persisted kieSession is used.
GetFactCount doesn't return number of facts, when facts are inserted from rul...
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium
: ER 7
: 6.0.0
Assigned To: Mario Fusco
Tomas David
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 03:38 EDT by Tomas David
Modified: 2014-08-06 16:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:16:57 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)

  None (edit)
Description Tomas David 2013-10-23 03:38:42 EDT
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 03:30:25 EST
Fixed by https://github.com/droolsjbpm/drools/commit/523531ea7
Comment 3 Tomas David 2014-01-10 04:28:49 EST
Verified on BRMS 6.0.0.ER7.

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