开发者

Drools get WorkingMemory to see facts in DRL

开发者 https://www.devze.com 2023-02-10 17:40 出处:网络
How can I get the WorkingMemory to know about the facts written in the DRL? Currently, the facts declared in the DRL do not exi开发者_JAVA百科st in the WorkingMemoryDRL only describes facts and rules,

How can I get the WorkingMemory to know about the facts written in the DRL? Currently, the facts declared in the DRL do not exi开发者_JAVA百科st in the WorkingMemory


DRL only describes facts and rules, you have to inject facts into working memory by yourself. In RHS you can inject new facts in WM but for order rule engine to reach your RHS, it needs some objects already injected and matched against LHS.


Add this to your KnowledgeSession/WorkingMemory:

knowledgeSession.addEventListener(new DebugWorkingMemoryEventListener());
0

精彩评论

暂无评论...
验证码 换一张
取 消