Examples of ReteTuple


Examples of org.drools.reteoo.ReteTuple

        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        final AgendaItem item = new AgendaItem( 0,
                                                tuple,
                                                10,
                                                new PropagationContextImpl(1, 1, null, null),
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        final AgendaItem item = new AgendaItem( 0,
                                                tuple,
                                                10,
                                                null,
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        assertTrue( eval.isAllowed( tuple,
                                    wm ) );

        cheddar.setPrice( 9 );
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Person p = new Person("mark", "", 31);
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( p );
        final ReteTuple tuple = new ReteTuple( f0 );

        SalienceBuilder salienceBuilder = new MVELSalienceBuilder();
        salienceBuilder.build( context );
               
        assertEquals( 25, context.getRule().getSalience().getValue( tuple, wm ) );
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

                                           10 );

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        ReteTuple tuple = new ReteTuple( f0 );

        final InternalFactHandle f1 = (InternalFactHandle) wm.insert( stilton );
        tuple = new ReteTuple( tuple,
                               f1 );

        final Cheese brie = new Cheese( "brie",
                                        20 );
        assertTrue( returnValue.isAllowed( extractor,
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

                                           10 );

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        ReteTuple tuple = new ReteTuple( f0 );

        final InternalFactHandle f1 = (InternalFactHandle) wm.insert( stilton );
        tuple = new ReteTuple( tuple,
                               f1 );

        final Cheese brie = new Cheese( "brie",
                                        20 );
        assertTrue( returnValue.isAllowed( extractor,
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

                                           10 );

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        final PredicateContextEntry predicateContext = new PredicateContextEntry();
        predicateContext.leftTuple = tuple;

        assertTrue( predicate.isAllowedCachedLeft( predicateContext,
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        final AgendaItem item = new AgendaItem( 0,
                                                tuple,
                                                10,
                                                new PropagationContextImpl(1, 1, null, null),
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        final AgendaItem item = new AgendaItem( 0,
                                                tuple,
                                                10,
                                                null,
View Full Code Here

Examples of org.drools.reteoo.ReteTuple

        final WorkingMemory wm = ruleBase.newStatefulSession();

        final Cheese cheddar = new Cheese( "cheddar",
                                           10 );
        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
        final ReteTuple tuple = new ReteTuple( f0 );

        assertTrue( eval.isAllowed( tuple,
                                    wm ) );

        cheddar.setPrice( 9 );
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.