Package org.drools.core.reteoo

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


                    ((RightTuple) values[0]).getFactHandle() );

        // Test single activation for a single logical assertions. This also
        // tests that logical assertions live on after the related Activation
        // has fired.
        node.assertLeftTuple( tuple1,
                              context1,
                              ksession );
        logicalHandle = (InternalFactHandle) ksession.insert( logicalString,
                                                                   null,
                                                                   false,
View Full Code Here


                                                                              true);

        assertEquals(0,
                     data.size());

        node.assertLeftTuple(tuple,
                             context,
                             workingMemory);
        workingMemory.fireAllRules();

        // sleep for 300ms
View Full Code Here

                                                                                             null);
                    final RuleTerminalNodeLeftTuple tuple2 = new RuleTerminalNodeLeftTuple(new DefaultFactHandle(2,
                                                                                                                 "cheese"),
                                                                                           node,
                                                                                           true);
                    node.assertLeftTuple(tuple2,
                                         context2,
                                         (AbstractWorkingMemory) workingMemory);
                }
                data.add("tested");
            }
View Full Code Here

                                                                                                     "cheese"),
                                                                               node,
                                                                               true);
        rule.setTimer(new DurationTimer(50));

        node.assertLeftTuple(tuple1,
                             context1,
                             workingMemory);

        assertEquals(0,
                     data.size());
View Full Code Here

                                                                                             null);
                    final RuleTerminalNodeLeftTuple tuple2 = new RuleTerminalNodeLeftTuple(new DefaultFactHandle(2,
                                                                                                                 "cheese"),
                                                                                           node,
                                                                                           true);
                    node.assertLeftTuple(tuple2,
                                         context2,
                                         (AbstractWorkingMemory) workingMemory);
                }
                data.add("tested");
            }
View Full Code Here

        final RuleTerminalNodeLeftTuple tuple1 = new RuleTerminalNodeLeftTuple(new DefaultFactHandle(1,
                                                                                                     "cheese"),
                                                                               node,
                                                                               true);
        node.assertLeftTuple(tuple1,
                             context1,
                             workingMemory);
        assertEquals(0,
                     data.size());
View Full Code Here

        node1.assertLeftTuple(tuple1,
                              context1,
                              workingMemory);

        node2.assertLeftTuple(tuple2,
                              context1,
                              workingMemory);

        agenda.unstageActivations();
View Full Code Here

            }
        });

        assertEquals(50, cheese.getPrice());

        node1.assertLeftTuple(tuple,
                              context1,
                              workingMemory);


        agenda.unstageActivations();
View Full Code Here

                        return true;
                    }
                };

        rule.setNoLoop(false);
        node.assertLeftTuple(tuple,
                             context,
                             workingMemory);

        agenda.unstageActivations();
View Full Code Here

                        return false;
                    }
                };

        rule.setNoLoop(false);
        node.assertLeftTuple(tuple,
                             context,
                             workingMemory);

        agenda.unstageActivations();
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.