Package org.drools.core.reteoo

Examples of org.drools.core.reteoo.RuleTerminalNode.assertLeftTuple()


                                                                                true );

        final PropagationContext context1 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        // Test single activation for a single logical assertions
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        final String logicalString1 = new String( "logical" );
        FactHandle logicalHandle1 = ksession.insert( logicalString1,
View Full Code Here


                                                                                true );

        final PropagationContext context1 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        // Test that a STATED assertion overrides a logical assertion
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        String logicalString1 = new String( "logical" );
        FactHandle logicalHandle1 = ksession.insert( logicalString1,
View Full Code Here

        // they are not identity same
        assertNotSame( logicalString1,
                       ksession.getObject( logicalHandle2 ) );

        // Test that a logical assertion cannot override a STATED assertion
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        logicalString2 = new String( "logical" );
        logicalHandle2 = ksession.insert( logicalString2 );
View Full Code Here

                                                                                node,
                                                                                true );

        final PropagationContext context = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        node.assertLeftTuple( tuple1,
                              context,
                              ksession );

        // Assert the logical "logical" fact
        final String logicalString1 = new String( "logical" );
View Full Code Here

        node.assertLeftTuple( tuple2,
                              context,
                              ksession );

        node2.assertLeftTuple( tuple2,
                               context,
                               ksession );

        // Assert the logical "logical" fact
        final String logicalString2 = new String( "logical" );
View Full Code Here

                                                                                node,
                                                                                true );

        final PropagationContext context1 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());
        // get the activation onto the agenda
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        // Create the second justifier
        final RuleImpl rule2 = new RuleImpl( "test-rule2" );
View Full Code Here

                                                                                true );

        final PropagationContext context2 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        // get the activations onto the agenda
        node2.assertLeftTuple( tuple2,
                               context2,
                               ksession );

        // Create the first justifieable relationship
        final String logicalString1 = new String( "logical" );
View Full Code Here

                                                                                true );

        final PropagationContext context1 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        // Assert multiple stated objects
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        final String statedString1 = new String( "logical" );
        final FactHandle statedHandle1 = ksession.insert( statedString1 );
View Full Code Here

                                                                                true );

        final PropagationContext context1 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        // Test that a STATED assertion overrides a logical assertion
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        final Cheese cheese = new Cheese( "brie",
                                          10 );
View Full Code Here

                                                                                true );

        final PropagationContext context1 = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, new DefaultFactHandle());

        // Test single activation for a single logical assertions
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );

        final String logicalString = new String( "logical" );
        InternalFactHandle logicalHandle = (InternalFactHandle) ksession.insert( logicalString,
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.