Examples of blockMatch()


Examples of org.drools.base.DefaultKnowledgeHelper.blockMatch()

        DefaultKnowledgeHelper kcontext = new DefaultKnowledgeHelper( wm );
        kcontext.setActivation( item1 );
       
        // set blockers
        kcontext.blockMatch( item2 );
        kcontext.blockMatch( item3 );
       
         // set blocked
        kcontext.reset();
        kcontext.setActivation( item1 );
        kcontext.blockMatch( item4 );
View Full Code Here

Examples of org.drools.base.DefaultKnowledgeHelper.blockMatch()

        kcontext.blockMatch( item3 );
       
         // set blocked
        kcontext.reset();
        kcontext.setActivation( item1 );
        kcontext.blockMatch( item4 );
        kcontext.cancelRemainingPreviousLogicalDependencies();
       
        // check only item4 is blocked
        assertEquals( 1, item1.getBlocked().size() );
        assertEquals( item4, ((LogicalDependency)item1.getBlocked().getFirst()).getJustified() );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        agenda.createAgendaItem((LeftTuple)item3, 0, null, null, null, null);
       
        // use same data structure as testAddition
        DefaultKnowledgeHelper kcontext = new DefaultKnowledgeHelper( wm );
        kcontext.setActivation( item1 );
        kcontext.blockMatch( item3 );
       
        kcontext.reset();
        kcontext.setActivation( item2 );
        kcontext.blockMatch( item3 );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        kcontext.setActivation( item1 );
        kcontext.blockMatch( item3 );
       
        kcontext.reset();
        kcontext.setActivation( item2 );
        kcontext.blockMatch( item3 );

        kcontext.unblockAllMatches( item3 );
           
        assertEquals( 0, item3.getBlockers().size() );
        assertNull( item3.getBlocked() );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        // use same data structure as testAddition
        DefaultKnowledgeHelper kcontext = new DefaultKnowledgeHelper( wm );
        kcontext.setActivation( item1 );
       
        // set blockers
        kcontext.blockMatch( item2 );
        kcontext.blockMatch( item3 );
       
         // set blocked
        kcontext.reset();
        kcontext.setActivation( item1 );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        DefaultKnowledgeHelper kcontext = new DefaultKnowledgeHelper( wm );
        kcontext.setActivation( item1 );
       
        // set blockers
        kcontext.blockMatch( item2 );
        kcontext.blockMatch( item3 );
       
         // set blocked
        kcontext.reset();
        kcontext.setActivation( item1 );
        kcontext.blockMatch( item4 );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        kcontext.blockMatch( item3 );
       
         // set blocked
        kcontext.reset();
        kcontext.setActivation( item1 );
        kcontext.blockMatch( item4 );
        kcontext.cancelRemainingPreviousLogicalDependencies();
       
        // check only item4 is blocked
        assertEquals( 1, item1.getBlocked().size() );
        assertEquals( item4, ((LogicalDependency)item1.getBlocked().getFirst()).getJustified() );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

       
        DefaultKnowledgeHelper kcontext = new DefaultKnowledgeHelper( wm );
        kcontext.setActivation( item1 );
       
        // set blockers
        kcontext.blockMatch( item2 );
        kcontext.blockMatch( item3 );
       
        assertNull( item1.getBlockers() );
        assertEquals( 2, item1.getBlocked().size() );
        assertEquals( 1, item2.getBlockers().size() );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        DefaultKnowledgeHelper kcontext = new DefaultKnowledgeHelper( wm );
        kcontext.setActivation( item1 );
       
        // set blockers
        kcontext.blockMatch( item2 );
        kcontext.blockMatch( item3 );
       
        assertNull( item1.getBlockers() );
        assertEquals( 2, item1.getBlocked().size() );
        assertEquals( 1, item2.getBlockers().size() );
        assertEquals( 1, item3.getBlockers().size() );
View Full Code Here

Examples of org.drools.core.base.DefaultKnowledgeHelper.blockMatch()

        assertEquals( 1, item2.getBlockers().size() );
        assertEquals( 1, item3.getBlockers().size() );
       
        kcontext.reset();
        kcontext.setActivation( item2 );
        kcontext.blockMatch( item3 );
        assertEquals( 2, item1.getBlocked().size() );
       
        assertEquals( 1, item2.getBlocked().size() );
        assertEquals( 1, item2.getBlockers().size() );
        assertEquals( 2, item3.getBlockers().size() );       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.