Examples of agendaSize()


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

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

        // Reactivate an already active RuleFlowGroup should not have any effect
        agenda.activateRuleFlowGroup( "rule-flow-group-0" );
        assertEquals( 2,
                      ruleFlowGroup0.size() );
View Full Code Here

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

        // Reactivate an already active RuleFlowGroup should not have any effect
        agenda.activateRuleFlowGroup( "rule-flow-group-0" );
        assertEquals( 2,
                      ruleFlowGroup0.size() );
        assertEquals( 2,
                      agenda.agendaSize() );

        // Deactivate the RuleFlowGroup, the activations should be removed from
        // the agenda but still in the RuleFlowGroup
        agenda.deactivateRuleFlowGroup( "rule-flow-group-0" );
        assertEquals( 2,
View Full Code Here

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

        // the agenda but still in the RuleFlowGroup
        agenda.deactivateRuleFlowGroup( "rule-flow-group-0" );
        assertEquals( 2,
                      ruleFlowGroup0.size() );
        assertEquals( 0,
                      agenda.agendaSize() );

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

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

        // should now also be in the Agenda again
        agenda.activateRuleFlowGroup( "rule-flow-group-0" );
        assertEquals( 2,
                      ruleFlowGroup0.size() );
        assertEquals( 2,
                      agenda.agendaSize() );

    }

    /**
     * Test auto-deactivation of RuleFlowGroup.
View Full Code Here

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

        // RuleFlowGroup should be populated, but the agenda shouldn't be
        assertEquals( 1,
                      ruleFlowGroup0.size() );
        assertEquals( 0,
                      agenda.agendaSize() );

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

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

        // should now also be in the Agenda
        agenda.activateRuleFlowGroup( "rule-flow-group-0" );
        assertEquals( 1,
                      ruleFlowGroup0.size() );
        assertEquals( 1,
                      agenda.agendaSize() );

        // Execute activation
        agenda.fireNextItem( null );
        assertEquals( 0,
                      ruleFlowGroup0.size() );
View Full Code Here

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

        // Execute activation
        agenda.fireNextItem( null );
        assertEquals( 0,
                      ruleFlowGroup0.size() );
        assertEquals( 0,
                      agenda.agendaSize() );
        assertTrue( ruleFlowGroup0.isActive() );

        // Set auto-deactivation status to true
        ruleFlowGroup0.setAutoDeactivate( true );
        assertTrue( ruleFlowGroup0.isAutoDeactivate() );
View Full Code Here

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

        assertEquals( 1,
                      ruleFlowGroup2.size() );
        assertEquals( 1,
                      ruleFlowGroup3.size() );
        assertEquals( 0,
                      agenda.agendaSize() );

        // Activate process instance, the activations stay in the group,
        // but should now also be in the Agenda
        processInstance.start();
        assertEquals( ProcessInstance.STATE_ACTIVE,
View Full Code Here

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

        assertEquals( ProcessInstance.STATE_ACTIVE,
                      processInstance.getState() );
        assertEquals( 2,
                      ruleFlowGroup0.size() );
        assertEquals( 2,
                      agenda.agendaSize() );

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

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

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

        // on firing the last activation the child rule flow groups should
        // activate and thus repopulate the agenda
        agenda.fireNextItem( null );
        workingMemory.executeQueuedActions();
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.