Hide Forgot
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.
Pull request with reproducer: https://github.com/droolsjbpm/drools/pull/238
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.