Search in sources :

Example 1 with RightTupleSinkAdapter

use of org.drools.core.reteoo.LeftInputAdapterNode.RightTupleSinkAdapter in project drools by kiegroup.

the class AddRemoveRule method insertLiaFacts.

private static void insertLiaFacts(LeftTupleNode startNode, InternalWorkingMemory wm) {
    // rule added with no sharing
    PropagationContextFactory pctxFactory = wm.getKnowledgeBase().getConfiguration().getComponentFactory().getPropagationContextFactory();
    final PropagationContext pctx = pctxFactory.createPropagationContext(wm.getNextPropagationIdCounter(), PropagationContext.Type.RULE_ADDITION, null, null, null);
    LeftInputAdapterNode lian = (LeftInputAdapterNode) startNode;
    RightTupleSinkAdapter liaAdapter = new RightTupleSinkAdapter(lian);
    lian.getObjectSource().updateSink(liaAdapter, pctx, wm);
}
Also used : PropagationContextFactory(org.drools.core.common.PropagationContextFactory) RightTupleSinkAdapter(org.drools.core.reteoo.LeftInputAdapterNode.RightTupleSinkAdapter) PropagationContext(org.drools.core.spi.PropagationContext) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode)

Aggregations

PropagationContextFactory (org.drools.core.common.PropagationContextFactory)1 LeftInputAdapterNode (org.drools.core.reteoo.LeftInputAdapterNode)1 RightTupleSinkAdapter (org.drools.core.reteoo.LeftInputAdapterNode.RightTupleSinkAdapter)1 PropagationContext (org.drools.core.spi.PropagationContext)1