使用 Drools 进行热部署 +古夫诺
我有一个基于 Spring+ Hibernate + Drools 的应用程序。它有静态 *.drl 文件。我的问题是 1)我如何用 Guvnor UI 包装规则? 2)是否有可能,如果用户更改任何规则,无需重新部署,我们就可以使用它或解雇它。如果是,我应该从什么路径选择我的规则?
我的主要目标是将 Rule+ Guvnor 保留在单个模块中,并将使用和触发规则的应用程序作为不同的模块。那么我可以即时更改 Guvnor 中的规则并将其反映在应用程序中吗?
I have an Application which is Based on Spring+ Hibernate + Drools. It has static *.drl files. My Question is
1 ) How can i wrap the rules with Guvnor UI ?
2) Is it possible that if a user changes any rule, without redeployment we can use it or fire it. If yes than from what path should i pick my rule ?
My main aim is to keep Rule+ Guvnor in a single module , and the Application which uses and fires rule as different module. So on the fly i can change the rule in Guvnor and it get reflected in the Application ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1)您可以将规则导入Guvnor。创建一个新包,选择要从 DRL 文件导入的包。这只需要一个文件。如果您想导入单独的文件,请选择一个,然后您可以将其余的 DRL 规则添加为技术规则。或者您可以在导入之前合并 DRL 文件。
2)检查KnowledgeAgent的文档。 KnowledgeAgent 轮询 Guvnor 以了解知识包中的更改,并帮助您更新要用于触发规则的模块中的规则。您仍然需要在 Guvnor 中编译软件包。
1) You can import the rules into Guvnor. Create a new package, select that you want to import from a DRL file. This expects just one file. If you want to import in separate files, pick one and you can add the rest of the DRL rules as technical rules later. Or you can merge the DRL files before importing.
2) Check the documentation for KnowledgeAgent. KnowledgeAgent polls Guvnor for changes in the knowledge packages and helps you update the rules in the module that you want to use for firing the rules. You still need to compile the packages in Guvnor.