<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello,<br>Thank you for your answer and experience feedback.<br>Your explanations are very clear.<br>Regards,<br>Benoît<br><br><hr id="stopSpelling">Date: Fri, 9 Apr 2010 09:59:28 -0700<br>From: greg_barton@yahoo.com<br>To: rules-users@lists.jboss.org<br>Subject: Re: [rules-users] Facts or rules ?<br><br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">It matters on the nature of the processing.&nbsp; Rules are useful when the algorithm involves iterative change, i.e. a rule fires, changing the data, which cause another rule to fire, changing the data....etc until a resting state has been reached.&nbsp; <br><br>They're also useful if you want to handle odd cases, or global constraints, especially if these can directly affect the data driven processing.&nbsp; This is what I was talking about when I said "you can do both" below.&nbsp; Let's say your "data driven approach" involves generating the pricing rules from the data. (Instead of having generalized rules that act on inserted objects.)&nbsp; Using this approach you (or the business folk) could then define other rules that execute alongside the generated ones for both conditions that don't follow the pattern of the generated rules, and global conditions
 that affect all price calculation.&nbsp; This is like mixing decision tables and hand written rules together, a rather common practice.<br><br>That make sense?<br><br><br>Including a BRMS is warranted when 1) there's going to be change, and 2) funky processing is anticipated.&nbsp; In my experience both cases are frequent.&nbsp; The marketing folks always come by and say, "can your system handle this promotion we want to do?" :)<br><br>--- On <b>Fri, 4/9/10, Bertrand Grottier <i>&lt;b_grottier@hotmail.com&gt;</i></b> wrote:<br><blockquote style="margin-left: 5px; padding-left: 5px;"><br>From: Bertrand Grottier &lt;b_grottier@hotmail.com&gt;<br>Subject: Re: [rules-users] Facts or rules ?<br>To: rules-users@lists.jboss.org<br>Date: Friday, April 9, 2010, 10:29 AM<br><br><div id="ecxyiv69327948">

<style>
.ExternalClass #ecxyiv69327948 .ecxhmmessage P
{padding:0px;}
.ExternalClass #ecxyiv69327948 .ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Hello<br><br>I am coming back to this post with new a piece of information regarding the number of rules: this latter may attain 5 * 10^5... This figure confirms the a "data driven approach".<br><br>However, if I represent "business rules" using facts, is there really an added value in using a brms ? (compared to a hard-coded component).<br><br>Thank you in advance for yours answers.<br><br>Regards,<br><br>Benoît<br><br><hr id="ecxstopSpelling">Date: Wed, 7 Apr 2010 07:44:09 -0700<br>From: greg_barton@yahoo.com<br>To: rules-users@lists.jboss.org<br>Subject: Re: [rules-users] Facts or rules ?<br><br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">The answer to whether this is a good approach is, "It depends." :)<br><br>Does the 10^4 and 10^5 figure mean there could be that many rules?&nbsp; If so, definitely do the data driven approach.<br><br>If not, will business folk (i.e. non technical) will be
 writing pricing rules?&nbsp; If so, do the rules based approach as data driven rules are generally less understandable by business types. (They're a bit more abstract and influenced by the structure of your data model.&nbsp; Business people should not have to deal with either abstraction or the implementation details of a data model.) <br><br>There's no reason why you can't do both, though.&nbsp; <br><br>--- On <b>Wed, 4/7/10, Bertrand Grottier <i>&lt;b_grottier@hotmail.com&gt;</i></b> wrote:<br><blockquote style="margin-left: 5px; padding-left: 5px;"><br>From:
 Bertrand Grottier &lt;b_grottier@hotmail.com&gt;<br>Subject: [rules-users] Facts or rules ?<br>To: rules-users@lists.jboss.org<br>Date: Wednesday, April 7, 2010, 9:23 AM<br><br><div id="ecxecxyiv1286396095">

<style>
.ExternalClass #ecxyiv69327948 .ecxExternalClass #ecxecxyiv1286396095 .ecxecxhmmessage P
{padding:0px;}
.ExternalClass #ecxyiv69327948 .ecxExternalClass #ecxecxyiv1286396095 .ecxecxhmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Hello,<br><br>I am a newbie with business rules systems.<br><br>I would like to implement a component that "compute" the price of products. There can be a great number of potential prices (maybe 10^4 or 10^5).<br><br>My first idea was to create template rules, "feeded" by a database. In other words, the information about prices would be contained in the rules.<br><br>Eventually, I decided to create Prices objects, that are also inserted in the Knowledge session (Prices become facts). The rule engine just "matches" the appropriate price object with each product (there are other rules then to compute the final price).<br><br>Price<br>
{<br>
_productId ;<br>
_beginDate ;<br>
_endDate ;<br>
....<br>
_price ;<br>
}<br>
<br>
Product<br>
{<br>
_id ;<br>
_date ;<br>
...<br>
_<br>
}<br>
<br>Are my explanations clear enough ?<br><br>Is this a good approach or is it stupid ? Why ? What are the good practices ?<br><br>Thank you in advance for your help.<br><br>Benoît<br><br><br>                                               <br><hr>Envie de naviguer sur Internet sans laisser de trace? <a rel="nofollow" href="http://clk.atdmt.com/FRM/go/207186970/direct/01/">La solution avec Internet Explorer 8</a> 
</div><br>-----Inline Attachment Follows-----<br><br><div class="ecxecxplainMail">_______________________________________________<br>rules-users mailing list<br><a rel="nofollow" href="http:///mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a rel="nofollow" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></blockquote></td></tr></tbody></table><br>                                               <br><hr>Hotmail débarque sur votre téléphone ! <a rel="nofollow" href="http://www.messengersurvotremobile.com/?d=Hotmail"> Paramétrez Hotmail sur votre téléphone! Gratuit !</a> 
</div><br>-----Inline Attachment Follows-----<br><br><div class="ecxplainMail">_______________________________________________<br>rules-users mailing list<br><a href="http:///mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></blockquote></td></tr></tbody></table><br>                                               <br /><hr />Acheter en ligne en toute sécurité ? <a href='http://clk.atdmt.com/FRM/go/206608211/direct/01/' target='_new'>Internet Explorer 8 vous protège gratuitement !</a></body>
</html>