Search in sources :

Example 1 with ActivationsFilter

use of org.drools.core.common.ActivationsFilter 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);
    }
}
Also used : InternalAgendaGroup(org.drools.core.common.InternalAgendaGroup) ActivationsFilter(org.drools.core.common.ActivationsFilter)

Aggregations

ActivationsFilter (org.drools.core.common.ActivationsFilter)1 InternalAgendaGroup (org.drools.core.common.InternalAgendaGroup)1