[rules-users] help! rule"rule_key" failed to predicate

赵慧 zhaoh at hpnl.ac.cn
Fri Apr 15 03:46:05 EDT 2011


 hello,everyone! I wrote a rule with Drools, I compile the program and get the errors as follows: 

[3,0]: [ERR 103] Line 3:0 rule 'rule_key' failed predicate: {(validateIdentifierKey(DroolsSoftKeywords.RULE))}? in rule
[3,9]: [ERR 101] Line 3:9 no viable alternative at input 'com' in rule package
[7,0]: [ERR 101] Line 7:0 no viable alternative at input 'import' in rule package in rule sample  

I don't know how it happened, looking forward to your reply! thank you !!! 
 
PS: My rules are here:
 dialect "mvel"
package  com.sample
import com.sample.Server;

rule "system will execute 'tc' command"
   
 when
    eval(Server.Message>8388608)
 then 
     System.out.println("The network is so crowd that it needs repairing.");
    Runtime.getRuntime().exec("tc");#give the authority and execute the "tc" command
end
 
rule "caution"
    when 
        eval(Server.Message==8388608)
    then 
        System.out.println("caution!The network maybe will get blocked very soon.");
end 
 
rule "fluent network"
  when
  eval(Server.Message<8388608)#conditions
 then 
  System.out.println("the current network is very good");#actions
end
 
 
  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110415/880bc22c/attachment.html 


More information about the rules-users mailing list