Another way to do it is a combination of salience and retraction. The
parent rule would have a higher salience value and then retract the
facts in its consequence
Joe
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Greg Barton
Sent: Thursday, October 30,
Thanks Greg.
child rule should be reactivated if parent's conditions for some other fact
are false.
this should happen for each fact. Parent's condition should decide whether
child rule should be executed or not for each fact. If parent's conditions
are true, then don't execute child rule and
You may consider the other suggestion of retracting the fact(s) that would
trigger the child rule. It's the more natural way of going about it.
What's driving this design choice?
--- On Fri, 10/31/08, techy [EMAIL PROTECTED] wrote:
From: techy [EMAIL PROTECTED]
Subject: Re: [rules-users]
Hi Everyone,
I've seen this issue in the archives, but I haven't seen anyone
address it in regards to an upgrade from 4.07 to 5MR2. Basically, I
have a set of java dialect drl files that compile properly in 4.07
and are usable, but when I simply modify my maven build to use the
5MR2
Hi Andrew,
I've seen this in 4.0.7 as well.
There is a dependency from drools-compiler to either Eclipse JDT or
Janino for compilation, depending on what compiler you choose. JDT is
default by now.
Both compilers are supplied with 5M2 bin-dist, see lib/janino.jar and
Thanks Greg and Joe.
I think i should have mentioned this before.
I can also have other parent rule node in the tree structure which tests
against same fact. Each parent rule node should only control its child rule
nodes, but not other parent rule node and child rule node.
If I do retract,
Yep, it would affect all rules that could match on those facts.
You could have a control fact per child rule that could potentially match. The
child rule would include an existence check for that fact in it's conditions.
The parent rule would retract the fact to prevent the child rule from
Hi,
If the rules,conditions,consequences have to be loaded from the database. I
can think of following two approach. what would be right approach( I will
have upto 1200 rules in the db)
1. Programmatically inject the rules into rule engine using drools API.
2. Read the rules from the database