Package org.drools.core.reteoo

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


        // return the matched handle

        assertSame( logicalHandle2,
                    logicalHandle1 );

        node.retractLeftTuple( tuple1,
                               context1,
                               workingMemory );

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


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

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

        workingMemory.executeQueuedActions();
View Full Code Here

                    private static final long serialVersionUID = 510l;

                    public void evaluate(KnowledgeHelper knowledgeHelper,
                                         WorkingMemory w) {
                        // deactivate rule1
                        node1.retractLeftTuple(tuple1,
                                               context0,
                                               workingMemory);
                    }

                    public void readExternal(ObjectInput in) throws IOException,
View Full Code Here

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

        node1.retractLeftTuple(tuple, context0, ksession);

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

    @Test
View Full Code Here

                    private static final long serialVersionUID = 510l;

                    public void evaluate(KnowledgeHelper knowledgeHelper,
                                         WorkingMemory w) {
                        // deactivate rule1
                        node1.retractLeftTuple(tuple1,
                                               context0,
                                               ksession);
                    }

                    public void readExternal(ObjectInput in) throws IOException,
View Full Code Here

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

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

        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

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.