本文介绍了在Drools Planner中创建实时规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对为Drools Planner创建规则感兴趣.我希望用户可以在启动Drools Planner之前在Java应用程序中创建自己的规则.用户添加规则后,可能会生成Drools-rule-file. 这可能吗?还是在开发整个Java应用程序时必须创建规则文件?

I am interested in creating rules for Drools Planner. I want that a user can create his own rules in a java app before starting the Drools Planner. Maybe a Drools-rule-file could be generated after the user has added his rules. Would this be possible or do I have to create the rule-file while developing the whole java application?

非常感谢...

推荐答案

是的.诀窍是构建自己的RuleBase并将其设置在Planner配置中.请参阅"5.3节". 4.2.2.手册中的"RuleBase(可能由Guvnor定义)".

Yes it's possible.The trick is to build your own RuleBase and set it in the Planner config.See section "5.3.4.2.2. A RuleBase (possibly defined by Guvnor)" in the manual.

根据您希望用户如何编辑他/她的规则,您可以用几个来构造RuleBase:

You can construct a RuleBase by several, depending on how you want your user to edit his/her rules:

  • 来自DRL文件.假定用户知道DRL.请参阅Drools Expert手册.
  • 来自DSL文件.这使您可以使用自然语言.
  • 通过guvnor网络应用.这样一来,您就可以使用Guvnor工具,例如指导规则编辑器,决策表电子表格等等.您甚至可以使用变更集.
  • 从Eclipse中的guvnor或独立的应用程序中(正在开发和实验中).这个领域有一些工作,但还很年轻.
  • From a DRL file. This presumes the user knows DRL. See Drools Expert manual.
  • From a DSL file. This allows you to use natural language.
  • From the guvnor webapp. This allows you to use the tooling Guvnor, such as a guided rule editor, a decision tables spreadsheet, ... You can even use a changeset.
  • From guvnor in eclipse or a standalone app (under development and experimental). There's some work being in this area, but it's still young.

这篇关于在Drools Planner中创建实时规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 23:36