[rules-users] Collect all occurrences of resulting data.

Wolfgang Laun wolfgang.laun at gmail.com
Mon Apr 21 07:09:48 EDT 2014


This is one of the (rare) cases where I'd advocate salience.

rule "Collect results when complete"
salience -999999
    when
		$all : List from collect(Result())
    then
	    ...do something with $all...
end

-W


On 21/04/2014, Ephemeris Lappis <ephemeris.lappis at gmail.com> wrote:
> Hello.
>
> I'm looking for the better way to write a rule that collects data only when
> they have been all processed.
>
> For example, two input objects classes as facts : *Data* and *Category*.
>
> I declare a local type to memorize the result of the evaluation for each
> pair of fact.
>
>
>
> Some rule evaluates the Cartesian product of all *Data* by all *Category* :
>
>
>
> Now I want to collect all the results, but only when the previous rule has
> been fired for all the data.
> Something like :
>
>
>
> Any advice ?
>
> Thanks in advance for your help.
>
> Regards.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Collect-all-occurrences-of-resulting-data-tp4029296.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> 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