是否可以向正在运行的 Drools 会话添加新规则?
嘿,我正在工作一个项目,可能需要我在程序运行期间将规则加载/卸载到有状态的 Drools 会话。 (最终使用 JMX,但现在我只是尝试向现成的会话添加规则)
我想知道,这可能吗?在这种情况下如何?我需要重建会话吗?我试图简单地从会话中获取知识库,将我的规则文件添加到其中,然后触发所有规则,但这不起作用。
谢谢!
Hey there, I've got a project at work that may require me to load/unload rules to a stateful Drools session during the run of the program. (Eventually using JMX, but for now I'm just trying to add a rule to a ready-made session)
I was wondering, is this possible and in that case how? Do I need to rebuild the session? I have attempted to simply get the knowledge base from the session, add my rule file to it and then fire all rules, which didn't work.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答是肯定的,这是来自 文档:
Short answer is YES, here's a quote from the documentation: