<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">Abhay,<br> Q1: I think that this will depend on how many different products you have. If there is a small number it is more straight forward to have a rule for each one (so the 2nd option). This allows all you logic to be in one place. If there are a large number of products and writing a rule for each one is intractable you probably would want to look into some generalizations of the rules. Is that helpful?<br><br> Q2: I'm not quite sure what you are getting at in Q2. Are you trying to write validation rules or rules that are modifying the facts?<br><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;">Wendy<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr
size="1"><b><span style="font-weight: bold;">From:</span></b> Abhay B. Chaware <Abhay.Chaware@kpitcummins.com><br><b><span style="font-weight: bold;">To:</span></b> "rules-users@lists.jboss.org" <rules-users@lists.jboss.org><br><b><span style="font-weight: bold;">Sent:</span></b> Fri, May 6, 2011 4:59:46 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [rules-users] Basic rules question<br></font><br>
<style>
<!--
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;color:windowtext;}
_filtered {margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {}
-->
</style>
<div class="Section1">
<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;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I am a newbie to rule based applications and trying to get the
concept of rules. I have couple of questions about rules to start with, not
specifically about Drools though.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Q1 - Should rules be data/model specific or can/should they
be generic or both</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">==========================================================</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">e.g. </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">If selected product “TYPE” is
“laptop”, then category “RAM” should have all
“DDR” type items compatible ( selecting items matching certain property
)</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">OR</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">If selected product is “IBM T42”, then category
“RAM” should have “512MB DDR” , “1024MB
DDR”, “2048MB DDR” compatible. ( assigning individual items
in rules )</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">OR</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Combination of both</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Q2 – How should be the data modeled in above case</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">==========================================================</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">e.g. </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">in product master, each item ( e.g. T40, T42 ) should have a
“TYPE” ( e.g. desktop or laptop ) , all items in category “RAM”
should have a “TYPE” ( e.g. DDR ) and then control the assignment of
RAM options to the PRODUCT through Rule using “DDR” type ?</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">OR</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">in product master, each item ( e.g. T40, T42 ) should have a
“TYPE” ( e.g. desktop or laptop ) , all items in category “RAM”
should have a “compatibleProduct” column ( e.g. desktop or laptop
) and control the assignment of RAM to PRODUCT through “dynamic”
rules by selecting all the RAMs by passing the “TYPE” of the
product to the database handler.</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Am I making my point clear ?</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Abhay</span></font></p>
</div>
<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></body></html>