[rules-users] how to use drools4 implements similar function like drools5M?
Edson Tirelli
tirelli at post.com
Sun Mar 8 21:22:01 EDT 2009
Fact type declaration is a new feature to drools 5. There is no similar
in Drools 4, although it is possible to generate the facts outside of drools
and use them as regular beans.
[]s
Edson
2009/3/8 王磊 <wangjavablog at gmail.com>
> 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);
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090308/cf32b348/attachment.html
More information about the rules-users
mailing list