Drools get WorkingMemory to see facts in DRL
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());
精彩评论