Drools 中这两者有什么区别?意味着我们可以根据
从加载的规则规则库和触发规则创建 WorkingMemory,如下所示:
WorkingMemory workingmemory = rulebase.newWorkingMemory();
workingmemory.fireAllRules();
对比
使用 Session (Stateful . Stateless ) 触发规则,如图所示
KnowledgeBase knowledgebase = createKnowledgeBase();
StatefulKnowledgeSession session = knowledgebase.newStatefulKnowledgeSession();
session.insert(Object);
session.fireRules();