[rules-users] new to Drools: modeling issues

Swindells, Thomas TSwindells at nds.com
Mon Dec 6 06:03:11 EST 2010


In my experience no-loop is pretty much worthless as it only prevents the most trivial type of loops (a rule reactivating itself).  It provides no help for the most common type of loop where multiple rules modify the same object and reactivate each other.

From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Michael Anstis
Sent: 06 December 2010 10:54
To: Rules Users List
Subject: Re: [rules-users] new to Drools: modeling issues

Glad you're reading the documents - you'd be surprised how many people asking questions do not!

You can put off DSL until you're happy your rules are working, off course - in fact, IMO, it's easier to "debug" rules without the additional abstraction.

You're first rule looks better - although I'd still be inclined to look at no-loop rather than the check yourself (what if you need the new value to be dynamic; i.e. not just statically "value"? Your rules would become cumbersome).

The second rule does not associate StringHolder to any particular Child instance (although easily added); so you'd get the cross-product of StringHolders and Child facts; not I suspect what you'd want.

Cheers,

Mike
On 6 December 2010 10:36, Gabor Szokoli <szocske at gmail.com<mailto:szocske at gmail.com>> wrote:
Thanks for the instant response!

2010/12/6 Michael Anstis <michael.anstis at gmail.com<mailto:michael.anstis at gmail.com>>:
> The drools-expert documentation would be a good starting point; otherwise
> Wikipedia has a good overview of the RETE algorithm (all be it Drools has
> its own extensions).
I'm reading the documentation thoroughly of course, but it seems to be
centered about using the system and writing rules. Which is how it
should be, don't get me wrong :-)
I'm just hoping for some spoilers like "Section X will detail how java
object are mapped to WMEs."

> Regarding your specifics; you could look into using a DSL for the domain
> experts rather than pure DRL. Also, the no-loop attribute could\should help
> with your looping fear (have a look in the documentation).
Can I put off the DSL part for later, and consider it just an extra
layer of rule file parsing for now?
Do I lose the graphical on-line editor features of Guvnor (which I
admittedly have not looked into yet, just salivated over some
screenshots.) if I make a DSL?

> A rather disturbing example you choose to show in your email; I think I
> prefer the "Cheese" centric types in the documentation :)
Other than the attention-whoring double take in nomenclature, does
that rule pattern look OK?

I'll stick with cheese in the future :-)


Thanks Again!

Gabor Szokoli
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org<mailto:rules-users at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users


________________________________

**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101206/2b532ac3/attachment.html 


More information about the rules-users mailing list