[rules-users] Extracting management information from the content of the rules

Henrique Lira henriquedlira at hotmail.com
Mon Jan 2 14:39:13 EST 2012


Hi,
 
the rules that are working are similar to your second example ...
 
> when
> $p : Product( color == "red", country == "Italy", $x : price )
> then
> $p.setPrice( $x * 0.75 )
> end 
and the types of reports that we need to extract from the rules are, as you set, "abstract", using the definitions contained in the rules' LHSs to Understand Which classes of objects could receive some kind of discount.What we really need to know if its possible to extract this information in a structured way ... Is there an API or software for that? Some mentioned the drools-verifier API, but from what I understand many modifications would be necessary, if its possible at all...Thank you,
Henrique
 

> Date: Mon, 2 Jan 2012 03:23:51 -0800
> From: dsotty at gmail.com
> To: rules-users at lists.jboss.org
> Subject: Re: [rules-users] Extracting management information from the content of the rules
> 
> Out of curiosity, I'd like to better understand the requirements. Are we
> talking about rules of the form:
> 
> when
> Product( color == "red", country == "Italy", discount > 10 )
> then
> ...
> end
> 
> i.e., the discount is stored in some field and constrained by the rules?
> 
> or
> 
> when
> $p : Product( color == "red", country == "Italy", $x : price )
> then
> $p.setPrice( $x * 0.75 )
> end 
> 
> More properly, the questions are : 1) is the discount given or computed? 2)
> is it available (or can be stored) in some data field or is it "transient" ?
> 
> The RHS of a rule is a sort of "black box" which is more difficult to reason
> against, so you'll probably need some kind of reified discount:
> 
> when
> $p : Product( color == "red", country == "Italy" )
> then
> insertLogical( new Discount( $p, 0.75 ) );
> end 
> 
> -----------------------------------------------------------------------------------------------------------------
> 
> This said, there is a final, more important question. Are you interested in
> a report describing the 
> characteristics of the objects which were discounted?
> For example, you have 1000 discounted products in your system and you want
> to find a "POSTERIOR"
> correlation between their features and the discount they got. This is the
> kind of problems that 
> are solved by data mining techniques, e.g. CARTs (classification and
> regression trees), Association Rules (not the rules we're used to !!) or
> Clustering algorithms
> 
> If instead you want to reason abstractly, using the definitions contained in
> the rules' LHSs to understand which classes of objects COULD receive some
> kind of discount, that's a kind of "semantic" problem and I guess that some
> tableau-like technique could help.
> 
> This to say that, according to the exact type of "reporting" that you want
> to build, the "rules" you'd have to write might vary quite a lot.
> 
> Best
> Davide
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Extracting-management-information-from-the-content-of-the-rules-tp3625961p3626354.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> 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/20120102/d4cda6d6/attachment.html 


More information about the rules-users mailing list