I have an app that can run with a local DRL file and with 4.07 and
BRMS, all has been working. Migrating to 5 to take advantage of
Guvnor. However, when I try to instantiate a RuleAgent using a
properties file, my code goes to heaven (or the other place). From
the code below, the subsequent console output results, which indicates
connection to Guvnor and apparent creation of the rulebase, but the
code never returns.
public RulesEngine() throws RulesEngineException {
super();
try {
System.out.println("Instantiating an agent with properties file");
RuleAgent agent = RuleAgent.newRuleAgent("/glucoseRules.properties");
System.out.println("Should have instantiated an agent");
rules = agent.getRuleBase();
System.out.println("Have a rule base from the agent");
} catch (Exception e) {
System.out.println(e.toString());
throw new RulesEngineException("Could not load/compile rules files:
", e);
}
}
Instantiating an agent with properties file
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Configuring
with newInstance=false, secondsToRefresh=30
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Configuring
package provider : URLScanner monitoring URLs:
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/gluc...
with local cache dir of /rules
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Applying
changes to the rulebase.
RuleAgent(default) INFO (Thu Feb 12 06:18:02 MST 2009): Adding package
called glucose.decision.rules
The properties file:
url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/glucose.decision.rules/LATEST
localCacheDir=/rules
poll=30
Again, this code all worked as written when I was using 4.07 and
BRMS. Any assistance is greatly appreciated!