[rules-users] how to use drools4 implements similar function like drools5M?
王磊
wangjavablog at gmail.com
Sun Mar 8 21:06:47 EDT 2009
Hi
EveryBody,I want to write code like this in drools4,but I got a problem
that no class defined as FactType, how to refactor it ?
RuleAgent agent = RuleAgent.newRuleAgent("/rules.properties");
RuleBase rb = agent.getRuleBase();
//constructor a model ,
FactType appType = rb.getFactType("test.MerInfo");
Object merinfo = appType.newInstance();
appType.set(merinfo, "resp_code", "00");
appType.set(merinfo, "avg_amt", 5000.0);
StatelessSession ss = rb.newStatelessSession();
ss.execute(merinfo);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090309/027a2694/attachment.html
More information about the rules-users
mailing list