Examples of unstageActivations()


Examples of org.drools.common.DefaultAgenda.unstageActivations()

        rule.setNoLoop( false );
        node.assertLeftTuple( tuple,
                              context,
                              workingMemory );
       
        agenda.unstageActivations();

        // check there is an item to fire
        assertEquals( 1,
                      agenda.getFocus().size() );
        agenda.fireNextItem( filterTrue );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        rule.setNoLoop( false );
        node.assertLeftTuple( tuple,
                              context,
                              workingMemory );

        agenda.unstageActivations();
       
        // check we have an item to fire
        assertEquals( 1,
                      agenda.getFocus().size() );
        agenda.fireNextItem( filterFalse );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        node0.assertLeftTuple( tuple,
                               context0,
                               workingMemory );
       
        agenda.unstageActivations();

        // check focus is main
        final AgendaGroup main = agenda.getAgendaGroup( AgendaGroup.MAIN );
        assertEquals( agenda.getFocus(),
                      main );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

                      agenda.getFocus().size() );
        node2.assertLeftTuple( tuple,
                               context2,
                               workingMemory );
       
        agenda.unstageActivations();

        // main is still focus and this tuple went to agendaGroup 2
        assertEquals( 1,
                      agenda.getFocus().size() );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        // put another one on agendaGroup 2
        node2.assertLeftTuple( tuple,
                               context2,
                               workingMemory );
       
        agenda.unstageActivations();

        // main is still focus so shouldn't have increased
        assertEquals( 1,
                      agenda.getFocus().size() );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        // add to agendaGroup 3
        node3.assertLeftTuple( tuple,
                               context3,
                               workingMemory );
       
        agenda.unstageActivations();

        assertEquals( 1,
                      agenda.getFocus().size() );

        node3.assertLeftTuple( tuple,
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        node3.assertLeftTuple( tuple,
                               context3,
                               workingMemory );
       
        agenda.unstageActivations();

        // agendaGroup3 now has 2 activations
        assertEquals( 2,
                      agenda.getFocus().size() );
        // check totalAgendaSize still works
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        // Assert the tuple and check it was added to activation-group-0
        node0.assertLeftTuple( tuple,
                               context0,
                               workingMemory );
        agenda.unstageActivations();
        final ActivationGroup activationGroup0 = agenda.getActivationGroup( "activation-group-0" );
        assertEquals( 1,
                      activationGroup0.size() );

        // Removing a tuple should remove the activation from the activation-group-0 again
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        // Assert the tuple again and check it was added to activation-group-0
        node0.assertLeftTuple( tuple,
                               context0,
                               workingMemory );
        agenda.unstageActivations();
        assertEquals( 1,
                      activationGroup0.size() );

        // Assert another tuple and check it was added to activation-group-0
        node1.assertLeftTuple( tuple,
View Full Code Here

Examples of org.drools.common.DefaultAgenda.unstageActivations()

        // Assert another tuple and check it was added to activation-group-0
        node1.assertLeftTuple( tuple,
                               context1,
                               workingMemory );
        agenda.unstageActivations();
        assertEquals( 2,
                      activationGroup0.size() );

        // There should now be two potential activations to fire
        assertEquals( 2,
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.