Bug 1007385

Summary: Calendars don't work, when we work with two KieContainers
Product: [Retired] JBoss BRMS Platform 6 Reporter: Tomas David <tdavid>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas David <tdavid>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0   
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:18:39 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:
Embargoed:

Description Tomas David 2013-09-12 11:36:50 UTC
Description of problem:
Calendars don't work, when new KieContainer is created and newKieSession is called right after creation of other KieContainer and calling getKieBase. 

Version-Release number of selected component (if applicable):
Drools 6.0.0-SNAPSHOT
6.0.0.ER2

How reproducible:
Pull request #251 submited in Drools.

Steps to Reproduce:
1. Make drl file with two rules. First rule should fire only on weekdays. Second rule should fire only on weekend days. 
2. Write a test with this order of commands:
 - create first KieContainer and call getKieBase()
 - create second KieContainer
 - from second KieContainer create new session ( newKieSession() )
 - add calendars to session and call fireAllRules()
3. Run test.

Actual results:
Two rules are fired.

Expected results:
Only one rule should fired.

Additional info:

Comment 2 Mario Fusco 2013-10-04 17:00:50 UTC
I couldn't reproduce this issue on the master. Very likely it was related by this issue:

https://issues.jboss.org/browse/DROOLS-260

that has been fixed with this commit:

https://github.com/droolsjbpm/drools/commit/39276fea9209353bf3704663da0b03ef934cc908

Comment 6 Tomas David 2013-11-29 16:01:58 UTC
Verified on BRMS 6.0.0.ER5.