Neither $submitter nor $requester are defined in the rule as you posted it,
so
there's no way of telling where the problem might be.

Note that '&&' binds stronger that '||' and use parentheses to force
precedence.

-W


On 18 May 2011 18:40, ginni <[email protected]> wrote:

> Hi,
>
> I am new to Drools and would just like to understand how to do what I am
> trying to do.  This syntax does not work, and I am not sure how to make it
> work.  I want permission granted if:
>
> User is Librarian
> OR user is Submitter OR user is Requester AND requestSubmitted is false
> AND
> requestCancelable is true
>
> This syntax requires the user to be both librarian AND submitter or
> requester.
>
> when
>    $perm: PermissionCheck(target == "libraryRequest", action ==
> "cancelRequest", granted == false)
>    RequestState($requestCancelable: requestCancelable, $requestSubmitted:
> requestSubmitted)
>    Role(name == "APP_LIBRARY REQUESTS_LIBRARY STAFF")
>    eval($requestCancelable == true ||
> ($submitter.getBadgeNumber().equals($userBadge) ||
> $requester.getBadgeNumber().equals($userBadge) && !requestSubmitted))
> )
>
> Any help would be greatly appreciated!!
>
> Thanks,
> Ginni
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Complicated-Grant-Permissions-Logic-tp2957702p2957702.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to