Examples of fireNextItem()


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

        assertEquals( 1,
                      agenda.agendaSize() );
        assertTrue( ruleFlowGroup0.isActive() );

        // Execute the activation, the RuleFlowGroup should automatically deactivate
        agenda.fireNextItem( null );
        assertEquals( 0,
                      ruleFlowGroup0.size() );
        assertEquals( 0,
                      agenda.agendaSize() );
        workingMemory.executeQueuedActions();
View Full Code Here

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

        // check totalAgendaSize still works
        assertEquals( 5,
                      agenda.agendaSize() );

        // ok now lets check that stacks work with fireNextItem
        agenda.fireNextItem( null );

        // agendaGroup2 should still be the current agendaGroup
        assertEquals( agendaGroup2,
                      agenda.getFocus() );
        // agendaGroup2 has gone from 2 to one activations
View Full Code Here

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

        // check totalAgendaSize has reduced too
        assertEquals( 4,
                      agenda.agendaSize() );

        // now repeat the process
        agenda.fireNextItem( null );

        // focus is still agendaGroup2, but now its empty
        assertEquals( agendaGroup2,
                      agenda.getFocus() );
        assertEquals( 0,
View Full Code Here

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

                      agenda.getFocus().size() );
        assertEquals( 3,
                      agenda.agendaSize() );

        // repeat fire again
        agenda.fireNextItem( null );

        // agendaGroup2 is empty so it should be popped from the stack making agendaGroup1 the current agendaGroup
        assertEquals( agendaGroup1,
                      agenda.getFocus() );
        // agendaGroup1 had 2 activations, now it only has 1
View Full Code Here

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

                      agenda.getFocus().size() );
        assertEquals( 2,
                      agenda.agendaSize() );

        // repeat fire again
        agenda.fireNextItem( null );

        assertEquals( agendaGroup1,
                      agenda.getFocus() );
        assertEquals( 0,
                      agenda.getFocus().size() );
View Full Code Here

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

                      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 );

        assertEquals( agenda.getFocus(),
                      main );
        assertEquals( 0,
                      agenda.getFocus().size() );
View Full Code Here

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

                               context1,
                               workingMemory );
  
       
        agenda.unstageActivations();
        agenda.fireNextItem( null );
        assertEquals( 100, cheese.getPrice() );
       
        final PropagationContext context0 = new PropagationContextImpl( 0,
                                                                        PropagationContext.DELETION,
                                                                        rule1,
View Full Code Here

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

        agenda.unstageActivations();

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

        // check focus is empty
        assertEquals( 0,
                      agenda.getFocus().size() );
View Full Code Here

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

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

        // make sure the focus is empty
        assertEquals( 0,
                      agenda.getFocus().size() );
View Full Code Here

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

        // check totalAgendaSize still works
        assertEquals( 5,
                      agenda.agendaSize() );

        // ok now lets check that stacks work with fireNextItem
        agenda.fireNextItem( null );

        // agendaGroup3 should still be the current agendaGroup
        assertEquals( agenda.getFocus(),
                      agendaGroup3 );
        // agendaGroup3 has gone from 2 to one activations
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.