Search in sources :

Example 16 with LiaNodeMemory

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

the class NodeSegmentUnlinkingTest method testLiaNodeLinking.

@Test
public void testLiaNodeLinking() {
    setUp(JOIN_NODE);
    // Initialise from lian
    KieBaseConfiguration kconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
    InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(kconf);
    StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl) kBase.newKieSession();
    SegmentUtilities.createSegmentMemory(liaNode, ksession);
    InternalFactHandle fh1 = (InternalFactHandle) ksession.insert("str1");
    n1.assertObject(fh1, context, ksession);
    LiaNodeMemory liaMem = (LiaNodeMemory) ksession.getNodeMemory(liaNode);
    assertEquals(1, liaMem.getNodePosMaskBit());
    assertEquals(3, liaMem.getSegmentMemory().getAllLinkedMaskTest());
    BetaMemory bm1 = (BetaMemory) ksession.getNodeMemory(n1);
    assertEquals(2, bm1.getNodePosMaskBit());
    assertEquals(3, bm1.getSegmentMemory().getAllLinkedMaskTest());
    // still unlinked
    assertFalse(liaMem.getSegmentMemory().isSegmentLinked());
    // now linked
    InternalFactHandle fh2 = (InternalFactHandle) ksession.insert("str2");
    liaNode.assertObject(fh2, context, ksession);
    assertTrue(liaMem.getSegmentMemory().isSegmentLinked());
    // test unlink after one retract
    liaNode.retractLeftTuple(fh2.getFirstLeftTuple(), context, ksession);
    assertFalse(liaMem.getSegmentMemory().isSegmentLinked());
    // check counter, after multiple asserts
    InternalFactHandle fh3 = (InternalFactHandle) ksession.insert("str3");
    InternalFactHandle fh4 = (InternalFactHandle) ksession.insert("str4");
    liaNode.assertObject(fh3, context, ksession);
    liaNode.assertObject(fh4, context, ksession);
    assertTrue(liaMem.getSegmentMemory().isSegmentLinked());
    liaNode.retractLeftTuple(fh3.getFirstLeftTuple(), context, ksession);
    assertTrue(liaMem.getSegmentMemory().isSegmentLinked());
    liaNode.retractLeftTuple(fh4.getFirstLeftTuple(), context, ksession);
    assertFalse(liaMem.getSegmentMemory().isSegmentLinked());
}
Also used : KieBaseConfiguration(org.kie.api.KieBaseConfiguration) StatefulKnowledgeSessionImpl(org.drools.core.impl.StatefulKnowledgeSessionImpl) InternalFactHandle(org.drools.core.common.InternalFactHandle) InternalKnowledgeBase(org.drools.core.impl.InternalKnowledgeBase) LiaNodeMemory(org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory) Test(org.junit.Test)

Example 17 with LiaNodeMemory

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

the class NodeSegmentUnlinkingTest method testLiaNodeInitialisation.

@Test
public void testLiaNodeInitialisation() {
    setUp(JOIN_NODE);
    // Initialise from lian
    KieBaseConfiguration kconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
    InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(kconf);
    StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl) kBase.newKieSession();
    SegmentUtilities.createSegmentMemory(liaNode, ksession);
    liaNode.assertObject((InternalFactHandle) ksession.insert("str"), context, ksession);
    LiaNodeMemory liaMem = (LiaNodeMemory) ksession.getNodeMemory(liaNode);
    assertEquals(1, liaMem.getNodePosMaskBit());
    assertEquals(3, liaMem.getSegmentMemory().getAllLinkedMaskTest());
    BetaMemory bm1 = (BetaMemory) ksession.getNodeMemory(n1);
    assertEquals(2, bm1.getNodePosMaskBit());
    assertEquals(3, bm1.getSegmentMemory().getAllLinkedMaskTest());
    // Initialise from n1
    kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(kconf);
    ksession = (StatefulKnowledgeSessionImpl) kBase.newKieSession();
    n1.assertObject((InternalFactHandle) ksession.insert("str"), context, ksession);
    liaMem = (LiaNodeMemory) ksession.getNodeMemory(liaNode);
    assertEquals(1, liaMem.getNodePosMaskBit());
    assertEquals(3, liaMem.getSegmentMemory().getAllLinkedMaskTest());
    bm1 = (BetaMemory) ksession.getNodeMemory(n1);
    assertEquals(2, bm1.getNodePosMaskBit());
    assertEquals(3, bm1.getSegmentMemory().getAllLinkedMaskTest());
}
Also used : KieBaseConfiguration(org.kie.api.KieBaseConfiguration) StatefulKnowledgeSessionImpl(org.drools.core.impl.StatefulKnowledgeSessionImpl) InternalKnowledgeBase(org.drools.core.impl.InternalKnowledgeBase) LiaNodeMemory(org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory) Test(org.junit.Test)

