Bug 999388 - KieSession created from KieContainer behaves differently than created from KieBase
Summary: KieSession created from KieContainer behaves differently than created from Ki...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER6
: ---
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-21 09:08 UTC by Marek Winkler
Modified: 2013-08-21 15:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-21 15:25:25 UTC
Type: Bug


Attachments (Terms of Use)

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.


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