PatternEntryPropertyWildcard is not defined inside Assignement (not as a
property, not as a subclass).
PatternEntryPropertyWildcard is a class (an enum actually), which is
imported.
With kind regards,
Geoffrey De Smet
Esteban Aliverti schreef:
Just guessing, but is PatternEntryPropertyWildcard defined inside
Assignment?
When you write
Assignment(null == $shiftType)
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.
Best,
On Sun, May 30, 2010 at 8:50 AM, Geoffrey De Smet
<ge0ffrey.spam(a)gmail.com <mailto:ge0ffrey.spam@gmail.com>> wrote:
This works in DRL:
Assignment(
(PatternEntryPropertyWildcard.ANY == $shiftTypeWildcard)
|| (shiftType == $shiftType)
...
)
But this doesn't work in DRL:
Assignment(
(null == $shiftType)
|| (shiftType == $shiftType)
...
)
It says "no viable alternative at input 'null' in rule"
Is there a specific reason why enum literals work on that spot and the
null literal doesn't?
Here's the full stacktrace:
Exception in thread "main" java.lang.IllegalStateException: There are
errors in the scoreDrl's:[536,8]: [ERR 101] Line 536:8 no viable
alternative at input ')' in rule
"unwantedPatternShiftType2DaysPattern"
in pattern ShiftType2DaysPattern[542,13]: [ERR 101] Line 542:13 no
viable alternative at input 'null' in rule
"unwantedPatternShiftType2DaysPattern" in pattern Assignment[544,12]:
[ERR 102] Line 544:12 mismatched input '$employee' expecting ')' in
rule
"unwantedPatternShiftType2DaysPattern" in pattern Assignment[544,32]:
[ERR 102] Line 544:32 mismatched input ',' expecting '(' in rule
"unwantedPatternShiftType2DaysPattern" in pattern employee[545,8]: [ERR
102] Line 545:8 mismatched input ')' expecting '(' in rule
"unwantedPatternShiftType2DaysPattern" in pattern employee in pattern
shiftDateDayIndex[547,13]: [ERR 101] Line 547:13 no viable alternative
at input 'null' in rule "unwantedPatternShiftType2DaysPattern" in
pattern employee in pattern Assignment
--
With kind regards,
Geoffrey De Smet
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org <mailto:rules-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-dev
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
------------------------------------------------------------------------
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev