简体   繁体   中英

How a fact in the java code and a fact in the .drl are bound in drools?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM