【发布时间】:2013-01-15 16:19:10
【问题描述】:
我是 drools 的新手,熟悉使用 extends 关键字来继承规则。问题有没有办法继承多个规则?这类似于在 java 类上使用多个接口。这是我希望它如何工作的示例,但我在规则 3 上遇到错误:
rule "rule 1"
when //person name == "John"
then //print "John"
end
rule "rule 2"
when //person last name == "Smith"
then //print "Smith"
end
rule "rule 3" extends "rule 1", "rule 2"
when //person age > 20
then //print John Smith is older than 20
end
【问题讨论】:
标签: drools multiple-inheritance rules