Examples of unstageActivations()


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

                                                null,
                                                true );
        node0.assertLeftTuple( tuple2,
                               context0,
                               workingMemory );
        agenda.unstageActivations();
        assertEquals( 1,
                      ruleFlowGroup0.size() );
        assertEquals( 0,
                      agenda.agendaSize() );
    }
View Full Code Here

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

        // lock-on-active is now false so activation should propagate
        rule.setLockOnActive( false );
        node.assertLeftTuple( tuple,
                              context,
                              workingMemory );
        agenda.unstageActivations();
        assertEquals( 1,
                      ruleFlowGroup.size() );

        // even if lock-on-active is true, unless the agenda group is active the activation will still propagate
        rule.setLockOnActive( true );
View Full Code Here

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

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

        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

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

        // put another one on agendaGroup 1
        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 agendaGroup2
        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()

                      agenda.getFocus().size() );

        node3.assertLeftTuple( tuple,
                               context3,
                               workingMemory );
        agenda.unstageActivations();
       
        // agendaGroup2 now has 2 activations
        assertEquals( 2,
                      agenda.getFocus().size() );
View Full Code Here

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

        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

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

        node1.assertLeftTuple( tuple,
                               context1,
                               workingMemory );
  
       
        agenda.unstageActivations();
        agenda.fireNextItem( null );
        assertEquals( 100, cheese.getPrice() );
       
        final PropagationContext context0 = new PropagationContextImpl( 0,
                                                                        PropagationContext.DELETION,
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.