[rules-users] Bulk modification

Wolfgang Laun wolfgang.laun at gmail.com
Wed Aug 31 07:43:48 EDT 2011


This works:

rule "test"
when
##    exists (MyClass());  ## this is redundant
    $l : ArrayList() from collect (MyClass (attribute == false));
    $r : AnotherClass();
then
    $r.doSomething( $l );
    for(Object o : new ArrayList( $l )) {
        modify((MyClass)o) { setAttribute(true); } ;
    }
end

-W




On 31 August 2011 12:18, chocksmith <rodrigo.goncalves at coffeebeantech.com>wrote:

> I doesn't even compile. As o2 did not come from the LHS, I get the follow
> error:
>  The method setAttribute(boolean) is undefined for the type Object
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-Bulk-modification-tp3297162p3297952.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110831/396da435/attachment.html 


More information about the rules-users mailing list