use of org.drools.kiesession.agenda.DefaultAgenda in project drools by kiegroup.
the class UseOfRuleFlowGroupPlusLockOnTest method test.
@Test
public void test() {
KieHelper kieHelper = new KieHelper().addContent(drl, ResourceType.DRL);
KieBase kbase = kieHelper.build();
KieSession ksession = kbase.newKieSession();
ReteDumper.dumpRete(ksession);
ksession.addEventListener(new DebugAgendaEventListener());
try {
ksession.insert(new Person());
ksession.insert(new Cheese("eidam"));
((DefaultAgenda) ksession.getAgenda()).activateRuleFlowGroup("group1");
int rulesFired = ksession.fireAllRules();
Assert.assertEquals(1, rulesFired);
} finally {
ksession.dispose();
}
}
Aggregations