Hi,

Even though I implemented it I wondered this too.  I can think of several
reasons to use rules rather than hard-coding.

1. The rules change frequently.  "this week, anyone buying more than x
widgets of types a, b, and c gets an extra 35% discount".  I think things
like this are often quoted.  I'm not 100% convinced this is a good example:
it would probably be pretty easy to set up rules like this, but if I were
designing the system I would want to know what my discounts were last
week... I haven't heard of anyone keeping "history of rules". I suppose it
is easier to keep history of rules than to set up a metadata driven generic
scheme for any such type of rule.

2. recursive (query) problems, transitive closure.  Although it is always
possible to write code to compute transitive closures, it might be simpler
to think about them in a prolog/declarative style.  I'm working on how to
use rules to compute transitive closure in a finder method.  This would be
something like, if you have people beans, who have children, you could get
a FindDescendantsbyPersonID finder method: the (sql based) findByPK would
get the person themselves, and the rules would find all their children,
then grandchildren, etc etc. eventually returning a collection of the
person and all their descendants.

I've thought some about rules, but have no practical experience with them. 
I wonder if when you have a complicated set of interacting rules you tend
to get unpredictable results?

As I keep saying, more (specific) examples would be great.

Thanks
David Jencks
On 2001.04.18 21:13:36 -0400 Jason Dillon wrote:
> Where would a rule engine fit into JBoss?  Would it be for configuration?
>  I
> don't really see what use it is.   Why not just use Java conditionals.
> I bet I am just missing something (rather important).
> 
> --jason
> 
> 
> On Wed, 18 Apr 2001, Filip Hanik wrote:
> 
> >
> > www.blazesoft.com is another rules engine.
> > commercial software use rule engines for a lot of different things.
> > imagine product promotions, if you bought something for this amount, on
> this
> > date and you are of a certain age you will get a different promotion
> that if
> > you were of a different age.
> >
> > the list is endless of things people use rules engines for.
> >
> > Filip
> >
> > ~
> > Namaste - I bow to the divine in you
> > ~
> > Filip Hanik
> > Software Architect
> > [EMAIL PROTECTED]
> > www.filip.net
> >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to