Example 18 with LiaNodeMemory

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

the class LinkingTest method testNotNodeUnlinksWithNoConstriants.

@Test
public void testNotNodeUnlinksWithNoConstriants() {
    String str = "";
    str += "package org.kie \n";
    str += "import " + A.class.getCanonicalName() + "\n";
    str += "import " + B.class.getCanonicalName() + "\n";
    str += "import " + C.class.getCanonicalName() + "\n";
    str += "import " + D.class.getCanonicalName() + "\n";
    str += "import " + E.class.getCanonicalName() + "\n";
    str += "import " + F.class.getCanonicalName() + "\n";
    str += "import " + G.class.getCanonicalName() + "\n";
    str += "global java.util.List list \n";
    str += "rule rule1 when \n";
    str += "   $a : A() \n";
    str += "   not B() \n";
    str += "   $c : C() \n";
    str += "then \n";
    str += "  list.add( 'x' ); \n";
    str += "end \n";
    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
    kbuilder.add(ResourceFactory.newByteArrayResource(str.getBytes()), ResourceType.DRL);
    assertFalse(kbuilder.getErrors().toString(), kbuilder.hasErrors());
    InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
    kbase.addPackages(kbuilder.getKnowledgePackages());
    ObjectTypeNode aotn = getObjectTypeNode(kbase, A.class);
    InternalWorkingMemory wm = ((StatefulKnowledgeSessionImpl) kbase.newKieSession());
    List list = new ArrayList();
    wm.setGlobal("list", list);
    LeftInputAdapterNode aNode = (LeftInputAdapterNode) aotn.getObjectSinkPropagator().getSinks()[0];
    NotNode bNode = (NotNode) aNode.getSinkPropagator().getSinks()[0];
    JoinNode cNode = (JoinNode) bNode.getSinkPropagator().getSinks()[0];
    SegmentUtilities.createSegmentMemory(cNode, wm);
    LiaNodeMemory amem = (LiaNodeMemory) wm.getNodeMemory(aNode);
    // Only NotNode is linked in
    assertEquals(2, amem.getSegmentMemory().getLinkedNodeMask());
    FactHandle fha = wm.insert(new A());
    FactHandle fhb = wm.insert(new B());
    FactHandle fhc = wm.insert(new C());
    wm.fireAllRules();
    assertEquals(0, list.size());
    // NotNode unlinks, which is allowed because it has no variable constraints
    assertEquals(5, amem.getSegmentMemory().getLinkedNodeMask());
    // NotNode links back in again, which is allowed because it has no variable constraints
    wm.retract(fhb);
    wm.flushPropagations();
    assertEquals(7, amem.getSegmentMemory().getLinkedNodeMask());
    wm.fireAllRules();
    assertEquals(1, list.size());
    // Now try with lots of facthandles on NotNode
    list.clear();
    List<FactHandle> handles = new ArrayList<FactHandle>();
    for (int i = 0; i < 5; i++) {
        handles.add(wm.insert(new B()));
    }
    wm.fireAllRules();
    assertEquals(0, list.size());
    assertEquals(5, amem.getSegmentMemory().getLinkedNodeMask());
    for (FactHandle fh : handles) {
        wm.retract(fh);
    }
    wm.flushPropagations();
    assertEquals(7, amem.getSegmentMemory().getLinkedNodeMask());
    wm.fireAllRules();
    assertEquals(1, list.size());
}
Also used : NotNode(org.drools.core.reteoo.NotNode) FactHandle(org.kie.api.runtime.rule.FactHandle) JoinNode(org.drools.core.reteoo.JoinNode) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) ArrayList(java.util.ArrayList) LiaNodeMemory(org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory) InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) KnowledgeBuilder(org.kie.internal.builder.KnowledgeBuilder) ArrayList(java.util.ArrayList) List(java.util.List) InternalKnowledgeBase(org.drools.core.impl.InternalKnowledgeBase) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) Test(org.junit.Test)

