Drools 7:使用结果的入口点(RHS)
Drools 7: use entry point from consequence (RHS)
如何插入 RHS 上的入口点?
来自 Mastering JBoss Drools 6 本书
rule "Routing.."
when
...
then entryPoints["Stream Y"].insert(t)
end
我正在尝试使用 Drools 7 完成这项工作,但出现错误 Unable to build KieBaseModel
。
编辑:完整消息:
Unable to Analyse Expression drools.entryPoints["Stream Y"].insert(t);:
[Error: unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.entryPoints()]
[Near : {... drools.entryPoints["Stream Y"].insert ....}]
注意:我没有定义任何名为 entrypoints
的全局变量。
显然,entryPoints
automagic 变量在 Drools 7 中不再存在。
你可以尝试这样的事情:
rule "Routing.."
when
...
then
drools.getEntryPoint("Stream Y").insert(t)
end
希望对您有所帮助,
如何插入 RHS 上的入口点?
来自 Mastering JBoss Drools 6 本书
rule "Routing.."
when
...
then entryPoints["Stream Y"].insert(t)
end
我正在尝试使用 Drools 7 完成这项工作,但出现错误 Unable to build KieBaseModel
。
编辑:完整消息:
Unable to Analyse Expression drools.entryPoints["Stream Y"].insert(t);:
[Error: unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.entryPoints()]
[Near : {... drools.entryPoints["Stream Y"].insert ....}]
注意:我没有定义任何名为 entrypoints
的全局变量。
显然,entryPoints
automagic 变量在 Drools 7 中不再存在。
你可以尝试这样的事情:
rule "Routing.."
when
...
then
drools.getEntryPoint("Stream Y").insert(t)
end
希望对您有所帮助,