Description of problem: Having a DRL defining a time window, when updating an event using FactHandle handle = entryPoint.insert(event); TestEvent event2 = new TestEvent("testEvent2"); entryPoint.update(handle, event2); a CCE is thrown: java.lang.ClassCastException: org.drools.core.reteoo.WindowNode cannot be cast to org.drools.core.reteoo.BetaNode at org.drools.core.reteoo.WindowNode.modifyObject(WindowNode.java:262) Version-Release number of selected component (if applicable): Drools 6.0.0-SNAPSHOT Drools 6.0.0.CR1 This worked in 6.0.0.Beta3. How reproducible: Please run the attached reproducer test. Actual results: CCE is thrown. Expected results: The test passes.
Created attachment 785610 [details] Reproducer test case - DRL
Created attachment 785611 [details] Reproducer test case - java
Created attachment 785643 [details] Exception stacktrace
Fixed by removing the unnecessary (and wrong) cast.
Verified on BRMS 6.0.0 ER2.