Example 19 with LiaNodeMemory

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

the class LinkingTest method testNestedSubNetworkMasks.

@Test
public void testNestedSubNetworkMasks() throws Exception {
    String str = "";
    str += "package org.kie \n";
    str += "import " + A.class.getCanonicalName() + "\n";
    str += "import " + B.class.getCanonicalName() + "\n";
    str += "import " + C.class.getCanonicalName() + "\n";
    str += "import " + D.class.getCanonicalName() + "\n";
    str += "import " + E.class.getCanonicalName() + "\n";
    str += "import " + F.class.getCanonicalName() + "\n";
    str += "import " + G.class.getCanonicalName() + "\n";
    str += "global java.util.List list \n";
    str += "rule rule1 when \n";
    str += "   A() \n";
    str += "   B() \n";
    str += "   exists( C() and D() and exists( E() and F() ) ) \n";
    str += "   G() \n";
    str += "then \n";
    str += "end \n";
    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
    kbuilder.add(ResourceFactory.newByteArrayResource(str.getBytes()), ResourceType.DRL);
    assertFalse(kbuilder.getErrors().toString(), kbuilder.hasErrors());
    InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
    kbase.addPackages(kbuilder.getKnowledgePackages());
    ObjectTypeNode node = getObjectTypeNode(kbase, A.class);
    InternalWorkingMemory wm = ((StatefulKnowledgeSessionImpl) kbase.newKieSession());
    LeftInputAdapterNode liaNode = (LeftInputAdapterNode) node.getObjectSinkPropagator().getSinks()[0];
    JoinNode bNode = (JoinNode) liaNode.getSinkPropagator().getSinks()[0];
    ExistsNode exists1n = (ExistsNode) bNode.getSinkPropagator().getSinks()[1];
    JoinNode cNode = (JoinNode) bNode.getSinkPropagator().getSinks()[0];
    JoinNode dNode = (JoinNode) cNode.getSinkPropagator().getSinks()[0];
    ExistsNode exists2n = (ExistsNode) dNode.getSinkPropagator().getSinks()[1];
    JoinNode eNode = (JoinNode) dNode.getSinkPropagator().getSinks()[0];
    JoinNode fNode = (JoinNode) eNode.getSinkPropagator().getSinks()[0];
    RightInputAdapterNode riaNode2 = (RightInputAdapterNode) fNode.getSinkPropagator().getSinks()[0];
    RightInputAdapterNode riaNode1 = (RightInputAdapterNode) exists2n.getSinkPropagator().getSinks()[0];
    JoinNode gNode = (JoinNode) exists1n.getSinkPropagator().getSinks()[0];
    RuleTerminalNode rtn = (RuleTerminalNode) gNode.getSinkPropagator().getSinks()[0];
    wm.insert(new A());
    wm.insert(new B());
    wm.insert(new C());
    wm.insert(new D());
    wm.insert(new G());
    wm.flushPropagations();
    LiaNodeMemory liaMem = (LiaNodeMemory) wm.getNodeMemory(liaNode);
    BetaMemory bMem = (BetaMemory) wm.getNodeMemory(bNode);
    BetaMemory exists1Mem = (BetaMemory) wm.getNodeMemory(exists1n);
    BetaMemory cMem = (BetaMemory) wm.getNodeMemory(cNode);
    BetaMemory dMem = (BetaMemory) wm.getNodeMemory(dNode);
    BetaMemory exists2Mem = (BetaMemory) wm.getNodeMemory(exists2n);
    BetaMemory eMem = (BetaMemory) wm.getNodeMemory(eNode);
    BetaMemory fMem = (BetaMemory) wm.getNodeMemory(fNode);
    BetaMemory gMem = (BetaMemory) wm.getNodeMemory(gNode);
    RightInputAdapterNode.RiaNodeMemory riaMem1 = (RightInputAdapterNode.RiaNodeMemory) wm.getNodeMemory(riaNode1);
    RightInputAdapterNode.RiaNodeMemory riaMem2 = (RightInputAdapterNode.RiaNodeMemory) wm.getNodeMemory(riaNode2);
    PathMemory rs = (PathMemory) wm.getNodeMemory(rtn);
    // E and F are not inserted yet, so rule is unlinked
    assertFalse(rs.isRuleLinked());
    // ---
    // assert a and b in same segment
    assertSame(liaMem.getSegmentMemory(), bMem.getSegmentMemory());
    // exists1 and b not in same segment
    assertNotSame(bMem.getSegmentMemory(), exists1Mem.getSegmentMemory());
    // exists1 and b are in same segment
    assertSame(exists1Mem.getSegmentMemory(), gMem.getSegmentMemory());
    // check segment masks
    assertEquals(2, rs.getSegmentMemories().length);
    assertEquals(3, rs.getAllLinkedMaskTest());
    assertEquals(1, rs.getLinkedSegmentMask());
    assertEquals(3, liaMem.getSegmentMemory().getAllLinkedMaskTest());
    assertEquals(1, liaMem.getNodePosMaskBit());
    assertEquals(2, bMem.getNodePosMaskBit());
    assertEquals(3, exists1Mem.getSegmentMemory().getAllLinkedMaskTest());
    assertEquals(1, exists1Mem.getNodePosMaskBit());
    assertEquals(2, gMem.getNodePosMaskBit());
    // assert c, d are in the same segment, and that this is the only segment in ria1 memory
    assertSame(dMem.getSegmentMemory(), cMem.getSegmentMemory());
    // assert d and exists are not in the same segment
    assertNotSame(exists2Mem.getSegmentMemory(), dMem.getSegmentMemory());
    assertEquals(3, riaMem1.getRiaPathMemory().getSegmentMemories().length);
    // only needs to know about segments in the subnetwork
    assertEquals(null, riaMem1.getRiaPathMemory().getSegmentMemories()[0]);
    assertEquals(dMem.getSegmentMemory(), riaMem1.getRiaPathMemory().getSegmentMemories()[1]);
    assertEquals(1, dMem.getSegmentMemory().getPathMemories().size());
    assertSame(riaMem1.getRiaPathMemory(), cMem.getSegmentMemory().getPathMemories().get(0));
    assertEquals(3, cMem.getSegmentMemory().getAllLinkedMaskTest());
    // E and F is not yet inserted, so bit is not set
    assertEquals(3, cMem.getSegmentMemory().getLinkedNodeMask());
    assertEquals(1, cMem.getNodePosMaskBit());
    assertEquals(2, dMem.getNodePosMaskBit());
    assertEquals(0, exists2Mem.getNodePosMaskBit());
    // insert to lazy initialize exists2Mem segment
    FactHandle fhE1 = wm.insert(new E());
    FactHandle fhF1 = wm.insert(new F());
    wm.flushPropagations();
    assertEquals(1, exists2Mem.getNodePosMaskBit());
    // only cares that the segment for c, E and exists1 are set, ignores the outer first segment
    assertEquals(6, riaMem1.getRiaPathMemory().getAllLinkedMaskTest());
    // E and F are inerted, so 6
    assertEquals(6, riaMem1.getRiaPathMemory().getLinkedSegmentMask());
    wm.delete(fhE1);
    wm.delete(fhF1);
    wm.flushPropagations();
    // E deleted
    assertEquals(2, riaMem1.getRiaPathMemory().getLinkedSegmentMask());
    // assert e, f are in the same segment, and that this is the only segment in ria2 memory
    // subnetworks are recursively created, so segment already exists
    assertNotNull(null, eMem.getSegmentMemory());
    assertSame(fMem.getSegmentMemory(), eMem.getSegmentMemory());
    assertEquals(3, riaMem2.getRiaPathMemory().getSegmentMemories().length);
    // only needs to know about segments in the subnetwork
    assertEquals(null, riaMem2.getRiaPathMemory().getSegmentMemories()[0]);
    // only needs to know about segments in the subnetwork
    assertEquals(null, riaMem2.getRiaPathMemory().getSegmentMemories()[1]);
    assertEquals(fMem.getSegmentMemory(), riaMem2.getRiaPathMemory().getSegmentMemories()[2]);
    assertSame(riaMem2.getRiaPathMemory(), eMem.getSegmentMemory().getPathMemories().get(0));
    assertEquals(3, eMem.getSegmentMemory().getAllLinkedMaskTest());
    assertEquals(0, eMem.getSegmentMemory().getLinkedNodeMask());
    // only cares that the segment for e and f set, ignores the outer two segment
    assertEquals(4, riaMem2.getRiaPathMemory().getAllLinkedMaskTest());
    // E and F is not yet inserted, so bit is not set
    assertEquals(0, riaMem2.getRiaPathMemory().getLinkedSegmentMask());
    fhE1 = wm.insert(new E());
    wm.insert(new F());
    wm.flushPropagations();
    // E and F are now inserted yet, so rule is linked
    assertTrue(rs.isRuleLinked());
    assertEquals(3, rs.getAllLinkedMaskTest());
    assertEquals(3, rs.getLinkedSegmentMask());
    // retest bits
    assertEquals(3, cMem.getSegmentMemory().getAllLinkedMaskTest());
    assertEquals(3, cMem.getSegmentMemory().getLinkedNodeMask());
    assertEquals(6, riaMem1.getRiaPathMemory().getAllLinkedMaskTest());
    assertEquals(6, riaMem1.getRiaPathMemory().getLinkedSegmentMask());
    assertEquals(3, eMem.getSegmentMemory().getAllLinkedMaskTest());
    assertEquals(3, eMem.getSegmentMemory().getLinkedNodeMask());
    assertEquals(4, riaMem2.getRiaPathMemory().getAllLinkedMaskTest());
    assertEquals(4, riaMem2.getRiaPathMemory().getLinkedSegmentMask());
    wm.delete(fhE1);
    wm.flushPropagations();
    // retest bits
    assertFalse(rs.isRuleLinked());
    assertEquals(3, cMem.getSegmentMemory().getLinkedNodeMask());
    assertEquals(2, riaMem1.getRiaPathMemory().getLinkedSegmentMask());
    assertEquals(2, eMem.getSegmentMemory().getLinkedNodeMask());
    assertEquals(0, riaMem2.getRiaPathMemory().getLinkedSegmentMask());
}
Also used : FactHandle(org.kie.api.runtime.rule.FactHandle) JoinNode(org.drools.core.reteoo.JoinNode) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) BetaMemory(org.drools.core.reteoo.BetaMemory) ExistsNode(org.drools.core.reteoo.ExistsNode) LiaNodeMemory(org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory) InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) KnowledgeBuilder(org.kie.internal.builder.KnowledgeBuilder) InternalKnowledgeBase(org.drools.core.impl.InternalKnowledgeBase) RightInputAdapterNode(org.drools.core.reteoo.RightInputAdapterNode) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) RuleTerminalNode(org.drools.core.reteoo.RuleTerminalNode) PathMemory(org.drools.core.reteoo.PathMemory) Test(org.junit.Test)

