Package org.drools.core.common

Examples of org.drools.core.common.InternalAgenda.agendaSize()


        assertEquals(agenda.getFocus(),
                     agendaGroup2);
        assertEquals(0,
                     agenda.getFocus().size());
        assertEquals(1,
                     agenda.agendaSize());

        // this last fire is more interesting as it demonstrates that
        // agendaGroup1 on
        // the stack before agendaGroup2 gets skipped as it has no activations
        agenda.fireNextItem(null, 0, -1);
View Full Code Here


        assertEquals(agenda.getFocus(),
                     main);
        assertEquals(0,
                     agenda.getFocus().size());
        assertEquals(0,
                     agenda.agendaSize());

    }

    //
    @Test
View Full Code Here

        // make sure the activation-group-3 is cleared when we can clear the Agenda Group for the activation that is in both
        final ActivationGroup activationGroup3 = agenda.getActivationGroup("activation-group-3");

        assertEquals(4,
                     agenda.agendaSize());
        assertEquals(1,
                     activationGroup3.size());

        agenda.clearAndCancelAgendaGroup("agendaGroup3");
        assertEquals(3,
View Full Code Here

        assertEquals(1,
                     activationGroup3.size());

        agenda.clearAndCancelAgendaGroup("agendaGroup3");
        assertEquals(3,
                     agenda.agendaSize());
        assertEquals(0,
                     activationGroup3.size());

        // Activation for activation-group-0 should be next - the activation in no activation/agenda group should remain on the agenda
        agenda.fireNextItem(null, 0, -1);
View Full Code Here

                     activationGroup3.size());

        // Activation for activation-group-0 should be next - the activation in no activation/agenda group should remain on the agenda
        agenda.fireNextItem(null, 0, -1);
        assertEquals(1,
                     agenda.agendaSize());
        assertEquals(0,
                     activationGroup0.size());

        // Fire  the  last activation and  make sure the Agenda Empties
        agenda.fireNextItem(null, 0, -1);
View Full Code Here

                     activationGroup0.size());

        // Fire  the  last activation and  make sure the Agenda Empties
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     agenda.agendaSize());

        assertEquals(2,
                     list.size());
        assertEquals(rule1,
                     list.get(0));
View Full Code Here

        assertEquals(1,
                     ruleFlowGroup1.size());
        assertEquals(1,
                     ruleFlowGroup2.size());
        assertEquals(4,
                     agenda.agendaSize());

        // Activate the RuleFlowGroup, the nodes stay in the group, but should now also be in the Agenda
        agenda.activateRuleFlowGroup("rule-flow-group-0");
        assertEquals(2,
                     ruleFlowGroup0.size());
View Full Code Here

        // Activate the RuleFlowGroup, the nodes stay in the group, but should now also be in the Agenda
        agenda.activateRuleFlowGroup("rule-flow-group-0");
        assertEquals(2,
                     ruleFlowGroup0.size());
        assertEquals(4,
                     agenda.agendaSize());

        // As we fire each rule they are removed from both the Agenda and the RuleFlowGroup
        agenda.fireNextItem(null, 0, -1);
        assertEquals(1,
                     ruleFlowGroup0.size());
View Full Code Here

        // As we fire each rule they are removed from both the Agenda and the RuleFlowGroup
        agenda.fireNextItem(null, 0, -1);
        assertEquals(1,
                     ruleFlowGroup0.size());
        assertEquals(3,
                     agenda.agendaSize());

        // After firing all activations of RuleFlowGroup 0, the agenda is empty
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     ruleFlowGroup0.size());
View Full Code Here

        assertEquals(1,
                     agendaGroup2.size());

        // make sure total agenda size reflects this
        assertEquals(2,
                     agenda.agendaSize());

        // put another one on agendaGroup 2
        node2.assertLeftTuple(tuple3,
                              context2,
                              ksession);
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.