Package org.drools.common

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


        rule.setLockOnActive( true );
        ruleFlowGroup.setActive( false );
        node.assertLeftTuple( tuple,
                              context,
                              workingMemory );
        agenda.unstageActivations();
        assertEquals( 2,
                      ruleFlowGroup.size() );
    }

    @Test
View Full Code Here


        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

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

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

        node2.assertLeftTuple( tuple,
                               context1,
                               workingMemory );
       
        agenda.unstageActivations();

        // make sure we have an activation in the current focus
        assertEquals( 1,
                      agenda.getFocus().size() );
View Full Code Here

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

        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

        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

        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

                      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

        // 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

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.