}
public void blockActivation(org.drools.runtime.rule.Activation act) {
AgendaItem targetMatch = ( AgendaItem ) act;
// iterate to find previous equal logical insertion
LogicalDependency dep = null;
if ( this.previousJustified != null ) {
for ( dep = (LogicalDependency) this.previousJustified.getFirst(); dep != null; dep = (LogicalDependency) dep.getNext() ) {
if ( targetMatch == dep.getJustified() ) {
this.previousJustified.remove( dep );
break;
}
}
}
if ( dep == null ) {
dep = new LogicalDependency( activation, targetMatch );
}
this.activation.addBlocked( dep );
if ( targetMatch.getBlockers().size() == 1 && targetMatch.isActive() ) {
// it wasn't blocked before, but is now, so we must remove it from all groups, so it cannot be executed.