<br>&nbsp;&nbsp; Jojan,<br><br>&nbsp;&nbsp; Yes, as I mentioned, it is a JAVA block. What you can do in java, you can do in RHS... what you can&#39;t do in java, you can&#39;t do there.<br><br>&nbsp;&nbsp; Although, we are adding MVEL support to version 
4.0, where you can use it instead of java. MVEL has a lot of syntax simplifications to help with such cases.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><br><div><span class="gmail_quote">2007/6/7, Joj &lt;<a href="mailto:jojpm@yahoo.com">
jojpm@yahoo.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>But I believe tht thr ll be pbms if v try 2 simply operate on fields if
<br>their types r wrapper objects..<br>For e.x:<br>If the marks were Double, v cant simply write as :<br>student.setTotal( mark1 + mark2 );<br><br>instead, v have 2 write as :<br>student.setTotal( Double.valueOf( Double.parseDouble
(&quot;23&quot;) +<br>Double.parseDouble(&quot;18&quot;) ) );<br><br>where 23 and 18 are String values representing mark1 and mark2.<br><br>Or, is there any simpler way 2 do this, to operate on wrapper objects?<br><br>Thanks in advance,
<br>Jojan P.M.<br><br><br><br>Edson Tirelli-3 wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;RHS is a java block, anything valid in java is valid there... are you<br>&gt; sure you are binding the variables?<br>&gt;<br>&gt; when<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; student : Student( mark1 : mark1, mark2 : mark2 )
<br>&gt; then<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; student.setTotal( mark1 + mark2 );<br>&gt; end<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;[]s<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Edson<br>&gt;<br>&gt; 2007/6/1, Joj &lt;<a href="mailto:jojpm@yahoo.com">jojpm@yahoo.com</a>&gt;:<br>&gt;&gt;<br>&gt;&gt;
<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; Can&#39;t we write on RHS like:<br>&gt;&gt;<br>&gt;&gt; student.setTotal(mark1 + mark2);<br>&gt;&gt; (where mark1 &amp; 2 are variables in student)<br>&gt;&gt;<br>&gt;&gt; Is it possible? I mean arithmetical operations, calling Java methods, etc
<br>&gt;&gt; from inside setters. If not, is there any other logic to do the same?<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Please reply A.F.A.P.<br>&gt;&gt; Jojan<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; View this message in context:
<br>&gt;&gt; <a href="http://www.nabble.com/Setting-object%27s-fields-to-complex-result-in-RHS-tf3851977.html#a10911851">http://www.nabble.com/Setting-object%27s-fields-to-complex-result-in-RHS-tf3851977.html#a10911851</a>
<br>&gt;&gt; Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt;&nbsp;&nbsp; Edson Tirelli<br>&gt;&nbsp;&nbsp; Software Engineer - JBoss Rules Core Developer<br>&gt;&nbsp;&nbsp; Office: +55 11 3529-6000<br>&gt;&nbsp;&nbsp; Mobile: +55 11 9287-5646<br>&gt;&nbsp;&nbsp; JBoss, a division of Red Hat @ 
<a href="http://www.jboss.com">www.jboss.com</a><br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;<br><br>--<br>View this message in context: <a href="http://www.nabble.com/Setting-object%27s-fields-to-complex-result-in-RHS-tf3851977.html#a11003397">
http://www.nabble.com/Setting-object%27s-fields-to-complex-result-in-RHS-tf3851977.html#a11003397</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<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">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ 
<a href="http://www.jboss.com">www.jboss.com</a>