Examples of retractLeftTuple()


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,
                                               ksession);
                    }

                    public void readExternal(ObjectInput in) throws IOException,
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,
                                ksession );

        ksession.executeQueuedActions();
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 deleted
        node.retractLeftTuple( tuple1,
                               context1,
                               ksession );

        ksession.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,
                               ksession );

        ksession.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 = ksession.insert( logicalString2 );

        node.retractLeftTuple( tuple1,
                               context1,
                               ksession );

        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,
                               ksession );

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

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

                LeftTuple rtnLeftTuple = ( LeftTuple ) leftTuple.getObject();
                LeftTuple mainLeftTuple = leftTuple.getFirstChild();
                          
                if ( rtnLeftTuple != null ) {
                    RuleTerminalNode rtn = ( RuleTerminalNode ) rtnLeftTuple.getSink();
                    rtn.retractLeftTuple( rtnLeftTuple, rtnLeftTuple.getPropagationContext(), wm );
                }
               
              if ( mainLeftTuple != null ) {                   
                  switch ( mainLeftTuple.getStagedType() ) {
                      // handle clash with already staged entries
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.