Examples of PropagationContext


Examples of org.drools.spi.PropagationContext

        FactHandleImpl handle1 = new FactHandleImpl( 1 );
        ReteTuple tuple1 = new ReteTuple( 0,
                                          handle1,
                                          workingMemory );

        final PropagationContext context1 = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                                    null,
                                                                    null );

        /* Test that a STATED assertion overrides a logical assertion */
        agenda.addToAgenda( tuple1,
View Full Code Here

Examples of org.drools.spi.PropagationContext

        FactHandleImpl handle1 = new FactHandleImpl( 1 );
        ReteTuple tuple1 = new ReteTuple( 0,
                                          handle1,
                                          workingMemory );

        PropagationContext context =  new PropagationContextImpl( PropagationContext.ASSERTION,
                                                              null,
                                                              null );
       
        Activation activation1 = new AgendaItem( tuple1,
                                                 context,
View Full Code Here

Examples of org.drools.spi.PropagationContext

        FactHandleImpl handle1 = new FactHandleImpl( 1 );
        ReteTuple tuple1 = new ReteTuple( 0,
                                          handle1,
                                          workingMemory );

        final PropagationContext context1 = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                                    null,
                                                                    null );

        /* get the activation onto the agenda*/
        agenda.addToAgenda( tuple1,
                            context1,
                            rule1 );

        /* Create the second justifer */
        final Rule rule2 = new Rule( "test-rule2" );
        rule2.setConsequence( consequence );
       
        FactHandleImpl handle2 = new FactHandleImpl( 2 );
        ReteTuple tuple2 = new ReteTuple( 0,
                                          handle2,
                                          workingMemory );

        final PropagationContext context2 = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                                    null,
                                                                    null );

        /* get the activations onto the agenda */
        agenda.addToAgenda( tuple2,
View Full Code Here

Examples of org.drools.spi.PropagationContext

    }

    public void testAssertObject() throws Exception
    {
        Rule rule = new Rule( "test-rule" );
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );
View Full Code Here

Examples of org.drools.spi.PropagationContext

    }

    public void testRetractObject() throws Exception
    {
        Rule rule = new Rule( "test-rule" );
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );
View Full Code Here

Examples of org.drools.spi.PropagationContext

                    ((Object[]) retracted.get( 0 ))[0] );
    }
   
    public void testPropogateOnAttachRule() throws FactException
    {
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );
View Full Code Here

Examples of org.drools.spi.PropagationContext

    }

    public void testPropagateAssertTuple() throws Exception
    {
        Rule rule = new Rule( "test-rule" );
        PropagationContext context = new PropagationContextImpl( PropagationContext.RETRACTION,
                                                             null,
                                                             null );
        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );

        MockTupleSource source = new MockTupleSource( 15 );
View Full Code Here

Examples of org.drools.spi.PropagationContext

    }

    public void testPropagateRetractTuple() throws Exception
    {
        Rule rule = new Rule( "test-rule" );
        PropagationContext context = new PropagationContextImpl( PropagationContext.RETRACTION,
                                                             null,
                                                             null );
        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );

        MockTupleSource source = new MockTupleSource( 15 );
View Full Code Here

Examples of org.drools.spi.PropagationContext

        }
    }
   
    public void testPropogateOnAttachRule() throws FactException
    {       
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );
        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );
       
        MockTupleSource source = new MockTupleSource( 15 );
View Full Code Here

Examples of org.drools.spi.PropagationContext

    }

    public void testAssertObject() throws Exception
    {
        Rule rule = new Rule( "test-rule" );
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );
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.