I am setting up a very simple example using a DSL and Guvnor. My DSL is as follows:
[when]Age is less than {age} years old=AgeFact(ageInYears < {age})
When I attempt to create a new Business Rule using the Guvnor I can select the above expression just fine and the sentence displays as expected. I then fill in the years with a numeric value (4) and validate. Upon validation I receive the following error.
[Age Test Rule] [ERR 101] Line 4:2 no viable alternative at input 'Age' in rule "Age Test Rule"
I then view the source and it looks like this.
rule "Age Test Rule"
dialect "mvel"
when
Age is less than 4years old
then
end
I noticed that there is no space between the ‘4’ and the word ‘years’. However, in my DSL sentence there is a space between {age} and years. Another interesting thing, if I enter the number 4 followed by a space in the Guvnor form then the rule validates
correctly. Is this a bug or is it something I am doing wrong in my DSL?
Thanks,
Jeff