public void attach(BuildContext context) { constraints.init(context, getType()); setUnificationJoin(); this.rightInput.addObjectSink(this); this.leftInput.addTupleSink(this, context); if (context == null) { return; } for (InternalWorkingMemory workingMemory : context.getWorkingMemories()) { final PropagationContext propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(), PropagationContext.RULE_ADDITION, null, null, null); /* FIXME: This should be generalized at BetaNode level and the * instanceof should be removed! * * When L&R Unlinking is enabled, we only need to update the side * that is initially linked. If there are tuples to be propagated, * they will trigger the update (thus, population) of the other side. * */ if (!lrUnlinkingEnabled || !(this instanceof JoinNode)) { this.rightInput.updateSink(this, propagationContext, workingMemory); } this.leftInput.updateSink(this, propagationContext, workingMemory); } }