RuleBaseLoader ruleBaseLoader = new RuleBaseLoader();
ruleBaseLoader.addFromRuleSetLoader(ruleSetLoader);
RuleBase ruleBase = ruleBaseLoader.buildRuleBase();
WorkingMemory workingMemory = ruleBase.newWorkingMemory( );
State a = new State( "A" );
State b = new State( "B" );
State c = new State( "C" );
State d = new State( "D" );
// By setting dynamic to TRUE, Drools will use JavaBean
// PropertyChangeListeners so you don't have to call modifyObject().
boolean dynamic = true;
workingMemory.assertObject( a, dynamic );
workingMemory.assertObject( b, dynamic );
workingMemory.assertObject( c, dynamic );
workingMemory.assertObject( d, dynamic );
workingMemory.fireAllRules( );
}