Example 20 with LiaNodeMemory

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

the class SegmentCreationTest method tesShareInSubnetwork.

@Test
public void tesShareInSubnetwork() throws Exception {
    KieBase kbase = buildKnowledgeBase("   A() \n", "   A() B() C() \n", "   A()  not ( B() and C() ) \n");
    InternalWorkingMemory wm = ((InternalWorkingMemory) kbase.newKieSession());
    ObjectTypeNode aotn = getObjectTypeNode(kbase, LinkingTest.A.class);
    LeftInputAdapterNode liaNode = (LeftInputAdapterNode) aotn.getObjectSinkPropagator().getSinks()[0];
    RuleTerminalNode rtn1 = (RuleTerminalNode) liaNode.getSinkPropagator().getSinks()[0];
    JoinNode bNode = (JoinNode) liaNode.getSinkPropagator().getSinks()[1];
    JoinNode cNode = (JoinNode) bNode.getSinkPropagator().getSinks()[0];
    RuleTerminalNode rtn2 = (RuleTerminalNode) cNode.getSinkPropagator().getSinks()[0];
    RightInputAdapterNode riaNode = (RightInputAdapterNode) cNode.getSinkPropagator().getSinks()[1];
    NotNode notNode = (NotNode) liaNode.getSinkPropagator().getSinks()[2];
    RuleTerminalNode rtn3 = (RuleTerminalNode) notNode.getSinkPropagator().getSinks()[0];
    wm.insert(new LinkingTest.A());
    wm.insert(new LinkingTest.B());
    wm.insert(new LinkingTest.C());
    wm.flushPropagations();
    // LiaNode  is in it's own segment
    LiaNodeMemory liaMem = (LiaNodeMemory) wm.getNodeMemory(liaNode);
    SegmentMemory smem = liaMem.getSegmentMemory();
    assertEquals(liaNode, smem.getRootNode());
    assertEquals(liaNode, smem.getTipNode());
    SegmentMemory rtnSmem1 = smem.getFirst();
    assertEquals(rtn1, rtnSmem1.getRootNode());
    assertEquals(rtn1, rtnSmem1.getTipNode());
    SegmentMemory bSmem = rtnSmem1.getNext();
    assertEquals(bNode, bSmem.getRootNode());
    assertEquals(cNode, bSmem.getTipNode());
    // segment is not initialized yet
    assertNull(bSmem.getFirst());
    wm.fireAllRules();
    SegmentMemory rtn2Smem = bSmem.getFirst();
    assertEquals(rtn2, rtn2Smem.getRootNode());
    assertEquals(rtn2, rtn2Smem.getTipNode());
    SegmentMemory riaSmem = rtn2Smem.getNext();
    assertEquals(riaNode, riaSmem.getRootNode());
    assertEquals(riaNode, riaSmem.getTipNode());
    SegmentMemory notSmem = bSmem.getNext();
    assertEquals(notNode, notSmem.getRootNode());
    assertEquals(rtn3, notSmem.getTipNode());
}
Also used : NotNode(org.drools.core.reteoo.NotNode) SegmentMemory(org.drools.core.reteoo.SegmentMemory) JoinNode(org.drools.core.reteoo.JoinNode) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) LiaNodeMemory(org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory) InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) KieBase(org.kie.api.KieBase) RightInputAdapterNode(org.drools.core.reteoo.RightInputAdapterNode) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) RuleTerminalNode(org.drools.core.reteoo.RuleTerminalNode) Test(org.junit.Test)

