[rules-users] Facts or rules ?

Greg Barton greg_barton at yahoo.com
Wed Apr 7 10:44:09 EDT 2010


The answer to whether this is a good approach is, "It depends." :)

Does the 10^4 and 10^5 figure mean there could be that many rules?  If so, definitely do the data driven approach.

If not, will business folk (i.e. non technical) will be writing pricing rules?  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.  Business people should not have to deal with either abstraction or the implementation details of a data model.) 

There's no reason why you can't do both, though.  

--- On Wed, 4/7/10, Bertrand Grottier <b_grottier at hotmail.com> wrote:

From: Bertrand Grottier <b_grottier at hotmail.com>
Subject: [rules-users] Facts or rules ?
To: rules-users at lists.jboss.org
Date: Wednesday, April 7, 2010, 9:23 AM




Hello,

I am a newbie with business rules systems.

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).

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.

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).

Price

{

_productId ;

_beginDate ;

_endDate ;

....

_price ;

}



Product

{

_id ;

_date ;

...

_

}


Are my explanations clear enough ?

Is this a good approach or is it stupid ? Why ? What are the good practices ?

Thank you in advance for your help.

Benoît


 		 	   		  
Envie de naviguer sur Internet sans laisser de trace? La solution avec Internet Explorer 8 

-----Inline Attachment Follows-----

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100407/9e5563e7/attachment.html 


More information about the rules-users mailing list