[
http://jira.jboss.com/jira/browse/JBRULES-736?page=comments#action_12356023 ]
Mark Proctor commented on JBRULES-736:
--------------------------------------
currently that's because you have an int and an Integer, which we don't have
evalutors to handle that. We'll look into try to make this work for M3.
Should be able to compare different numeric types
-------------------------------------------------
Key: JBRULES-736
URL:
http://jira.jboss.com/jira/browse/JBRULES-736
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Reteoo
Affects Versions: 3.1-m1
Reporter: Michael Neale
Assigned To: Mark Proctor
Priority: Blocker
Fix For: 3.1-m3
Attachments: numberguess.zip
rule High
when
RandomNumber(randomValue:value)
Guess(guess: value>randomValue)
game: GameHistory()
then
game.setBiggest(guess.intValue()-1);
end
will cause:
Caused by: java.lang.ClassCastException: java.lang.Long
at java.lang.Integer.compareTo(Integer.java:35)
at
org.drools.base.evaluators.ObjectFactory$ObjectGreaterEvaluator.evaluateCachedRight(ObjectFactory.java:304)
at
org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:74)
at
org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:78)
at
org.drools.common.SingleBetaConstraints.isAllowedCachedRight(SingleBetaConstraints.java:111)
This used to work in 3.0.5, so something is seriously broken in the evaluators.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira