[rules-users] For loop inside a modify block problem

Martin A wmlsub at gmail.com
Tue Jan 10 13:44:21 EST 2012


Hello, guys,

I have the following snippet of a right side rule:


        modify ($gsc) {
            doSomething($item.id);

            for (int i = 0; i < $item.quantity; i++) {
                doSomethingElse($item.id);
            }
        }

which looks like is invalid syntax in some way, but it comes out with
strange error report, such as '[Error: no such identifier: $item]'

Would you please assist me on how to put that loop inside that modify block?

Thank you and regards,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120110/351bdc24/attachment.html 


More information about the rules-users mailing list