Neither $submitter nor $requester are defined in the rule as you posted it, so<br>there&#39;s no way of telling where the problem might be.<br><br>Note that &#39;&amp;&amp;&#39; binds stronger that &#39;||&#39; and use parentheses to force precedence.<br>
<br>-W<br><br><br><div class="gmail_quote">On 18 May 2011 18:40, ginni <span dir="ltr">&lt;<a href="mailto:ginni@aero.org">ginni@aero.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I am new to Drools and would just like to understand how to do what I am<br>
trying to do.  This syntax does not work, and I am not sure how to make it<br>
work.  I want permission granted if:<br>
<br>
User is Librarian<br>
OR user is Submitter OR user is Requester AND requestSubmitted is false<br>
AND<br>
requestCancelable is true<br>
<br>
This syntax requires the user to be both librarian AND submitter or<br>
requester.<br>
<br>
when<br>
    $perm: PermissionCheck(target == &quot;libraryRequest&quot;, action ==<br>
&quot;cancelRequest&quot;, granted == false)<br>
    RequestState($requestCancelable: requestCancelable, $requestSubmitted:<br>
requestSubmitted)<br>
    Role(name == &quot;APP_LIBRARY REQUESTS_LIBRARY STAFF&quot;)<br>
    eval($requestCancelable == true ||<br>
($submitter.getBadgeNumber().equals($userBadge) ||<br>
$requester.getBadgeNumber().equals($userBadge) &amp;&amp; !requestSubmitted))<br>
)<br>
<br>
Any help would be greatly appreciated!!<br>
<br>
Thanks,<br>
Ginni<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Complicated-Grant-Permissions-Logic-tp2957702p2957702.html" target="_blank">http://drools.46999.n3.nabble.com/Complicated-Grant-Permissions-Logic-tp2957702p2957702.html</a><br>

Sent from the Drools: User forum 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>