我有java class Fact,如下所示
class AssertionFact {
String name;
Object value;
}
当我使用Drools 5.2&规则如下,它工作得很好。
AssertionFact(
object > 100,
name == "testName"
)
但是现在当我将我的drools版本升级到6.4.0& JDK 1.8对于相同的规则,我的误差低于误差。
Caused by: java.lang.RuntimeException: uncomparable values <<TESTVALUE>> and <<100.0>>
at org.mvel2.math.MathProcessor.doOperationNonNumeric(MathProcessor.java:274)
at org.mvel2.math.MathProcessor._doOperations(MathProcessor.java:234)
at org.mvel2.math.MathProcessor.doOperations(MathProcessor.java:79)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:117)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
at org.mvel2.MVEL.executeExpression(MVEL.java:929)
at org.drools.core.util.MVELSafeHelper$RawMVELEvaluator.executeExpression(MVELSafeHelper.java:496)