Aggregations

LiaNodeMemory (org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory)29 LeftInputAdapterNode (org.drools.core.reteoo.LeftInputAdapterNode)26 Test (org.junit.Test)24 InternalWorkingMemory (org.drools.core.common.InternalWorkingMemory)22 ObjectTypeNode (org.drools.core.reteoo.ObjectTypeNode)22 SegmentMemory (org.drools.core.reteoo.SegmentMemory)19 InternalKnowledgeBase (org.drools.core.impl.InternalKnowledgeBase)15 JoinNode (org.drools.core.reteoo.JoinNode)15 ArrayList (java.util.ArrayList)11 List (java.util.List)11 RuleTerminalNode (org.drools.core.reteoo.RuleTerminalNode)11 BetaMemory (org.drools.core.reteoo.BetaMemory)10 KieBase (org.kie.api.KieBase)9 Match (org.kie.api.runtime.rule.Match)8 NotNode (org.drools.core.reteoo.NotNode)5 FactHandle (org.kie.api.runtime.rule.FactHandle)5 KnowledgeBuilder (org.kie.internal.builder.KnowledgeBuilder)5 Arrays.asList (java.util.Arrays.asList)4 InternalFactHandle (org.drools.core.common.InternalFactHandle)4 RightInputAdapterNode (org.drools.core.reteoo.RightInputAdapterNode)4