<br>&nbsp;&nbsp; Thanks,<br><br>&nbsp;&nbsp; Fixed the docs.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/12/18, Andrew Robinson &lt;<a href="mailto:andrew.rw.robinson@gmail.com">andrew.rw.robinson@gmail.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Quote from the site:<br><br>Disjunctive field constraints connectives could also be used and would
<br>not result in multiple rule generation.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Person( eyeColour == &quot;blue&quot;||&quot;green&quot; )<br><br>Any idea on why the &quot;from&quot; is not correct?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$rt: ResourceType( )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$perm: ResourceTypePermission( accessType != 
AccessType.READ )<br>from $rt.permissions<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Role(id == $perm.role.id)<br><br>&gt;From syntax in the docs:<br><a href="http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html_single/index.html#d0e3867">http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html_single/index.html#d0e3867
</a><br><br>On Dec 18, 2007 3:59 AM, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Correct is either:<br>&gt;<br>&gt;<br>&gt; Role(name == &quot;christws-admin&quot; || == &quot;site-admin&quot; || ==
<br>&gt; &quot;resource-type-admin&quot;)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Or:<br>&gt;<br>&gt; Role(name in ( &quot;christws-admin&quot;, &quot;site-admin&quot;, &quot;resource-type-admin&quot;) )<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Where in the docs it says that the syntax you used is correct?
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;[]s<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Edson<br>&gt;<br>&gt; 2007/12/18, Andrew Robinson &lt;<a href="mailto:andrew.rw.robinson@gmail.com">andrew.rw.robinson@gmail.com</a> &gt;:<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; I upgraed my jboss seam and got the new drools-core and
<br>&gt; &gt; drools-compiler installed. In my maven pom.xml, I am loading 4.0.3 of<br>&gt; &gt; each. My rule is not loading though.<br>&gt; &gt;<br>&gt; &gt; Rule from &quot;entity-rules.drl&quot;:<br>&gt; &gt;<br>&gt; &gt; // Resource type (this is line 16)
<br>&gt; &gt; rule &quot;Resource type changes&quot;<br>&gt; &gt;&nbsp;&nbsp; no-loop<br>&gt; &gt;&nbsp;&nbsp; activation-group &quot;permissions&quot;<br>&gt; &gt; when<br>&gt; &gt;&nbsp;&nbsp; check: PermissionCheck(name == &quot;com.christws.entities.ResourceType
&quot;,<br>&gt; &gt; granted == false)<br>&gt; &gt;&nbsp;&nbsp; (<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Role(name == &quot;christws-admin&quot; || &quot;site-admin&quot; ||<br>&gt; &quot;resource-type-admin&quot;)<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; or<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; (
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rt: ResourceType( )<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $perm: ResourceTypePermission( accessType != AccessType.READ )<br>&gt; &gt; from $rt.permissions<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Role(id == $perm.role.id)<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; )<br>
&gt; &gt;&nbsp;&nbsp; )<br>&gt; &gt; then<br>&gt; &gt;&nbsp;&nbsp; check.grant ();<br>&gt; &gt; end;<br>&gt; &gt;<br>&gt; &gt; I am getting parsing errors with the Role line due to the &quot;&quot;||&quot;&quot;||&quot;&quot;<br>&gt; &gt; syntax and with the $perm line because of the &quot;from&quot;. According to
<br>&gt; &gt; [1], these should work.<br>&gt; &gt;<br>&gt; &gt; 23:06:49,082 ERROR [RuleBase] errors parsing rules in:<br>&gt; &gt; /META-INF/entity-rules.drl<br>&gt; &gt; 23:06:49,083 ERROR [RuleBase] unknown:23:37 Unexpected token
<br>&gt; &gt; &#39;&quot;site-admin&quot;&#39; (/META-INF/entity-rules.drl)<br>&gt; &gt; 23:06:49,083 ERROR [RuleBase] unknown:23:37 Unexpected token<br>&gt; &gt; &#39;&quot;site-admin&quot;&#39; (/META-INF/entity-rules.drl
)<br>&gt; &gt; 23:06:49,083 ERROR [RuleBase] unknown:23:53 Unexpected token<br>&gt; &gt; &#39;&quot;resource-type-admin&quot;&#39; (/META-INF/entity- rules.drl)<br>&gt; &gt; 23:06:49,083 ERROR [RuleBase] unknown:27:6 mismatched token:
<br>&gt; &gt; [@170,739:743=&#39;$perm&#39;,&lt;7&gt;,27:6]; expecting type RIGHT_PAREN<br>&gt; &gt; (/META-INF/entity-rules.drl)<br>&gt; &gt; 23:06:49,083 ERROR [RuleBase] unknown:29:4 mismatched token:<br>&gt; &gt; [@205,859:859=&#39;)&#39;,&lt;12&gt;,29:4]; expecting type THEN
<br>&gt; &gt; (/META-INF/entity-rules.drl)<br>&gt; &gt;<br>&gt; &gt; What am I doing wrong? I am trying to see if the user has one of the 3<br>&gt; &gt; admin roles or has a role whose permission is update or delete (not<br>
&gt; &gt; read) (ResourceType has List&lt;ResourceTypePermission&gt; getPermissions()<br>&gt; &gt; which has getAccessType() and getRole()).<br>&gt; &gt;<br>&gt; &gt; Thanks,<br>&gt; &gt; Andrew<br>&gt; &gt;<br>&gt; &gt; [1]
<br>&gt; <a href="http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html_single/index.html">http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html_single/index.html</a><br>&gt; &gt; _______________________________________________
<br>&gt; &gt; rules-users mailing list<br>&gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt;&nbsp;&nbsp; Edson Tirelli<br>&gt;&nbsp;&nbsp; JBoss Drools Core Development<br>&gt;&nbsp;&nbsp; Office: +55 11 3529-6000<br>&gt;&nbsp;&nbsp; Mobile: +55 11 9287-5646<br>&gt;&nbsp;&nbsp; JBoss, a division of Red Hat @ 
<a href="http://www.jboss.com">www.jboss.com</a><br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div>
<br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com
</a>