Search code examples
droolsrule-enginebusiness-rules

Drools session share the same working memory?


When application creates multiple state-full kie session, do they share same working memory or they have separate working memory. So if a fact is inserted in one session , will it be available in another session.


Solution

  • A KieSession IS the working memory. You can create multiple, independent KieSessions from a single KieBase, but if you want to broadcast facts to multiple session you will need to implement that mechanism yourself.

    Hope it helps,