Package org.drools.common

Examples of org.drools.common.PropagationContextImpl


                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context1 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
View Full Code Here


                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context1 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
View Full Code Here

                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context1 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
View Full Code Here

                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
                                                                       null );
View Full Code Here

                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context1 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
        // get the activation onto the agenda
        node.assertLeftTuple( tuple1,
                              context1,
                              workingMemory );

        // Create the second justifier
        final Rule rule2 = new Rule( "test-rule2" );
        final RuleTerminalNode node2 = new RuleTerminalNode( idGenerator.getNextId(),
                                                             new MockTupleSource( idGenerator.getNextId() ),
                                                             rule2,
                                                             rule2.getLhs(),
                                                             buildContext );
        rule2.setConsequence( consequence );

        final DefaultFactHandle handle2 = new DefaultFactHandle( 2,
                                                                 "cheese" );
        final LeftTuple tuple2 = new LeftTuple( handle2,
                                                null,
                                                true  );

        final PropagationContext context2 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
View Full Code Here

                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context1 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
View Full Code Here

                                                                 "cheese" );
        final LeftTuple tuple1 = new LeftTuple( handle1,
                                                null,
                                                true  );

        final PropagationContext context1 = new PropagationContextImpl( 0,
                                                                        PropagationContext.ASSERTION,
                                                                        null,
                                                                        null,
                                                                        null );
View Full Code Here

        // ArrayList matches all three ObjectTypeNodes
        final DefaultFactHandle h1 = new DefaultFactHandle( 1,
                                                            new ArrayList() );
        rete.assertObject( h1,
                           new PropagationContextImpl( 0,
                                                       PropagationContext.ASSERTION,
                                                       null,
                                                       null,
                                                       null ),
                           workingMemory );

        // LinkedList matches two ObjectTypeNodes       
        h1.setObject( new LinkedList() );
        rete.assertObject( h1,
                           new PropagationContextImpl( 0,
                                                       PropagationContext.ASSERTION,
                                                       null,
                                                       null,
                                                       null ),
                           workingMemory );              
View Full Code Here

        final String string = "String";
        final DefaultFactHandle h1 = new DefaultFactHandle( 1,
                                                            string );

        rete.assertObject( h1,
                           new PropagationContextImpl( 0,
                                                       PropagationContext.ASSERTION,
                                                       null,
                                                       null,
                                                       null ),
                           workingMemory );

        assertLength( 0,
                      sink1.getAsserted() );

        // There is a List ObjectTypeNode, make sure it was propagated
        final List list = new ArrayList();
        final DefaultFactHandle h2 = new DefaultFactHandle( 1,
                                                            list );

        rete.assertObject( h2,
                           new PropagationContextImpl( 0,
                                                       PropagationContext.ASSERTION,
                                                       null,
                                                       null,
                                                       null ),
                           workingMemory );
View Full Code Here

        final String string = "String";
        final DefaultFactHandle h1 = new DefaultFactHandle( 1,
                                                            string );

        rete.assertObject( h1,
                           new PropagationContextImpl( 0,
                                                       PropagationContext.ASSERTION,
                                                       null,
                                                       null,
                                                       null ),
                           workingMemory );
        assertLength( 0,
                      sink1.getAsserted() );
        assertLength( 0,
                      sink1.getRetracted() );

        // There is a List ObjectTypeNode, make sure it was propagated
        final List list = new ArrayList();
        final DefaultFactHandle h2 = new DefaultFactHandle( 1,
                                                            list );

        // need  to assert first, to force it to build  up the cache
        rete.assertObject( h2,
                           new PropagationContextImpl( 0,
                                                       PropagationContext.ASSERTION,
                                                       null,
                                                       null,
                                                       null ),
                           workingMemory );

        rete.retractObject( h2,
                            new PropagationContextImpl( 0,
                                                        PropagationContext.ASSERTION,
                                                        null,
                                                        null,
                                                        null ),
                            workingMemory );
View Full Code Here

TOP

Related Classes of org.drools.common.PropagationContextImpl

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.