<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Edson, Thanks so much for the reply.&nbsp; It makes
perfect sense to me.&nbsp; I really appreciate it.&nbsp; </blockquote><div>&nbsp;&nbsp;- Krishna <br>
</div><div class="gmail_quote"><br><div><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
 &nbsp; Krishna,<br>
<br>
 &nbsp; The dialect configuration affects only semantic code blocks. I.e.,<br>
consequences, eval() blocks, etc.<br>
 &nbsp; They are designed to be interchangeable. That is why the examples have<br>
rules using each of the dialects.<br>
<br>
 &nbsp; It is mostly a matter of taste, but MVEL is a script language and as so<br>
has syntax sugar for nested object access, collections, maps, arrays etc...<br>
nothing more than that. Also, MVEL supports java syntax anyway. For<br>
instance, assuming you have a class:<br>
<br>
 &nbsp; Person {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; Map&lt;String, Address&gt; addresses;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; // gets/sets<br>
 &nbsp; &nbsp;}<br>
<br>
 &nbsp; The following consequence should run just fine, both in java and MVEL:<br>
<br>
then<br>
 &nbsp; &nbsp;$person.getAddresses().get(&quot;home&quot;).setStreetName(&quot;my street&quot;);<br>
end<br>
<br>
 &nbsp; Although, MVEL allows you to use a cleaner syntax:<br>
<br>
then<br>
 &nbsp; &nbsp;$person.addresses[&quot;home&quot;].streetName = &quot;my street&quot;;<br>
end<br>
<br>
 &nbsp; It is mostly a matter of taste.<br>
<br>
 &nbsp; []s<br>
 &nbsp; Edson<br>
<br>
2008/5/14 Krishna Satya &lt;<a href="mailto:krishna.ksatya@gmail.com">krishna.ksatya@gmail.com</a>&gt;:<br>
<br>
&gt; Hi, I am trying to understand the difference in how drl rules are expressed<br>
&gt; via the java or mvel dialects. &nbsp;Looking at the drools-examples it is not<br>
&gt; exactly clear. &nbsp;I was looking at the PetStore.drl which seems to specify the<br>
&gt; dialects for various rules using both java and mvel. &nbsp;Are there any<br>
&gt; references to examples which showcase a rule that is expressed both through<br>
&gt; java and mvel dialects so it is clear what the differences are. &nbsp;The rules<br>
&gt; in the PetStore.drl which specify java or mvel syntactically seem to look<br>
&gt; the same.<br>
&gt;<br>
&gt; Also, are there any general suggestions as to when a rule author should use<br>
&gt; the java or the mvel dialect.<br>
&gt;<br>
&gt; Thanks.<br>
&gt; - K<br>
&gt;<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
--<br>
Edson Tirelli<br>
JBoss Drools Core Development<br>
Office: +55 11 3529-6000<br>
Mobile: +55 11 9287-5646<br>
JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-users/attachments/20080514/57a78c73/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/attachments/20080514/57a78c73/attachment-0001.html</a><br>

<br></blockquote></div><br>