Search in sources :

Example 6 with LogicalDependency

use of org.drools.core.common.LogicalDependency in project drools by kiegroup.

the class JTMSBeliefSetImpl method cancel.

public void cancel(PropagationContext context) {
    // note we don't update negative, conflict counters. It's needed for the last cleanup operation
    for (JTMSMode<M> entry = getFirst(); entry != getLast(); ) {
        // get next, as we are about to remove it
        JTMSMode<M> temp = entry.getNext();
        final LogicalDependency<M> node = entry.getLogicalDependency();
        node.getJustifier().getLogicalDependencies().remove(node);
        remove((M) entry);
        entry = temp;
    }
    JTMSMode<M> last = getFirst();
    final LogicalDependency node = last.getLogicalDependency();
    node.getJustifier().getLogicalDependencies().remove(node);
    beliefSystem.delete(node, this, context);
}
Also used : LogicalDependency(org.drools.core.common.LogicalDependency)

Aggregations

LogicalDependency (org.drools.core.common.LogicalDependency)6 LinkedListEntry (org.drools.core.util.LinkedListEntry)3 BeliefSet (org.drools.core.beliefsystem.BeliefSet)2 Activation (org.drools.core.spi.Activation)2 SimpleLogicalDependency (org.drools.core.beliefsystem.simple.SimpleLogicalDependency)1 SimpleMode (org.drools.core.beliefsystem.simple.SimpleMode)1 AgendaItem (org.drools.core.common.AgendaItem)1 InternalAgenda (org.drools.core.common.InternalAgenda)1 RuleImpl (org.drools.core.definitions.rule.impl.RuleImpl)1 RuleAgendaItem (org.drools.core.phreak.RuleAgendaItem)1 FastIterator (org.drools.core.util.FastIterator)1 ObjectMarshallingStrategy (org.kie.api.marshalling.ObjectMarshallingStrategy)1 ObjectMarshallingStrategyStore (org.kie.api.marshalling.ObjectMarshallingStrategyStore)1