[rules-users] loading rules from database

Abarna Ramachandran rabarna at archstone.in
Wed Sep 23 00:31:11 EDT 2009


*Hi
     Please help me making a decision regarding loading rules from database.


*1. How to* *programatically inject the rules into rule engine using drools
API. ? (i cant find any drools API to load into Knowledgebuilder as
rulesCondition,rulesConsequence etc. Should i create my own API?  )

2. Which is better approach ?
    The above method (1.)  or creating a drl using templates and data from
database and then injecting into Knowledgebuilder.
Please help me with this.

3. How to serialize the rulebase and use it later at runtime?


thanks
*
Re: loading rules dynamically *

by cfili <http://www.nabble.com/user/UserProfile.jtp?user=865575> Nov 03,
2008; 11:49pm ::

 <http://www.nabble.com/forum/Reply.jtp?post=20307811>
 I think the better approach if possible is to serialize your rule base and
storing it in the database as such.  Storing the DRL and recompiling your
rules at run time will be quite expensive.  We have a similar setup and it
has worked out pretty well for us.

techy wrote:
Hi,

 If the rules,conditions,consequences have to be loaded from the database. I
can think of following two approach. what would be right approach( I will
have upto 1200 rules in the db)

1. Programmatically inject the rules into rule engine using drools API.
2. Read the rules from the database and create drl or dsl file for them and
inject into rule engine.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090923/6aab6572/attachment.html 


More information about the rules-users mailing list