Examples of retractLeftTuple()


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

                                                                                      (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

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

            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

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

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

        node1.retractLeftTuple(tuple, context0, workingMemory);

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

    @Test
View Full Code Here

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

                                                                                      (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

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

        new RightTuple( logicalHandle,
                        sink );

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

        node.retractLeftTuple( tuple1,
                               context1,
                               workingMemory );

        workingMemory.executeQueuedActions();
View Full Code Here

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

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

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

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

        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

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

                    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

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

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

        node1.retractLeftTuple(tuple, context0, ksession);

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

    @Test
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.