use of org.drools.core.reteoo.LeftTupleSinkPropagator in project drools by kiegroup.
the class SegmentUtilities method isNonTerminalTipNode.
public static boolean isNonTerminalTipNode(LeftTupleNode node, TerminalNode removingTN) {
LeftTupleSinkPropagator sinkPropagator = node.getSinkPropagator();
if (removingTN == null) {
return sinkPropagator.size() > 1;
}
if (sinkPropagator.size() == 1) {
return false;
}
// we know the sink size is creater than 1 and that there is a removingRule that needs to be ignored.
int count = 0;
for (LeftTupleSinkNode sink = sinkPropagator.getFirstLeftTupleSink(); sink != null; sink = sink.getNextLeftTupleSinkNode()) {
if (sinkNotExclusivelyAssociatedWithTerminal(removingTN, sink)) {
count++;
if (count > 1) {
// There is more than one sink that is not for the removing rule
return true;
}
}
}
return false;
}
Aggregations