use of org.drools.core.common.InternalAgendaGroup in project drools by kiegroup.
the class PathMemory method queueRuleAgendaItem.
public void queueRuleAgendaItem(InternalAgenda agenda) {
agendaItem.getRuleExecutor().setDirty(true);
ActivationsFilter activationFilter = agenda.getActivationsFilter();
if (activationFilter != null && !activationFilter.accept(agendaItem, agenda.getWorkingMemory(), agendaItem.getTerminalNode())) {
return;
}
if (!agendaItem.isQueued()) {
if (isLogTraceEnabled) {
log.trace("Queue RuleAgendaItem {}", agendaItem);
}
InternalAgendaGroup ag = agendaItem.getAgendaGroup();
ag.add(agendaItem);
}
if (agendaItem.getRule().isQuery()) {
agenda.addQueryAgendaItem(agendaItem);
} else if (agendaItem.getRule().isEager()) {
agenda.addEagerRuleAgendaItem(agendaItem);
}
}
use of org.drools.core.common.InternalAgendaGroup in project drools by kiegroup.
the class PathMemory method doUnlinkRule.
public void doUnlinkRule(InternalAgenda agenda) {
TerminalNode rtn = ensureAgendaItemCreated(agenda);
if (isLogTraceEnabled) {
log.trace(" UnlinkRule name={}", rtn.getRule().getName());
}
agendaItem.getRuleExecutor().setDirty(true);
if (!agendaItem.isQueued()) {
if (isLogTraceEnabled) {
log.trace("Queue RuleAgendaItem {}", agendaItem);
}
InternalAgendaGroup ag = agendaItem.getAgendaGroup();
ag.add(agendaItem);
}
}
Aggregations