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.syno...
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?"