No can do, because within a modify block a comma-separated list of (setter) method calls of the object between the parentheses must be written.<br><br>Note that you can change a fact (without a modify statement) - just follow this with an update call.<br>
<br>See the Expert manual for details.<br><br>-W <br><br><br><div class="gmail_quote">2012/1/10 Martin A <span dir="ltr">&lt;<a href="mailto:wmlsub@gmail.com">wmlsub@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hello, guys,<div><br></div><div>I have the following snippet of a right side rule:</div><div><br></div><div><div><br></div><div>        modify ($gsc) {</div><div>            doSomething($<a href="http://item.id" target="_blank">item.id</a>);</div>

<div>            </div><div>            for (int i = 0; i &lt; $item.quantity; i++) {</div><div>                doSomethingElse($<a href="http://item.id" target="_blank">item.id</a>);</div><div>            }</div><div>        }</div>
</div>
<div><br></div><div>which looks like is invalid syntax in some way, but it comes out with strange error report, such as &#39;[Error: no such identifier: $item]&#39;</div><div><br></div><div>Would you please assist me on how to put that loop inside that modify block?</div>

<div><br></div><div>Thank you and regards,</div><div>Martin</div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>