【发布时间】:2017-05-16 18:56:14
【问题描述】:
我可以在 Drools 决策表(.xls 文件)中使用领域特定语言 (DSL) 吗?
我为我的决策表创建了一个 .dsl 文件,但每当我尝试在决策表中使用“别名”时,都会出现 Drools 语法错误。
# Simple DSL example file
[keyword]avoid looping=no-loop true
[when]There is a Customer=$c:Customer()
[when]- with age between {low:\d*} and {high:\d*}=age >= {low}, age <= {high}
[when]- who is older than {low:\d*}=age > {low}
[when]- without a Category set=category == Customer.Category.NA
[then]Set Customer Category to {category:\w*}=modify($c)\{setCategory(Customer.Category.{category})\};
例如,如果我在决策表中使用别名“有一个客户”,我会得到:
Line 8:8 mismatched input 'is' in rule
【问题讨论】:
标签: drools