StatelessKnowledgeSession Focus Agenda

泪湿孤枕 提交于 2019-12-11 07:08:51

问题


I have a problem with a rules execution in drools, when I execute the rules with a StatefulKnowledgeSession there aren't problems:

    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));
    session.dispose();

But I try to execute the sames rules in a StatelessKnowledgeSession, because is a multithreading process, but I can't focus the agendas groups then the results are different.

My KnowledgeBase doesn't changes during the execution.

How can do this?

Thanks!!

来源:https://stackoverflow.com/questions/24778283/statelessknowledgesession-focus-agenda

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!