Red Hat Bugzilla – Bug 1022374
GetFactCount doesn't return number of facts, when facts are inserted from rule through insertLogical and persisted kieSession is used.
Last modified: 2014-08-06 16:16:57 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):
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.
ksession.getFactCount() returns zero.
ksession.getFactCount() should return one.
Fixed by https://github.com/droolsjbpm/drools/commit/523531ea7
Verified on BRMS 6.0.0.ER7.