[rules-users] Problem with DRL language/ XLS decision tables.

Swindells, Thomas TSwindells at nds.com
Thu Jul 22 09:53:46 EDT 2010


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: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of tom ska
Sent: 22 July 2010 14:27
To: rules-users at lists.jboss.org
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 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/20100722/084de3ec/attachment.html 


More information about the rules-users mailing list