Drools Fusion 5.3.0 example不能运行

Unable to Analyse Expression percent >= -0.08:
[Error: Comparison operation requires compatible types. Found class org.mvel2.util.MethodStub and class java.lang.Double]
[Near : {... percent >= -0.08 ....}]
^
[Line: 52, Column: 28] : [Rule name='If the drop is between 6% and 8%, buy more shares']

Unable to Analyse Expression percent < -0.06:
[Error: Comparison operation requires compatible types. Found class org.mvel2.util.MethodStub and class java.lang.Double]
[Near : {... percent < -0.06 ....}]
^
[Line: 52, Column: 28] : [Rule name='If the drop is between 6% and 8%, buy more shares']

Unable to Analyse Expression percent < -0.08:
[Error: Comparison operation requires compatible types. Found class org.mvel2.util.MethodStub and class java.lang.Double]
[Near : {... percent < -0.08 ....}]
^
[Line: 65, Column: 28] : [Rule name='If the drop is on more than 8%, sell shares']

Unable to Analyse Expression percent >= -0.06:
[Error: Comparison operation requires compatible types. Found class org.mvel2.util.MethodStub and class java.lang.Double]
[Near : {... percent >= -0.06 ....}]
^
[Line: 79, Column: 28] : [Rule name='If the drop is between 5% and 6%, do nothing']

看到这个错误肯定是运行drools-distribution-5.3.0.Final中的fusion-example例子,这个例子实际上是基于5.2.0的代码,5.3.0与5.2.0及以前的版本不同,所以报错。

fusion-example 5.3.0版本的代码实际上是在 droolsjbpm-integration-distribution-5.3.0.Final下,这里面的代码是可以执行的

JBoss论坛的解释在这 https://issues.jboss.org/browse/JBRULES-3306?focusedCommentId=12648364&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12648364

欢迎关注Drools平台的朋友留言探讨!

转载于:https://www.cnblogs.com/kaqike/archive/2012/03/11/2391125.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值