Bug 1022374 - GetFactCount doesn't return number of facts, when facts are inserted from rule through insertLogical and persisted kieSession is used.
Summary: GetFactCount doesn't return number of facts, when facts are inserted from rul...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER 7
: 6.0.0
Assignee: Mario Fusco
QA Contact: Tomas David
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-23 07:38 UTC by Tomas David
Modified: 2014-08-06 20:16 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

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.


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