builder.build( context,
this.utils,
subrule );
ActivationListenerFactory factory = context.getRuleBase().getConfiguration().getActivationListenerFactory( rule.getActivationListener() );
TerminalNode terminal = factory.createActivationListener( context.getNextId(),
context.getTupleSource(),
rule,
subrule,
subruleIndex,
context );
BaseNode baseTerminalNode = (BaseNode) terminal;
baseTerminalNode.networkUpdated(new UpdateContext());
baseTerminalNode.attach(context);
if ( context.getRuleBase().getConfiguration().isPhreakEnabled() && !unlinkingAllowedForRule(context.getRule() ) ) {
setUnlinkDisabledCount( null, terminal.getLeftTupleSource(), ( context.getWorkingMemories().length == 0) ? null : context.getWorkingMemories() );
}
// adds the terminal node to the list of nodes created/added by this sub-rule
context.getNodes().add( baseTerminalNode );