1

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!!

Ganchix
  • 315
  • 4
  • 13

0 Answers0