在多次执行中重用StatefulKnowledgeSession

时间:2015-07-28 12:34:21

标签: java drools

尝试在drools中的一个statefulKnowlegdeSession中执行两次时遇到问题:

final KnowledgeBase kbase = knowledgeAgent.getKnowledgeBase();
final StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();
session.getAgenda().getAgendaGroup("Third").setFocus();
session.getAgenda().getAgendaGroup("Second").setFocus();
session.getAgenda().getAgendaGroup("First").setFocus();
session.execute(CommandFactory.newBatchExecution(commands));
//This execution doesn't work:
session.execute(CommandFactory.newBatchExecution(anothersCommands));
session.dispose();

第二次执行永远不会发生,什么是坏事?我可以在多次执行中重用drools会话吗?

我使用drools 5.6.0.Final

此致

0 个答案:

没有答案