[rules-users] Guvnor web based decision table

James Owen jco2009 at att.net
Tue Jul 14 16:35:02 EDT 2009


Greetings:

Jarek, Mark, Edson, Wolfgang and others are far better at the  
specific, in-depth details in Drools than myself.  However, I did  
notice two things that called attention to themselves in the email  
below:

(1) Priority (or specificity) should be used, if at all, sparingly.   
More than three levels of priority indicate a possibility that a  
procedural program is being done with declarative rules.  Five levels  
and you definitely need to use Java or C++ or something else rather  
than a rulebase.

(2)  Global variables in a rulebase, as in Java or C or C++, should be  
avoided whenever possible.  They are a death trap that has killed off  
many an excellent idea.  Most vendors point these things out when they  
explain how to implement global variables and/or specificity.  It's  
almost as bad (really close) as using a GOTO in BASIC.  Yes, it's  
there.  But don't use it.

One other thing:  External code should never change the value of an  
element being used by the rulebase in the condition part of the  
rules.  If the datum is used by the action element it still MIGHT not  
be a good idea and should be used very carefully.  However, returning  
a boolean is the normal use of external code that does not modify data  
- that's about the only SAFE way to use them.

SDG
jco
"This above all: to thine own self be true,
And it must follow, as the night the day,
Thou canst not then be false to any man."
Hamlet, Act 1, Scene III
http://www-tech.mit.edu/Shakespeare/hamlet/hamlet.1.3.html


On Jul 14, 2009, at 3:16 PM, Jaroslaw Kijanowski wrote:

> Hi,
>
> Johan Kumps wrote:
>> Hi all,
>> I've a number of Excel based decision tables running in my  
>> applications. Now I want to use Guvner to manage these rules. Only  
>> importing the xsl files is not enough. So I have to manually  
>> convert the xsl's to a web based decision table.
>
> Why do you need to convert them into web based DTs? What's the  
> problem if you simply upload your xls file? Keep in mind that you  
> also have to provide (upload) a model used in your DT.
>
>> I have following questions :
>> - How do have have to use an eval condition? Whitin the eval I have  
>> to call a piece of java code with a number of parameters coming  
>> from the fact model.
>
> simply write a snippet in a cell
>
>> - How can I prioritize rules?
>
> use the PRIORITY keyword
>
>> - How to use global variables?
>
> use the Variables keyword
>
> Details are in the documentation:
> https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html 
> #d0e5762
>
> Cheers,
> Jarek
>
>> Thanks for helping me out.
>> Kind regards,
>> Johan Kumps
>> ------------------------------------------------------------------------
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list