You are missing another = sign for your region check, i.e. pointId: Point(page == "home", region == "center-content")<br><br>Also, is there a join between the Point and the Content? Otherwise you'll have the cartesian product of points and content<br>
<br><div class="gmail_quote">On Wed, Jan 13, 2010 at 12:09 PM, Pritam <span dir="ltr"><<a href="mailto:infinity2heaven@gmail.com">infinity2heaven@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
While executing the following rule,<br>
<br>
rule "home dummy"<br>
when<br>
pointId: Point(page == "home", region ="center-content")<br>
content: Content(id=="adslot")<br>
properties["type"]=="ad" from content<br>
then<br>
filter.put(<a href="http://content.id" target="_blank">content.id</a>, true);<br>
end<br>
<br>
I get the following error:<br>
[ERR 101] Line 16:46 no viable alternative at input 'EQUALS' in rule "home<br>
dummy" in pattern PointId[18,16]: [ERR 102] Line 18:16 mismatched input<br>
'"type"' expecting ']' in rule "home dummy" in pattern properties<br>
<br>
The documentation explains that this is the most common error but I still<br>
struggle to understand the correct grammar for writing rules. Can anyone<br>
point me to a good resource (I even read the book "drools 5) for writing the<br>
following rule in a drl format?<br>
<br>
" If a Point has a page, "home" and region, "center-content" and the Content<br>
id is "adslot" with a property, type as "ad" then filter the Content (using<br>
a global map and passing a boolean flag)<br>
<br>
Thanks<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Understanding-no-viable-alternative-errors-tp119375p119375.html" target="_blank">http://n3.nabble.com/Understanding-no-viable-alternative-errors-tp119375p119375.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>