包名命名成com.xxx.rule 总是报compile error,没法编译drl文件,从昨天下午纳闷到现在,终于发现 解析器把com.xxx当作包名,rule直接被过滤了。 把 rule 改成ruleengine 终于通过。
保留词有:
when , then , rule , end , contains , matches , and , or , modify , retract , assert , salience , function , query , exists , eval , agenda-group , no-loop , duration , -> , not , auto-focus 。
保留词有:
when , then , rule , end , contains , matches , and , or , modify , retract , assert , salience , function , query , exists , eval , agenda-group , no-loop , duration , -> , not , auto-focus 。
DRL文件编译错误解决
本文记录了一次使用DRL文件时遇到的编译错误经历。作者将包名命名为com.xxx.rule时,遇到了无法编译的问题。经过排查发现,这是因为DRL解析器将'rule'作为保留词而引起的误判。最终通过将包名中的'rule'改为'ruleengine'解决了问题。
650

被折叠的 条评论
为什么被折叠?



