Examples of PropagationContext


Examples of org.drools.spi.PropagationContext

            public void invoke(Activation activation)
            {
                /* on first invoke add another one to the agenda */
                if ( data.size() < 5 )
                {
                    PropagationContext context2 = new PropagationContextImpl( 0,
                                                                              rule,
                                                                              activation );
                    ReteTuple tuple2 = new ReteTuple( 0,
                                                      new FactHandleImpl( 2 ),
                                                      workingMemory );

                    agenda.addToAgenda( tuple2,
                                        context2,
                                        rule );
                }
                data.add( "tested" );
            }
        } );

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

        ReteTuple tuple1 = new ReteTuple( 0,
                                          new FactHandleImpl( 1 ),
View Full Code Here

Examples of org.drools.spi.PropagationContext

        };
        rule.setDuration( duration );

        final List data = new ArrayList();

        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                                 null,
                                                                 null );

        ReteTuple tuple = new ReteTuple( 0,
                                         new FactHandleImpl( 1 ),
View Full Code Here

Examples of org.drools.spi.PropagationContext

    /**
     * All objects asserted to a RootNode must be propagated to all children ObjectTypeNodes.
     */
    public void testAssertObject() throws Exception
    {
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        /* Create and assert two objects */
        Object object1 = new Object();
View Full Code Here

Examples of org.drools.spi.PropagationContext

    /**
     * All objects retracted from a RootNode must be propagated to all children ObjectTypeNodes.
     */
    public void testRetractObject() throws Exception
    {
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        FactHandleImpl handle1 = new FactHandleImpl( 1 );
        FactHandleImpl handle2 = new FactHandleImpl( 2 );
View Full Code Here

Examples of org.drools.spi.PropagationContext

                      sink3.getRetracted() );
    }

    public void testPropogateOnAttachRule() throws FactException
    {
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );

        /* Create an initial rete with just two object type nodes */
        this.rete = new Rete();
View Full Code Here

Examples of org.drools.spi.PropagationContext

    }

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

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

Examples of org.drools.spi.PropagationContext

    public void testPropagateRetractObject() throws Exception
    {

        Rule rule = new Rule( "test-rule" );
        PropagationContext context = new PropagationContextImpl( PropagationContext.RETRACTION,
                                                             null,
                                                             null );
        WorkingMemoryImpl workingMemory = new WorkingMemoryImpl( new RuleBaseImpl( new Rete() ) );

        MockObjectSource source = new MockObjectSource( 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() ) );
       
        MockObjectSource source = new MockObjectSource( 15 );
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 );

        /* Test single activation for a single logical assertions */
        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 );

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

        /* Test single activation for a single logical assertions */
        agenda.addToAgenda( tuple1,
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.