[rules-users] DROOLs 'Guarded entry/block' tactics for Rules synchronization and ordinality?

Wolfgang Laun wolfgang.laun at gmail.com
Fri Nov 30 02:22:13 EST 2012


On 30/11/2012, Greg Barton <greg_barton at yahoo.com> wrote:
> Not a problem.  Actually I prefer to perform flow control using working
> memory objects like that instead of using the keywords, but I'm old school.
> :)
>
> GreG

Agenda groups provide a mechanism that's difficult to emulate using
"guard objects", i.e., the stack-ish behaviour, with automatic return
to the previously active group once all activations of the current group
are exhausted.

>> From: "Cotton, Ben" <Ben.Cotton at morganstanley.com>
>>
>> I now want to (competently!) use DROOLs language tactics that give me ever
>> finer grained control over managing rule set firing behavior on Fact
>> mutation events.  Specifically, I want to be able to implement some form
>> of ‘Guarded entry/block’ controls.

There may be some good reason for "fine grained control" every now and then,
but basically this contravenes the fundamental idea of rules being
perfectly capable of determining the right order - if written
correctly, that is, by judiciously selecting fact properties by
constraints.

>> rule "RULE_ALL_RULES_HAVE_FIRED_ONCE_ORDINALLY"
>> when
>>     fact:InsertedFactPOJO()
>>     InsertedFactPOJO(countdownLatch == 0)
>> then

Why not a single Pattern?
    fact:InsertedFactPOJO(countdownLatch == 0)
If (and only if) there is not more than a single InsertedFactPOJO in
WM it doesn't matter (except confuse readers) but otherwise it
produces more or less disturbing effects.

-W



More information about the rules-users mailing list