Examples of PropagationContext


Examples of org.drools.core.spi.PropagationContext

                rightTuple = next;
                continue;
            }

            FastIterator it = notNode.getLeftIterator(ltm);
            PropagationContext context = rightTuple.getPropagationContext();

            constraints.updateFromFactHandle(contextEntry,
                                             wm,
                                             rightTuple.getFactHandle());
            for (LeftTuple leftTuple = notNode.getFirstLeftTuple(rightTuple, ltm, context, it); leftTuple != null; ) {
View Full Code Here

Examples of org.drools.core.spi.PropagationContext

        boolean iterateFromStart = notNode.isIndexedUnificationJoin() || rtm.getIndexType().isComparison();

        for (RightTuple rightTuple = srcRightTuples.getUpdateFirst(); rightTuple != null; ) {
            RightTuple next = rightTuple.getStagedNext();
            PropagationContext context = rightTuple.getPropagationContext();

            constraints.updateFromFactHandle(contextEntry,
                                             wm,
                                             rightTuple.getFactHandle());
View Full Code Here

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

Examples of org.drools.spi.PropagationContext

    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

Examples of org.drools.spi.PropagationContext

    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

Examples of org.drools.spi.PropagationContext

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

Examples of org.drools.spi.PropagationContext

    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

Examples of org.drools.spi.PropagationContext

    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

Examples of org.drools.spi.PropagationContext

            }

        };
        rule.setDuration( duration );

        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

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