<blockquote class="quote light-black dark-border-color"><div class="quote light-border-color"><b class="light-black">Hi<br> Please help me making a decision regarding loading rules from database. <br><br></b><span class="light-black">1. How to</span><b class="light-black"> </b>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? )<br><br>2. Which is better approach ? <br> The above method (1.) or creating a drl using templates and data from database and then injecting into Knowledgebuilder. <br>
Please help me with this.<br><br>3. How to serialize the rulebase and use it later at runtime? <br><br><br>thanks <br><b class="light-black"><br>Re: loading rules dynamically </b><span id="nabble.rating20307811"></span>
<div class="message-actions weak-color">
        <p class="message-actions1">
        by <a href="http://www.nabble.com/user/UserProfile.jtp?user=865575" rel="nofollow" target="_top">cfili</a>
        <span class="weak-color">Nov 03, 2008; 11:49pm</span> ::<span id="nabble.descriptor"></span>
</p>
<p class="message-actions2">
<a href="http://www.nabble.com/forum/Reply.jtp?post=20307811" rel="nofollow" target="_top"></a><br>
</p>
</div>
<div class="message-text" id="nabble.msgtext">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.
<br><blockquote class="quote light-black dark-border-color"><div class="quote light-border-color">
<div class="quote-author" style="font-weight: bold;">techy wrote:</div>
<div class="quote-message">Hi,
<br><br> 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)
<br><br>1. Programmatically inject the rules into rule engine using drools API.
<br>2. Read the rules from the database and create drl or dsl file for them and inject into rule engine.
<br><br>Thanks
</div>
</div></blockquote>
</div></div></blockquote>