Still, accessing the class field com.sample.Server.Message in eval() in this way is almost certainly not a good approach.<br><br>But note that <br>   dialect &quot;mvel&quot;<br>may be written preceding all the rules it should apply to.<br>
<br>-W<br><br><div class="gmail_quote">On 12 April 2011 14:38, John Peterson <span dir="ltr">&lt;<a href="mailto:john.peterson.gv3k@statefarm.com">john.peterson.gv3k@statefarm.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try adding &#39;dialect &quot;mvel&quot;&#39; (no single quotes) after the rule name to the top of each of the rules.  I have seen this error before and doing this resolved the issue.<br>
<br>
&gt;hello,everyone!I wrote a rule with Drools,but the error told me that the field Server.Message is not visible, I can&#39;t find how it happens. Please<br>
&gt;help me, I am almost exhausted with it. thank you.<br>
&gt;the rules are as follows:<br>
&gt;<br>
&gt;package com.sample<br>
&gt;import com.sample.Server;<br>
&gt;<br>
&gt;rule &quot;system will execute &#39;tc&#39; command&quot;<br>
&gt; when<br>
&gt;    eval(Server.Message&gt;8388608)<br>
&gt; then<br>
&gt;     System.out.println(&quot;The network is so crowd that it needs repairing.&quot;);<br>
&gt;  Runtime.getRuntime().exec(&quot;tc&quot;);#execute the &quot;tc&quot; command end<br>
&gt;<br>
&gt;rule &quot;caution&quot;<br>
&gt;    when<br>
&gt;        eval(Server.Message==8388608)<br>
&gt;    then<br>
&gt;        System.out.println(&quot;caution!The network maybe will get blocked very soon.&quot;); end<br>
&gt;<br>
&gt;rule &quot;fluent network&quot;<br>
&gt;  when<br>
&gt;  eval(Server.Message&lt;8388608)#conditions<br>
&gt; then<br>
&gt;  System.out.println(&quot;the current network is very good&quot;);<br>
&gt;  #actions<br>
&gt;end<br>
<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>