2011/7/13 vineet.arora3 <span dir="ltr">&lt;<a href="mailto:vineet.arora@hcl.com">vineet.arora@hcl.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">







<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I am using Drools project and want to store rules in database as they will be configurable, even when application is running. I have searched on internet
 but didn&#39;t find any satisfactory result.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">My requirement is:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&quot;How to store rules in database and access them in java files</span></p></div></blockquote><div><br>I assume that you know how to store entire rules or bits and pieces as &quot;text&quot; in some DB, and how to retrieve them and compose them into rules according to your requirements. <br>
<br>If &quot;configuration&quot; is just the repeated insertion of values (or larger chunks of text) into rules, you could look at &quot;templates&quot; and how to generate rules via the Drools API.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> instead of using .drl files?&quot;</span></p></div></blockquote><div><br>Once you have a String aDrlString containing text as you would normally have it on a file, you can<br>
   - write it to a file and compile that<br>   - pass the String aDrlString to the builder by:<br>         Resource res = ResourceFactory.newReaderResource( myStringReader );<br>         kBuilder.add( res, ResourceType.DRL );<br>
<br>-W<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">If you have any idea or sample example to demonstrate the same, please share.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thanks.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Wolfgang Laun-2 [via Drools] [mailto:<a href="mailto:ml-node%2B" target="_blank">ml-node+</a><a href="http://user/SendEmail.jtp?type=node&amp;node=3165063&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>]
<br>
<b>Sent:</b> Wednesday, July 13, 2011 12:33 PM<br>
<b>To:</b> Vineet Arora<br>
<b>Subject:</b> Re: [rules-users] How to Access and Execute Rules from Database<u></u><u></u></span></p>
</div><div class="im">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;">On 13 July 2011 08:26, vineet.arora3 &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3165056&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt; wrote:<u></u><u></u></p>

<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); border-width: medium medium medium 1pt; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">

<p class="MsoNormal">Drools project without using .drl, decision<br>
table etc.?<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><br>
Do you really mean what you write here? Please be more specific.<br>
-W<br>
 <u></u><u></u></p>
</div>
</div>
</div><p class="MsoNormal" style="margin-bottom: 12pt;"><br>
_______________________________________________ <br>
rules-users mailing list <br>
<a href="http://user/SendEmail.jtp?type=node&amp;node=3165056&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<u></u><u></u></p>
<div class="MsoNormal" style="text-align: center;" align="center">
<hr style="color: rgb(204, 204, 204);" noshade size="1" width="100%" align="center">
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size: 9pt; color: rgb(68, 68, 68);">If you reply to this email, your message will be added to the discussion below:<u></u><u></u></span></b></p>
</div>
<p class="MsoNormal"><span style="font-size: 9pt; color: rgb(68, 68, 68);"><a href="http://drools.46999.n3.nabble.com/How-to-Access-and-Execute-Rules-from-Database-tp58955p3165056.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/How-to-Access-and-Execute-Rules-from-Database-tp58955p3165056.html</a>
<u></u><u></u></span></p>
</div>
<div style="margin-top: 4.8pt;">
<p class="MsoNormal"><span style="font-size: 8.5pt; color: rgb(102, 102, 102);">To unsubscribe from How to Access and Execute Rules from Database,
<a rel="nofollow" link="external">
click here</a>. <u></u><u></u></span></p>
</div>
</div>
<br>
<hr>
<font face="Arial" size="1" color="Gray">::DISCLAIMER::<br>
-----------------------------------------------------------------------------------------------------------------------<br>
<br>
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.<br>
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in<br>
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.<br>
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of<br>
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have<br>
received this email in error please delete it and notify the sender immediately. Before opening any mail and<br>
attachments please check them for viruses and defect.<br>
<br>
-----------------------------------------------------------------------------------------------------------------------<br>
</font>



        
<br><hr width="300" align="left">
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-Access-and-Execute-Rules-from-Database-tp58955p3165063.html" target="_blank">RE: [rules-users] How to Access and Execute Rules from Database</a><br>

Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" target="_blank">Drools: User forum mailing list archive</a> at Nabble.com.<br><br>_______________________________________________<br>

rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>