Neither $submitter nor $requester are defined in the rule as you posted it, so<br>there's no way of telling where the problem might be.<br><br>Note that '&&' binds stronger that '||' 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"><<a href="mailto:ginni@aero.org">ginni@aero.org</a>></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 == "libraryRequest", action ==<br>
"cancelRequest", granted == false)<br>
RequestState($requestCancelable: requestCancelable, $requestSubmitted:<br>
requestSubmitted)<br>
Role(name == "APP_LIBRARY REQUESTS_LIBRARY STAFF")<br>
eval($requestCancelable == true ||<br>
($submitter.getBadgeNumber().equals($userBadge) ||<br>
$requester.getBadgeNumber().equals($userBadge) && !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>