Thanks Geoffrey.
That really solved my problem.
Below is how I used scoreDirectorFactoryConfigy.setRuleBase( ruleBase ).
Note:
<scoreDrl>/rules.drl</scoreDrl> must be removed from solverConfig.xml or
else will have problem.
// Imports
import org.drools.compiler.RuleBaseLoader;
import org.drools.RuleBase;
// Implementation
String DRLPath = "./rules.drl";
FileReader fileReader = new FileReader( new File( *DRLPath* ) );
RuleBaseLoader ruleBaseLoader = RuleBaseLoader.getInstance();
RuleBase ruleBase = ruleBaseLoader.loadFromReader( fileReader );
scoreDirectorFactoryConfig.setRuleBase(ruleBase);
fileReader.close();
Solver solver = solverFactory.buildSolver();
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-read-DRL-files-not-in-resource-c...
Sent from the Drools: User forum mailing list archive at
Nabble.com.