You can feed a KnowledgeBuilder with a number of data formats, DRL being just one of them. The full standard procedurefor building is to add one or more resources to the builder (indicating its type), check for errors and create a KnowledgeBase; then proceed with a session, etc. <br>
<br>-W<br><br><br><div class="gmail_quote">2011/5/19 Abhay B. Chaware <span dir="ltr"><<a href="mailto:Abhay.Chaware@kpitcummins.com">Abhay.Chaware@kpitcummins.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="blue" lang="EN-US">
<div>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; font-family: Arial; color: navy;">Little confused about the third question I
had, about rules compilation. I now
know that rules are to be compiled. When I use Guvnor,
I have to package the rules ( this is where they are compiled into binary
format ) and download the package file and feed it into the production memory
/ knowledge base using changesets/agents. </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; font-family: Arial; color: navy;">But I have also seen examples of drools
and also created a few ones where I build the eclipse project and package the
entire app as webapp ( .war ) and the rules file is in the classes/lib
directory as a .drl file. ( uncompiled ). And it still works ! Does the
drools runtime compile it at runtime ? and then uses it or what ? </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<div>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; font-family: Arial; color: navy;">Regards,</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 11pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; font-family: Arial; color: navy;">Abhay Chaware</span></font></p>
<p class="MsoNormal"><font face="Arial" size="1" color="navy"><span style="font-size: 7.5pt; font-family: Arial; color: navy;">Sr. Designer | KPIT Cummins Infosystems Ltd
| Board: +91 020 6652 5000 | Extn: 2989 | <a href="mailto:abhay.chaware@kpitcummins.com" target="_blank">abhay.chaware@kpitcummins.com</a>
|<a href="http://www.kpitcummins.com" target="_blank">www.kpitcummins.com</a> </span></font><font color="navy"><span style="color: navy;"></span></font></p>
<p class="MsoNormal"><font face="Webdings" size="5" color="green"><span style="font-size: 18pt; font-family: Webdings; color: green;">P</span></font><font face="Webdings" size="2" color="black"><span style="font-size: 11pt; font-family: Webdings; color: black;"> </span></font><font face="Tahoma" size="1" color="green"><span style="font-size: 7.5pt; font-family: Tahoma; color: green;">Please consider the environment before printing this e-mail</span></font></p>
</div>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Wolfgang Laun<br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, May 17,
2011 3:31 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Rules
Users List<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] Drools
and threads</span></font></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2011/5/17 Abhay B. Chaware <<a href="mailto:Abhay.Chaware@kpitcummins.com" target="_blank">Abhay.Chaware@kpitcummins.com</a>></span></font></p>
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I have few
questions about Drools.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Are rules
compiled, partially compiled or
interpreted ?</span></font></p>
</div>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
Rules are indeed compiled, but any
system where the order of execution<br>
is so highly dynamic has to do some operation in an interpretative mode.<br>
<br>
</span></font></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;">
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">When I call
fireAllRules(), does it ( or can it
) create a new thread that runs parallely or the operation is sequential and
the caller program HAS TO wait till all rules execution is done ?</span></font></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
No special thread is created. fireAllRules() returns when no more rule
activations are to be "fired".<br>
</span></font></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;">
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Also, How is the application data integrity guarantied?
E.g. what happens when some of the facts are changed in middle of rules being
executed .. ? what should happen ?</span></font></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
When a rule activation is executed,
the code of the consequence frequently changes one or more facts. This results
in reevaluations of rule conditions,
etc. This is just the way Drools works.<br>
<br>
-W<br>
<br>
<br>
</span></font></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;">
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">-abhay</span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br clear="all">
This message contains information that may be privileged or confidential and is
the property of the KPIT Cummins Infosystems Ltd. It is intended only for the
person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print,
retain copy, disseminate, distribute,
or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete
all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any
liability for virus infected mails. </span></font></p>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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></span></font></p>
</blockquote>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div></div></div><div><div></div><div class="h5">
<br clear="all"> This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.
</div></div></div>
<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>