cwrwatson
cwrwatson

Reputation: 61

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 exist in the WorkingMemory

Upvotes: 0

Views: 1718

Answers (2)

andbi
andbi

Reputation: 4454

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.

Upvotes: 1

Geoffrey De Smet
Geoffrey De Smet

Reputation: 27312

Add this to your KnowledgeSession/WorkingMemory:

knowledgeSession.addEventListener(new DebugWorkingMemoryEventListener());

Upvotes: 1

Related Questions