Duncan Doyle created DROOLS-993:
-----------------------------------
Summary: Drools throws CCE when using global SessionClock in temporal
operator
Key: DROOLS-993
URL:
https://issues.jboss.org/browse/DROOLS-993
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.3.0.Final
Environment: Max OS X 10.11.1, Oracle Hotspot 1.8.0_45
Reporter: Duncan Doyle
Assignee: Mario Fusco
When I insert the PseudoClock as a global in my KieSession, and I use the clock in
combination with a temporal operator in a rule, I get the following CCE:
{code}
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Date
at
org.drools.core.base.evaluators.BeforeEvaluatorDefinition$BeforeEvaluator.evaluate(BeforeEvaluatorDefinition.java:301)
at org.drools.core.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:94)
... 61 more
{code}
The interesting thing is that this line works:
{code}
$s: SimpleEvent(clock.currentTime after[300s] timestamp)
{code}
while this one fails:
{code}
$s: SimpleEvent(timestamp before[300s] clock.currentTime)
{code}
Reproducer can be found here:
https://github.com/DuncanDoyle/drools-cce-issue
Just run 'mvn clean test'.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)