Package org.drools.spi

Examples of org.drools.spi.PropagationContext


   
    void updateWorkingMemory(WorkingMemoryImpl workingMemory) throws FactException
    {
        Iterator it = this.rulesToUpdate.iterator();
        ObjectTypeNode node = null;
        PropagationContext context = new PropagationContextImpl( PropagationContext.ASSERTION,
                                                             null,
                                                             null );
        while( it.hasNext() )
        {           
            node =  ( ObjectTypeNode ) it.next();
View Full Code Here


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

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

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

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

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

        MockObjectSource source = new MockObjectSource( 15 );

View Full Code Here

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

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

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

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

            }

        };
        rule.setDuration( duration );

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

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

            public void invoke(Activation activation)
            {
                /* on first invoke add another one to the agenda */
                if ( data.size() < 3 )
                {
                    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

            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

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

TOP

Related Classes of org.drools.spi.PropagationContext

Copyright © 2018 www.massapicom. 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.