[rules-users] How does no-loop work?
Mark Proctor
mproctor at codehaus.org
Mon Jan 21 21:03:56 EST 2008
Srinath Perera wrote:
> Hi All;
>
> I was trying to use no-loop to avoid rule being triggered recursively.
> However for following rule, when there are more than one one object of
> type DataProduct, no-loop attribute has no effect.
>
> rule "Collect"
> no-loop true
> when
> q: Query();
> buffer : java.util.Vector();
> d: DataProduct();
> then
> q.addDataProduct(d);
> update(q);
> end
>
> But on the other hand when there are only one object of type
> DataProduct in the system, the no-loop works. Is this expected
> behavior or have I uncovered a bug?
It only stops the current selected data from being executed recursively
on the current rule. Try using lock-on-active, see the manual for more
details and the conways game of life example for it's usage.
>
> Thanks
> Srinath
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list