The easiest way to do this is to use a custom helper object eg RuleLatch(fact, 
"name").
You would write your rules so that for each group of mutually exclusive rules 
then for the fact they match against they check the absence of an appropriate 
RuleLatch, as part of their result part they then insert the appropriate rule 
latch - thereby preventing any other rule from running.

The easiest way to stop processing a particular fact is to retract it.  If you 
do need to keep it in your working memory then use the RuleLatch concept as 
above - each rule may check for two latches, one latch for a particular group 
of rules as described above, the other latch is a more global control which 
only a couple of rules insert.

Hope that makes sense,

Thomas

From: [email protected] 
[mailto:[email protected]] On Behalf Of tom ska
Sent: 22 July 2010 14:27
To: [email protected]
Subject: [rules-users] Problem with DRL language/ XLS decision tables.

Hello,
I have a problem with defining rules. I insert many, many objects (facts) to 
ksession object (StatefulKnowledgeSession). I want to fire rules for all of 
them(facts), but I want to fire only one rule from all rules for each one 
fact(not always this same rule is fired, because I use salience). 
activation-group is not appropriate, because it works only with one object 
(fact) - rest is not processed by engine.
Second question is: how can I stop processing rules, bot only for one fact, not 
for all of them.

Thanks,
tom.

P.S. forgive me my English... :)
P.S.2 Firstly I want to do this in DRL, then, I'll try with XLS, and write post 
if I would find problems...


________________________________

**************************************************************************************
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
[email protected] 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
**************************************************************************************
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to