[rules-users] infinite loop in decision table

Swindells, Thomas TSwindells at nds.com
Wed Jan 20 04:41:39 EST 2010


The easiest pattern is to create a "GroupLatch" helper object has a name.
Then add two columns, a Condition column which checks that there doesn't exist a Latch with the given name, and an action column which inserts a new Latch with the given name into the working memory.  If multiple rules have the same name then only one of them will run (and only once). If they all have different names then you allow all the rules to run but only once.

Eg:
CONDITION         ACTION
NOT GroupLatch
name               insert(new GroupLatch("$param"));

Thomas

> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org [mailto:rules-users-
> bounces at lists.jboss.org] On Behalf Of djb
> Sent: 19 January 2010 10:22
> To: rules-users at lists.jboss.org
> Subject: [rules-users] infinite loop in decision table
>
>
> Hi,
>
> I have successfully used UNLOOP to stop repitition of rules in my decision
> table when one rule fires when all rules are mutually exclusive...
>
> but I've got two rows/rules matching a condition for a given input, and it
> is back to an infinite loop.
>
> Is there something like lock-on-active for a decision table?
>
> My table is basically something like the following, with an update in the
> action:
> Tariff X    Minimum age   Maximum Age
> 1234          5                    <blank>
> 2345          <blank>               30
>
> It checks whether a claim has a tariff, so so if a claim has both tariffs
> and is between those two ages, it gets into an infinite update loop.
>
> Thanks,
> Daniel
>
>
>
> --
> View this message in context: http://n3.nabble.com/infinite-loop-in-decision-
> table-tp129933p129933.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> 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.

An NDS Group Limited company. www.nds.com




More information about the rules-users mailing list