[rules-dev] DRL sorting (Bind to eval result?)

Wolfgang Laun wolfgang.laun at gmail.com
Tue Nov 29 09:31:20 EST 2011


On 29 November 2011 15:17, Davide Sottara <dsotty at gmail.com> wrote:
> What about a "custom" accumulate function?
>

Then I might as well use init/action/result, as the original poster
did. Also according to him, having it all in DRL is sometimes
preferable. If you have the collection already there (not as the
result of a "from collect" as in my example) a direct transformation
from collection to collection would be preferable.

But, again, I think this is too rarely needed to warrant a new feature.

> query "sortedItems"
>      $sortedValues: List() from accumulate (
>            $f : Fact()
>            sortByAnyMethodYouPrefer( $f )
>      )
> end
>
> We could provide some implementations, even better if incremental.
> In the future, we'll probably provide even better native support for
> this kind of operations.
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/DRL-sorting-Bind-to-eval-result-tp3545246p3545281.html
> Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev



More information about the rules-dev mailing list