Package org.drools.common

Examples of org.drools.common.PropagationContextImpl


                                                             rule1.getLhs(),
                                                             0,
                                                             buildContext );

        // create context
        final PropagationContext context0 = new PropagationContextImpl( 0,
                                                                        PropagationContext.INSERTION,
                                                                        rule1,
                                                                        null,
                                                                        new DefaultFactHandle() );
View Full Code Here


                                                             buildContext );

        final RuleFlowGroup ruleFlowGroup0 = agenda.getRuleFlowGroup( "rule-flow-group-0" );

        // create context
        final PropagationContext context0 = new PropagationContextImpl( 0,
                                                                        PropagationContext.INSERTION,
                                                                        rule0,
                                                                        null,
                                                                        new DefaultFactHandle() );
View Full Code Here

        assertTrue( ruleFlowGroup0.isAutoDeactivate() );
        ruleFlowGroup0.setAutoDeactivate( false );
        assertFalse( ruleFlowGroup0.isAutoDeactivate() );

        // create context
        final PropagationContext context0 = new PropagationContextImpl( 0,
                                                                        PropagationContext.INSERTION,
                                                                        rule0,
                                                                        null,
                                                                        new DefaultFactHandle() );
View Full Code Here

                                                            rule,
                                                            rule.getLhs(),
                                                            0,
                                                            buildContext );

        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.INSERTION,
                                                                       rule,
                                                                       null,
                                                                       new DefaultFactHandle() );
View Full Code Here

                                                             rule0.getLhs(),
                                                             0,
                                                             buildContext );
        node0.setSequence( 72 );
        rule0.setConsequence( consequence );
        final PropagationContext context0 = new PropagationContextImpl( 0,
                                                                        PropagationContext.INSERTION,
                                                                        rule0,
                                                                        null,
                                                                        new DefaultFactHandle() );

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

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

        final Rule rule3 = new Rule( "test-rule3",
                                     "agendaGroup2" );
        final RuleTerminalNode node3 = new RuleTerminalNode( 9,
                                                             new MockTupleSource( 8 ),
                                                             rule3,
                                                             rule3.getLhs(),
                                                             0,
                                                             buildContext );
        node3.setSequence( 0 );
        rule3.setConsequence( consequence );
        final PropagationContext context3 = new PropagationContextImpl( 0,
                                                                        PropagationContext.INSERTION,
                                                                        rule3,
                                                                        null,
                                                                        new DefaultFactHandle() );
View Full Code Here

        assertSame( objectTypeNode,
                    map.get( objectType ) );
    }

    public void testAssertObject() throws Exception {
        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
                                                                       null );
View Full Code Here

                      memory.size() );
        assertTrue( memory.contains( handle1 ) );
    }
   
    public void testAssertObjectSequentialMode() {
        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
                                                                       null );
View Full Code Here

    }

    public void testRetractObject() throws Exception {
        ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        IdGenerator idGenerator = ruleBase.getReteooBuilder().getIdGenerator();     
        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
                                                                       null );
View Full Code Here

    public void testUpdateSink() throws FactException {
        // Tests that when new child is added only the last added child is
        // updated
        // When the attachingNewNode flag is set
        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
                                                                       null );
        final RuleBase ruleBase = RuleBaseFactory.newRuleBase();    
View Full Code Here

                      memory.size() );
        assertTrue( memory.contains( handle1 ) );
    }

    public void testAssertObjectWithShadowEnabledNoDefaultConstr() throws Exception {
        final PropagationContext context = new PropagationContextImpl( 0,
                                                                       PropagationContext.ASSERTION,
                                                                       null,
                                                                       null,
                                                                       null );
View Full Code Here

TOP

Related Classes of org.drools.common.PropagationContextImpl

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.