Bug 999388

Summary: KieSession created from KieContainer behaves differently than created from KieBase
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED NOTABUG QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: mfusco
Target Milestone: ER6Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-21 15:25:25 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:

Description Marek Winkler 2013-08-21 09:08:50 UTC
Description of problem:

When executing simple rule with query in a KieSession created from KieContainer.newKieSession(), the rules do not produce expected results. When constructing the KieSession using KieBase.newKieSession(), the result is as expected.

Please see the reproducer in attached pull request for more details.

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

Drools 6.0.0-SNAPSHOT
Drools 6.0.0.CR1
BRMS 6.0.0.ER1

This worked in 6.0.0.Beta5, marking as a regression.

How reproducible:

Please run KieSessionConstructionTest#testBasicQuerySessionFromContainer() from the PR.


Actual results:

The test fails because no results have been returned.

Expected results:

The test passes.

Comment 1 Marek Winkler 2013-08-21 09:11:32 UTC
Pull request with reproducer: https://github.com/droolsjbpm/drools/pull/238

Comment 2 Mario Fusco 2013-08-21 15:25:25 UTC
The provided test is wrong: when running testBasicQuerySessionFromContainer you're using a kieBase that is not the one from which the kieSession has been created. If you replace kieBase with kieSession.getKieBase() both tests become green.