om $perm.role
> Role(name == $rolename)
>
> Can you make a small self contained test and upload it as a jira for us.
>
> Thanks
>
> Mark
>
>
> Andrew Robinson wrote:
> > I have an enumeration called AccessType:
> > public enum AccessType
> > {
> &g
I have an enumeration called AccessType:
public enum AccessType
{
READ,
UPDATE,
DELETE
}
In a rule, I have:
$rt: ResourceType( )
and $perm: ResourceTypePermission( accessType != AccessType.READ
) from $rt.permissions
and com.christws.entities.Role($rolename: name) from $per
although it looks like you may want "not matches" instead?
On Dec 19, 2007 10:19 AM, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> How about this:
>
> rule "Valid Format"
> when
> $status : RuleResult()
> Identifier(value matches "^([0-9]{9})$
How about this:
rule "Valid Format"
when
$status : RuleResult()
Identifier(value matches "^([0-9]{9})$")
then
$status.addErrorMessage("Identifier does not match required format");
end
http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html_single/index.html#d0e3318
On Dec 19, 2007 9:48
Sorry once again, I got it working adding "and" between the lines in
the permission section. looking in the docs I realized that only at
the root level is there an applied "and"
On Dec 18, 2007 10:52 AM, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> Okay got the fr
Okay got the from working in a new rule (one rule to check the admin
roles, one to check the permissions). Is there a better way to do
this?
-Andrew
On Dec 18, 2007 10:03 AM, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> Quote from the site:
>
> Disjunctive field constraints co
t;
>Correct is either:
>
>
> Role(name == "christws-admin" || == "site-admin" || ==
> "resource-type-admin")
>
>Or:
>
> Role(name in ( "christws-admin", "site-admin", "resource-type-admin") )
>
>
I upgraed my jboss seam and got the new drools-core and
drools-compiler installed. In my maven pom.xml, I am loading 4.0.3 of
each. My rule is not loading though.
Rule from "entity-rules.drl":
// Resource type (this is line 16)
rule "Resource type changes"
no-loop
activation-group "permission