Hi, I'm using stateful session, and setting focus to a particular agenda group in this way:
kieContainerSessionsPool contains a list of 60 sessions
KieSession session = kieContainerSessionsPool.newKieSession();
session.getAgenda().getAgendaGroup("endPoint1).setFocus();
session.insert(fact);
session.fireAllRules();
session.dispose();
drl:
rule "1"
agenda-group "endPoint1"
when
f : Fact ( map.get("fileName") == "abc.11032023.xml", map.get("documentType") == "Invoice" )
then
Action action1 = new Action();
action1.setValue("WorkflowId1");
List actions = new ArrayList();
actions.add(action1);
f.setActions(actions);
end
Rule is not matching even though the fact has the same values. I've populated few AgendaEventListeners in the code:
AgendaGroupPushedEvent endpoint1
Rule matches: 1
agendaGroupPopped: endpoint1
====
If I set auto-focus to true in the rule, it is working.
Can anyone please help me with this???