On 12/06/2014, bvoisin <benoit.voi...@igc-erp.com> wrote: > I did not quite understand your last paragraph on a "representative". Do > you have an example I could study ?
Given a set of facts that match some constraints, and you want to accumulate them in some way, this approach appears to achieve it: Foo( $bar: bar == "bar-x", ... ) accumulate( Foo( bar == $bar,... ); ...; ... ) But, obviously, there is more than one such Foo where bar == "bar-x", and hence the first CE matches more than once, while the accumulate may not collect a set that's different each time. Details may vary, of course, but there's no guarantee that each accumulate will be unique. In order to have each set of Foo-facts accumulated only once, some constraint must be exercised on the "trigger" Foo, e.g., making it unique among all the candidates: Foo( $id: id, $bar: bar == "bar-x", ... ) not Foo( id < $id, $bar: bar == "bar-x", ... ) accumulate( Foo( bar == $bar,... ); ...; ... ) Now, this particular accumulation occurs only once. -W _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users