Package org.drools.core.reteoo

Examples of org.drools.core.reteoo.MockTupleSource


        final RuleImpl rule0 = new RuleImpl("test-rule0");
        rule0.setAgendaGroup("rule-flow-group-0");
        rule0.setConsequence(consequence0);

        final RuleTerminalNode node0 = new RuleTerminalNode(1,
                                                            new MockTupleSource(2),
                                                            rule0,
                                                            rule0.getLhs(),
                                                            0,
                                                            buildContext);
View Full Code Here


        final RuleImpl rule0 = new RuleImpl("test-rule0");
        rule0.setAgendaGroup("rule-flow-group-0");
        rule0.setConsequence(consequence0);

        final RuleTerminalNode node0 = new RuleTerminalNode(idGenerator.getNextId(),
                                                            new MockTupleSource(idGenerator.getNextId()),
                                                            rule0,
                                                            rule0.getLhs(),
                                                            0,
                                                            buildContext);
View Full Code Here

        // create a rule for the agendaGroup
        final RuleImpl rule = new RuleImpl("test-rule");
        rule.setAgendaGroup("rule-flow-group-0");
        final RuleTerminalNode node = new RuleTerminalNode(2,
                                                           new MockTupleSource(2),
                                                           rule,
                                                           rule.getLhs(),
                                                           0,
                                                           buildContext);
View Full Code Here

        };

        // create a rule for each agendaGroup
        final RuleImpl rule0 = new RuleImpl("test-rule0");
        final RuleTerminalNode node0 = new RuleTerminalNode(3,
                                                            new MockTupleSource(2),
                                                            rule0,
                                                            rule0.getLhs(),
                                                            0,
                                                            buildContext);

        rule0.setConsequence(consequence);
        final PropagationContext context0 = pctxFactory.createPropagationContext(0,
                                                                                 PropagationContext.INSERTION,
                                                                                 rule0,
                                                                                 null,
                                                                                 new DefaultFactHandle());

        final RuleImpl rule1 = new RuleImpl("test-rule1",
                                    "agendaGroup1");
        final RuleTerminalNode node1 = new RuleTerminalNode(5,
                                                            new MockTupleSource(4),
                                                            rule1,
                                                            rule1.getLhs(),
                                                            0,
                                                            buildContext);
        rule1.setConsequence(consequence);
        final PropagationContext context1 = pctxFactory.createPropagationContext(0,
                                                                                 PropagationContext.INSERTION,
                                                                                 rule1,
                                                                                 null,
                                                                                 new DefaultFactHandle());

        final RuleImpl rule2 = new RuleImpl("test-rule2",
                                    "agendaGroup1");
        final RuleTerminalNode node2 = new RuleTerminalNode(7,
                                                            new MockTupleSource(6),
                                                            rule2,
                                                            rule2.getLhs(),
                                                            0,
                                                            buildContext);
        rule2.setConsequence(consequence);
        final PropagationContext context2 = pctxFactory.createPropagationContext(0,
                                                                                 PropagationContext.INSERTION,
                                                                                 rule2,
                                                                                 null,
                                                                                 new DefaultFactHandle());

        final RuleImpl rule3 = new RuleImpl("test-rule3",
                                    "agendaGroup2");
        final RuleTerminalNode node3 = new RuleTerminalNode(9,
                                                            new MockTupleSource(8),
                                                            rule3,
                                                            rule3.getLhs(),
                                                            0,
                                                            buildContext);
        rule3.setConsequence(consequence);
View Full Code Here

        From fromCe = new From(dataProvider);
        fromCe.setResultPattern(pattern );

        final FromNode from = new FromNode( 3,
                                            dataProvider,
                                            new MockTupleSource( 80 ),
                                            new AlphaNodeFieldConstraint[]{constraint},
                                            null,
                                            true,
                                            buildContext,
                                            fromCe );
View Full Code Here

        fromCe.setResultPattern( new Pattern( 0,
                                              new ClassObjectType( Cheese.class ) ) );

        final FromNode from = new FromNode( 3,
                                            dataProvider,
                                            new MockTupleSource( 40 ),
                                            new AlphaNodeFieldConstraint[0],
                                            betaConstraints,
                                            true,
                                            buildContext,
                                            fromCe );
View Full Code Here

        From fromCe = new From(dataProvider);
        fromCe.setResultPattern( pattern );       

        final FromNode from = new FromNode( 3,
                                            dataProvider,
                                            new MockTupleSource( 30 ),
                                            new AlphaNodeFieldConstraint[]{constraint},
                                            null,
                                            true,
                                            buildContext,
                                            fromCe );
View Full Code Here

        From fromCe = new From(dataProvider);
        fromCe.setResultPattern( pattern );

        final FromNode from = new FromNode( 3,
                                            dataProvider,
                                            new MockTupleSource( 90 ),
                                            new AlphaNodeFieldConstraint[]{},
                                            null,
                                            true,
                                            buildContext,
                                            fromCe );
View Full Code Here

        MockRightTupleSink sink = new MockRightTupleSink();

        final RuleImpl rule1 = new RuleImpl("test-rule1");
        final RuleTerminalNode node = new RuleTerminalNode(idGenerator.getNextId(),
                                                           new MockTupleSource(idGenerator.getNextId()),
                                                           rule1,
                                                           rule1.getLhs(),
                                                           0,
                                                           buildContext);
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();
View Full Code Here

        objectTypeNode.attach( buildContext );
        final MockObjectSink sink = new MockObjectSink();
        objectTypeNode.addObjectSink( sink );

        final RuleTerminalNode node = new RuleTerminalNode( idGenerator.getNextId(),
                                                            new MockTupleSource( idGenerator.getNextId() ),
                                                            rule1,
                                                            rule1.getLhs(),
                                                            0,
                                                            buildContext );
View Full Code Here

TOP

Related Classes of org.drools.core.reteoo.MockTupleSource

Copyright © 2018 www.massapicom. 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.