Examples of fireAllRules()


Examples of org.drools.WorkingMemory.fireAllRules()

        DefaultAgenda agenda = (DefaultAgenda) workingMemory.getAgenda();
        assertEquals( 0,
                      agenda.getRuleFlowGroup( "flowgroup-1" ).size() );

        // We need to call fireAllRules here to get the InitialFact into the system, to the eval(true)'s kick in
        workingMemory.fireAllRules();

        // Now we have 4 in the RuleFlow, but not yet in the agenda
        assertEquals( 4,
                      agenda.getRuleFlowGroup( "flowgroup-1" ).size() );
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        final WorkingMemory workingMemory = ruleBase.newStatefulSession();
        final List<String> list = new ArrayList<String>();
        workingMemory.setGlobal( "list",
                                 list );

        workingMemory.fireAllRules();
        assertEquals( 0,
                      list.size() );

        final ProcessInstance processInstance = workingMemory.startProcess( "0" );
        assertEquals( ProcessInstance.STATE_ACTIVE,
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

                      list.size() );

        final ProcessInstance processInstance = workingMemory.startProcess( "0" );
        assertEquals( ProcessInstance.STATE_ACTIVE,
                      processInstance.getState() );
        workingMemory.fireAllRules();
        assertEquals( 4,
                      list.size() );
        assertEquals( "Rule1",
                      list.get( 0 ) );
        assertEquals( "Rule3",
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        workingMemory.insert(person);
        // start process
        RuleFlowProcessInstance processInstance = (RuleFlowProcessInstance)
            workingMemory.startProcess("org.drools.ruleset");
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        workingMemory.fireAllRules();
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
    }

}
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        workingMemory.setApplicationData( "map",
                                          map );

        workingMemory.assertObjectnew Fibonacci( 50 ) );
       
        workingMemory.fireAllRules();
    }
}
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        TestModel model = new TestModel( );
        model.setFireRule( true );
        assertFalse( model.isRuleFired( ) );
        engine.assertObject( model );
        engine.fireAllRules( );
        assertTrue( model.isRuleFired( ) );

    }
   
    public void testIntegrationLoadBasicWorkbookCSV() throws Exception
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        TestModel model = new TestModel( );
        model.setFireRule( true );
        assertFalse( model.isRuleFired( ) );
        engine.assertObject( model );
        engine.fireAllRules( );
        assertTrue( model.isRuleFired( ) );

    }   
   
    /**
 
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        ruleBaseLoader.addFromRuleSetLoader(ruleSetLoader);
        RuleBase ruleBase = ruleBaseLoader.buildRuleBase();          

        WorkingMemory engine = ruleBase.newWorkingMemory( );
        engine.assertObject( "yes" );
        engine.fireAllRules( );
    }

}
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        workingMemory = ruleBase.newWorkingMemory( );
        list = new ArrayList( );
        workingMemory.setApplicationData( "list",
                                          list );
        workingMemory.assertObject( "help" );
        workingMemory.fireAllRules( );
        assertEquals( "help",
                      list.get( 0 ) );

        // Try with addFromRuleSetLoader []
        ruleBaseLoader = new RuleBaseLoader( );
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        workingMemory = ruleBase.newWorkingMemory( );
        list = new ArrayList( );
        workingMemory.setApplicationData( "list",
                                          list );
        workingMemory.assertObject( "help" );
        workingMemory.fireAllRules( );
        assertEquals( "help",
                      list.get( 0 ) );
    }

    public void testAddFromRuleSet() throws IntegrationException,
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.