Package org.drools.core.reteoo

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


        new RightTuple( logicalHandle,
                        sink );

        agenda.fireNextItem( null, 0, -1 );

        node.retractLeftTuple( tuple1,
                               context1,
                               ksession );

        ksession.executeQueuedActions();
View Full Code Here


        // This assertion is stated and should override any previous justified
        // "equals" objects.
        String logicalString2 = new String( "logical" );
        FactHandle logicalHandle2 = ksession.insert( logicalString2 );

        node.retractLeftTuple( tuple1,
                               context1,
                               ksession );

        assertLength( 0,
                      sink.getRetracted() );
View Full Code Here

        // return the matched handle

        assertSame( logicalHandle2,
                    logicalHandle1 );

        node.retractLeftTuple( tuple1,
                               context1,
                               ksession );

        assertLength( 0,
                      sink.getRetracted() );
View Full Code Here

        BeliefSet bs =  ( BeliefSet ) logicalHandle2.getEqualityKey().getBeliefSet();      
        assertEquals( "value1", ((LogicalDependency) ((LinkedListEntry)bs.getFirst()).getObject()).getMode() );
        assertEquals( "value2", ((LogicalDependency) ((LinkedListEntry)bs.getFirst().getNext()).getObject()).getMode() );

        // Now lets cancel the first activation
        node2.retractLeftTuple( tuple2,
                                context2,
                                ksession );

        ksession.executeQueuedActions();
View Full Code Here

                                                                                      (Activation) tuple1.getObject() );
        new RightTuple( logicalHandle,
                        sink );
        context1.setFactHandle( handle1 );
        // Retract the tuple and test the logically asserted fact was also deleted
        node.retractLeftTuple( tuple1,
                               context1,
                               ksession );

        ksession.executeQueuedActions();
View Full Code Here

            if (rtnLeftTuple != null) {
                RuleTerminalNode rtn = (RuleTerminalNode) rtnLeftTuple.getSink();
                if ( rtnLeftTuple.getMemory() != null ) {
                    executor.removeLeftTuple(rtnLeftTuple);
                }
                rtn.retractLeftTuple(rtnLeftTuple,
                                     rtnLeftTuple.getPropagationContext(),
                                     wm);
            }

            if (mainLeftTuple != null) {
View Full Code Here

                                                                                 PropagationContext.DELETION,
                                                                                 rule1,
                                                                                 null,
                                                                                 new DefaultFactHandle());

        node1.retractLeftTuple(tuple, context0, workingMemory);

        assertEquals(50, cheese.getPrice());
    }

    @Test
View Full Code Here

                                                                                      (Activation) tuple1.getObject() );
        new RightTuple( logicalHandle,
                        sink );
        context1.setFactHandle( handle1 );
        // Retract the tuple and test the logically asserted fact was also retracted
        node.retractLeftTuple( tuple1,
                               context1,
                               workingMemory );

        workingMemory.executeQueuedActions();
View Full Code Here

        new RightTuple( logicalHandle,
                        sink );

        agenda.fireNextItem( null, 0, -1 );

        node.retractLeftTuple( tuple1,
                               context1,
                               workingMemory );

        workingMemory.executeQueuedActions();
View Full Code Here

        // This assertion is stated and should override any previous justified
        // "equals" objects.
        String logicalString2 = new String( "logical" );
        FactHandle logicalHandle2 = workingMemory.insert( logicalString2 );

        node.retractLeftTuple( tuple1,
                               context1,
                               workingMemory );

        assertLength( 0,
                      sink.getRetracted() );
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.