Drools 可行输入错误

Drools viable input error

我使用 SpreadsheetCompiler 为我的决策提取 drl Table。这是相关位

global Integer netincome;
// rule values at C14, header at C8
rule "Net Income_14"
    salience 65522
    when
        user:CSUserBundle(user.grossHouseholdIncome >= 0, user.grossHouseholdIncome < 1150000, user.grossHouseholdIncome >= 15700*52, user.grossHouseholdIncome < 86600*52)
    then
        netincome = eval(user.grossHouseholdIncome - 0 - (user.grossHouseholdIncome – 816400) * 0.12 - 0)
end

我的错误是:

E 14:35:30:235 : main : org.drools.compiler.kie.builder.impl.AbstractKieModule : Unable to build KieBaseModel:defaultKieBase
[11,78]: [ERR 101] Line 11:78 no viable alternative at input ''

不幸的是,第 78 列错误位于 'then' 语句中第二个 user.grossHouseholdIncome 的中间。我搜索了文档,但没有找到任何关于在文本中使用变量名两次的信息。我尝试添加 'eval' 以响应 De Smet 针对相同错误的建议。有什么想法吗?

我所做的是将规则复制粘贴到一个像样的文本编辑器中,然后尝试搜索所有出现的特殊 ASCII 字符,例如引号 (") 或连字符 (-) 或任何其他出色的办公程序易于转换成一些看起来不错但被编译器拒绝的 Unicode 字形。另外,不要相信空格。通常它们是由于某些 TAB 字符而由程序创建的视错觉。我用单个下划线替换了空格 代表一个TAB。现在78正好和邪字对齐了

_netincome = eval(user.grossHouseholdIncome - 0 - (user.grossHouseholdIncome – 816400) * 0.12 - 0)
....5...10....5...20....5...30....5...40....5...50....5...60....5...70....5...80