Thanks Wolfgang,it worked. Never thought that copy , paste creates a problem :-)<br><br>
<div class="gmail_quote">2009/8/26 Edson Tirelli <span dir="ltr"><<a href="mailto:tirelli@post.com">tirelli@post.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br> Lol, good catch Wolfgang. So I guess we need to improve our rule naming escaping algorithm.<br><br>
[]s<br> Edson<br><br>
<div class="gmail_quote">2009/8/26 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></span>
<div>
<div></div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi Edson,<br><br>love this one – (!) a marvellous case of To See and See Not ;-)<br><br>Lindy copy-pasted the Vote.drl from the cited HTML page which must have been run over by some text processor which promptly converted space surrounded hyphens into an EN DASH, codepoint 0x2013 = 8211.<br>
<br>-W<br><br>
<div class="gmail_quote">2009/8/25 Edson Tirelli <span dir="ltr"><<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>></span>
<div>
<div></div>
<div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><br> Ok, it is clearly complaining about the "-" in your rule name. The odd thing is that "-" is allowed in rule names, so what is different about your setup? <br>
<br>* did you enabled to code dump to disk?<br>* what compiler are you using? JDT or Janino? what version?<br>* what operating system are you using?<br>* what JVM and java compiler are you using?<br><br> []s<br> Edson <br>
<br><br><br>
<div class="gmail_quote">2009/8/25 Lindy hagan <span dir="ltr"><<a href="mailto:lindyhagan@gmail.com" target="_blank">lindyhagan@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div>
<div>Getting below error for each and every rule in Vote.drl . Using Drools 5 and eclipse 3.4. </div>
<div> </div>
<div>Trying this example </div>
<div><a href="http://www.developer.com/java/ent/article.php/10933_3821101_3" target="_blank">http://www.developer.com/java/ent/article.php/10933_3821101_3</a></div>
<div> </div>
<div> </div>
<div>Rule Compilation error : [Rule name='VeryGoodValue – between 6-9']<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (3:79) : Syntax error on tokens, delete these tokens<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (3:92) : The public type Rule_VeryGoodValue_ must be defined in its own file<br>
com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (3:127) : Syntax error, insert "}" to complete Block<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (4:134) : Syntax error on tokens, delete these tokens<br>
com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:202) : Syntax error on token "void", @ expected<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:234) : Syntax error on token "KnowledgeHelper", ( expected after this token<br>
com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:284) : Syntax error on token "m", delete this token<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:287) : Syntax error on token(s), misplaced construct(s)<br>
com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:309) : Syntax error, insert ")" to complete MethodInvocation<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:309) : Syntax error, insert ")" to complete SingleMemberAnnotation<br>
com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:309) : Syntax error, insert "enum Identifier" to complete EnumHeaderName<br> com/examples/Rule_VeryGoodValue_–_between_6_9_0.java (6:309) : Syntax error, insert "EnumBody" to complete EnumDeclaration<br>
</div>
<div> </div>
<div><b>Vote.drl</b></div>
<div> </div>
<div>package com.examples<br> <br>import com.examples.drools.Vote;<br> <br>rule "WrongValue – less than 0"<br> when<br> m : Vote( average < 0.0, vote : vote )<br> then <br> m.setAverage(0.0f);<br>
update( m ); <br>end<br> <br>rule "WrongValue – bigger than 10"<br> when<br> m : Vote( average > 10.0, vote : vote )<br> then <br> m.setAverage(10.0f);<br>
update( m ); <br>end<br> <br>rule "BadValue – between 0-3"<br> when<br> m : Vote( average >= 0.0 && average <=3.0, vote : vote )<br> then<br> m.setVote("Bad!");<br>
System.out.println( m.getVote() );<br>end<br> <br>rule "GoodValue – between 3-6"<br> when<br> m : Vote( average >3.0 && average <=6.0, vote : vote )<br> then<br> m.setVote("Good!");<br>
System.out.println( m.getVote() );<br>end<br> <br>rule "VeryGoodValue – between 6-9"<br> when<br> m : Vote( average >6.0 && average <=9.0, vote : vote )<br> then<br> m.setVote("Very Good!");<br>
System.out.println( m.getVote() );<br>end<br> <br>rule "ExcellentValue – between 9-10"<br> when<br> m : Vote( average >9.0 && average <=10.0, vote : vote )<br> then<br> m.setVote("Excellent!");<br>
System.out.println( m.getVote() );<br>end</div>
<div><b><font color="#960000" size="2"><font color="#960000" size="2">
<p></p></font></font></b></div><br></div></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">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><br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br> Edson Tirelli<br>
JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com/" target="_blank">www.jboss.com</a><br></font><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">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><br></blockquote></div></div></div><br><br>_______________________________________________<br>
rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div></div></div>
<div>
<div></div>
<div class="h5"><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com/" target="_blank">www.jboss.com</a><br></div></div><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>
<br></blockquote></div><br>