Hello,<div><br></div><div>I suppose that means something like:</div><div><br></div><div><div style> modify ($gsc) {</div><div style> doSomething($<a href="http://item.id/" target="_blank" style="color:rgb(17,85,204)">item.id</a>);</div>
<div style> }</div><div style><br class="Apple-interchange-newline"> </div><div style> for (int i = 0; i < $item.quantity; i++) {</div><div style> $gsc.doSomethingElse($<a href="http://item.id/" target="_blank" style="color:rgb(17,85,204)">item.id</a>);</div>
<div style> }</div><div style><br></div><div style> update($gsc);</div><div style><br></div><div style>Thanks,</div><div style>Martin</div><br><div class="gmail_quote">2012/1/10 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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"><<a href="mailto:wmlsub@gmail.com" target="_blank">wmlsub@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div><div class="h5">
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 < $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 '[Error: no such identifier: $item]'</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></div></div><div class="im">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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></div></blockquote></div><br>
<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></div>