[rules-users] Rule Agent retrieving null rulebase
Vinicius Carvalho
viniciusccarvalho at gmail.com
Thu Mar 27 09:12:42 EDT 2008
Hello there! I've just started with the BRMS (what an awesome feature I
might add). So I've deployed a simple rule, packaged it and created a
snapshot.
The package is created and when I access the url provided by the BRMS it
tries to download the package, so I'm assuming it is published.
So I ran this code inside eclipse:
public static void main(String[] args) {
RuleAgent agent = RuleAgent.newRuleAgent("/MyRules.properties");
RuleBase rb = agent.getRuleBase();
StatefulSession session = rb.newStatefulSession();
Funcionario f = new Funcionario();
f.setSalario(1000.0);
Cargo c = new Cargo();
c.setDescricao("desenvolvedor");
f.setCargo(c);
session.insert(c);
Decision d = new Decision();
session.insert(d);
session.fireAllRules();
session.dispose();
}
---------------------MyRules.properties----------------------------
http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/com.synos.rules.credito/production-1
poll=10
It throws a nullpointer exception, as the agent.getRulebase() is returning a
null object.
What am I missing here?
Best regards
--
"In a world without fences and walls, who needs Gates and Windows?"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080327/c249472b/attachment.html
More information about the rules-users
mailing list