Just guessing, but is <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">PatternEntryPropertyWildcard defined inside Assignment?</span><div>
<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">When you write</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; "> Assignment(null == $shiftType)</span></span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"> </span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">You are writing a Field Constraint over Assignment. So, the first element of the constraint should be a field from Assignment, but you are putting "null". I think that's your error there.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Best, <br>
</span></font><br><div class="gmail_quote">On Sun, May 30, 2010 at 8:50 AM, Geoffrey De Smet <span dir="ltr"><<a href="mailto:ge0ffrey.spam@gmail.com">ge0ffrey.spam@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This works in DRL:<br>
Assignment(<br>
(PatternEntryPropertyWildcard.ANY == $shiftTypeWildcard)<br>
|| (shiftType == $shiftType)<br>
...<br>
)<br>
But this doesn't work in DRL:<br>
Assignment(<br>
(null == $shiftType)<br>
|| (shiftType == $shiftType)<br>
...<br>
)<br>
It says "no viable alternative at input 'null' in rule"<br>
<br>
Is there a specific reason why enum literals work on that spot and the<br>
null literal doesn't?<br>
<br>
<br>
Here's the full stacktrace:<br>
<br>
Exception in thread "main" java.lang.IllegalStateException: There are<br>
errors in the scoreDrl's:[536,8]: [ERR 101] Line 536:8 no viable<br>
alternative at input ')' in rule "unwantedPatternShiftType2DaysPattern"<br>
in pattern ShiftType2DaysPattern[542,13]: [ERR 101] Line 542:13 no<br>
viable alternative at input 'null' in rule<br>
"unwantedPatternShiftType2DaysPattern" in pattern Assignment[544,12]:<br>
[ERR 102] Line 544:12 mismatched input '$employee' expecting ')' in rule<br>
"unwantedPatternShiftType2DaysPattern" in pattern Assignment[544,32]:<br>
[ERR 102] Line 544:32 mismatched input ',' expecting '(' in rule<br>
"unwantedPatternShiftType2DaysPattern" in pattern employee[545,8]: [ERR<br>
102] Line 545:8 mismatched input ')' expecting '(' in rule<br>
"unwantedPatternShiftType2DaysPattern" in pattern employee in pattern<br>
shiftDateDayIndex[547,13]: [ERR 101] Line 547:13 no viable alternative<br>
at input 'null' in rule "unwantedPatternShiftType2DaysPattern" in<br>
pattern employee in pattern Assignment<br>
<font color="#888888"><br>
<br>
--<br>
With kind regards,<br>
Geoffrey De Smet<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>
</div>