[rules-users] Expert: Modify the result of a collect Operation
Esteban Aliverti
esteban.aliverti at gmail.com
Tue Apr 20 13:42:33 EDT 2010
Since the list is not a Fact there is no reason to modify it. And because
the list will always have 1 value, you can modify it accessing it by its
index (0).
2010/4/20 Jörg Herbst <herbsthannover at googlemail.com>
> Hi,
>
> I'm trying to change the result of a collect operation, is this possible?
>
> This is my sample rule:
>
> rule "Select the only remaining value for
> each feature Key"
> when
> # Check all not selected features
> feature :
> ExpertFeature(selected==false)
> # if there is one enable feature select
> this one
> list : ArrayList (size == 1) from
> collect( ExpertFeature(disabled == false, featureKey==feature.featureKey,
> selected==false) )
> then
> # this is not working
> modify( list ) {setSelected(true);}
> end
>
> Thanks
> Joerg
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100420/e261db71/attachment.html
More information about the rules-users
mailing list