Drools中这两者有什么区别? 意味着我们可以根据
发布规则从加载的Rules RulesBase和触发规则创建WorkingMemory,如下所示:
WorkingMemory workingmemory = rulebase.newWorkingMemory();
workingmemory.fireAllRules();
vs
使用会话(有状态。无状态)来触发显示的规则
KnowledgeBase knowledgebase = createKnowledgeBase();
StatefulKnowledgeSession session = knowledgebase.newStatefulKnowledgeSession();
session.insert(Object);
session.fireRules();
答案 0 :(得分:4)
使用KnowledgeBAse和 KnowledgeSession,知识-api - .jar。 RuleBase和WorkingMemory是旧版接口,将来会被删除。