You are missing another = sign for your region check, i.e. pointId: Point(page == &quot;home&quot;, region == &quot;center-content&quot;)<br><br>Also, is there a join between the Point and the Content? Otherwise you&#39;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">&lt;<a href="mailto:infinity2heaven@gmail.com">infinity2heaven@gmail.com</a>&gt;</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 &quot;home dummy&quot;<br>
        when<br>
            pointId: Point(page == &quot;home&quot;, region =&quot;center-content&quot;)<br>
            content: Content(id==&quot;adslot&quot;)<br>
            properties[&quot;type&quot;]==&quot;ad&quot; 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 &#39;EQUALS&#39; in rule &quot;home<br>
dummy&quot; in pattern PointId[18,16]: [ERR 102] Line 18:16 mismatched input<br>
&#39;&quot;type&quot;&#39; expecting &#39;]&#39; in rule &quot;home dummy&quot; 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 &quot;drools 5) for writing the<br>
following rule in a drl format?<br>
<br>
&quot; If a Point has a page, &quot;home&quot; and region, &quot;center-content&quot; and the Content<br>
id is &quot;adslot&quot; with a property, type as &quot;ad&quot; 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>