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 "mvel"<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"><<a href="mailto:john.peterson.gv3k@statefarm.com">john.peterson.gv3k@statefarm.com</a>></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 'dialect "mvel"' (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>
>hello,everyone!I wrote a rule with Drools,but the error told me that the field Server.Message is not visible, I can't find how it happens. Please<br>
>help me, I am almost exhausted with it. thank you.<br>
>the rules are as follows:<br>
><br>
>package com.sample<br>
>import com.sample.Server;<br>
><br>
>rule "system will execute 'tc' command"<br>
> when<br>
> eval(Server.Message>8388608)<br>
> then<br>
> System.out.println("The network is so crowd that it needs repairing.");<br>
> Runtime.getRuntime().exec("tc");#execute the "tc" command end<br>
><br>
>rule "caution"<br>
> when<br>
> eval(Server.Message==8388608)<br>
> then<br>
> System.out.println("caution!The network maybe will get blocked very soon."); end<br>
><br>
>rule "fluent network"<br>
> when<br>
> eval(Server.Message<8388608)#conditions<br>
> then<br>
> System.out.println("the current network is very good");<br>
> #actions<br>
>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>