[rules-users] keep only one, retract all other

Martin Minka martin.minka at gmail.com
Fri Nov 30 04:56:21 EST 2012


thank you for help. my summary for 5.5.0.Final:

1. *Esteban's suggestion works*, but of course requires more activations
2. Wolfgang's suggestion to *use java dialect* works
3. it looks like there is *no way to achieve the same with mvel* dialect

sincerely,
Martin

2012/11/30 Esteban Aliverti <esteban.aliverti at gmail.com>

> rule "Remove all but one"
> when
>     $f1: Fact(id == "aaa")
>     $f2: Fact(id == "aaa", this != $f1)
> then
>     retract($f2);
> end
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121130/0b87cb4c/attachment.html 


More information about the rules-users mailing list