java代码中的事实和.drl中的事实如何绑定在drools中?
通过java代码插入知识中的特定事实及其在DRL文件中的相应事实如何相互映射或绑定,因为在我的应用程序中我可以插入相同类型的多个事实,想知道特定规则如何(条件)将选择一个特定的事实来执行。
需要一些信息或示例。 谢谢。
How a particular fact inserted in the knowledge through a java code and its corresponding fact in a DRL file are mapped or bound to each other, Because as in my application I can insert multiple facts of the same type, wanted to know how a particular rule(condition) will pick a particular fact for its execution.
need some info or sample examples.
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将为您在会话中插入的所有 Person 实例激活与对象类型(例如 Person())匹配的规则。在对象类型中添加约束,例如: Person(name == "John") 只有名为 John 的实例才会激活该规则。
干杯
A rule that matches an Object type for example Person(), will be activated for all the Person instances that you insert inside your session. Adding constrains inside the Object type like for example: Person(name == "John") only the instance with name John will activate that rule.
Cheers