<div dir="ltr">Wolfgang,<div><br></div><div>Thanks for the explanation. It helps.</div><div><br></div><div>regards</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 29, 2013 at 6:00 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 28/11/2013, Tales Costa &lt;<a href="mailto:tales@ibiseng.com">tales@ibiseng.com</a>&gt; wrote:<br>

&gt; Hi,<br>
&gt;<br>
&gt; I am new to Drools and Optaplanner and have built a first model and<br>
&gt; succeeded running with java score calculation. Now am struggling trying to<br>
&gt; use rules for score.<br>
&gt;<br>
&gt; Have read &quot;Drools Expert User Guide&quot; and looked through Optaplanner<br>
&gt; examples but am still confused. Main difficult is discovering what can do<br>
&gt; and canīt do with java dialect within the &quot;when&quot; and &quot;then&quot; blocks. Are<br>
&gt; there tutorial and/or other references I could look into for more<br>
&gt; information on this ?<br>
<br>
</div></div>The rules are actually quite simple.<br>
<br>
LHS: Any boolean expression is valid, with the shortcuts for accessing<br>
members. If the parser misbehaves, try eval() - there it&#39;s pure Java.<br>
<br>
RHS: Java code, as in any method, plus the &quot;macros&quot; defined in Expert.<br>
<br>
That said, some things should not be done:<br>
   * Never use side effects in LHS expressions that modifies anything<br>
in working memory.<br>
   * Don&#39;t write long &quot;then&quot; parts; calling static methods is preferred.<br>
<br>
-W<br>
<br>
<br>
<br>
<br>
<br>
&gt;<br>
&gt; regards<br>
&gt;<br>
&gt; Tales<br>
&gt;<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>
</blockquote></div><br></div>