Re: [rules-users] NPE with enum?

2007-12-24 Thread Andrew Robinson
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

[rules-users] NPE with enum?

2007-12-21 Thread Andrew Robinson
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

Re: [rules-users] Help with my understanding

2007-12-19 Thread Andrew Robinson
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})$

Re: [rules-users] Help with my understanding

2007-12-19 Thread Andrew Robinson
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

Re: [rules-users] New functionality not working?

2007-12-18 Thread Andrew Robinson
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

Re: [rules-users] New functionality not working?

2007-12-18 Thread Andrew Robinson
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

Re: [rules-users] New functionality not working?

2007-12-18 Thread Andrew Robinson
t; >Correct is either: > > > Role(name == "christws-admin" || == "site-admin" || == > "resource-type-admin") > >Or: > > Role(name in ( "christws-admin", "site-admin", "resource-type-admin") ) > >

[rules-users] New functionality not working?

2007-12-17 Thread Andrew Robinson
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