Re: [rules-users] Any form of "groub by" or "distinct" in accumulate/collect ?
It seems a quite good idea. On the way of "accumulate " or "collect",
I've been thinking before such a solution... Injection of the collected
elements remains to be done.
I will try it with a concrete data set and verify that the collection
time is acceptable.
I'll let you know about the results.
Le 10/05/2014 19:06, Jan Šťastný a écrit :
> maybe I misunderstood you, but what about a set collection. Just
> implementd equals method of A properly and use accumulate function
> , $uniqueASet:collectSet($a)
> do whatever you want
> Hope that helped.
> Dne 10.5.2014 11:36, Ephemeris Lappis napsal(a):
>> Perhaps that my question has few sense or none...
>> I've an object graph with say A, B and C.
>> A has one or many B, that has one or many C.
>> I can navigate through the relations between my objects in both direction.
>> For example, I can do fo any instance of C : c.b.a (or c.getB().getA())...
>> My initial input facts or only C objects, and I'd like to identify all the
>> distinct A instances, and insert them into my working memory, as they
>> participate to global rules.
>> I've been looking for some forms of accumulate or collect, but I've not
>> found a correct way to do it.
>> Some help ?
>> View this message in context: http://drools.46999.n3.nabble.com/Any-form-of-groub-by-or-distinct-in-accumulate-collect-tp4029501.html >> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> rules-users mailing list
>> [hidden email] >> https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________
> rules-users mailing list
> [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users >