Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Re: How to delete a rule?

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Re: How to delete a rule?


Chronological Thread 
  • From: Julio Polo <>
  • To: Chris Hyzer <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] Re: How to delete a rule?
  • Date: Mon, 17 Oct 2011 16:14:46 -1000

The Lite UI in 2.0 made getting to the attribute and deleting the
attribute assignment a breeze!

I also noticed that 2.0 allows me to delete folders even if they have
attributes defined. That's a nice feature. Thanks!

Julio Polo
University of Hawaii

On Mon, Oct 17, 2011 at 5:16 AM, Chris Hyzer
<>
wrote:
> A rule is just an attribute from the new attribute framework.  If you have
> the 2.0 UI, it should be pretty easy to unassign the rule attribute from
> the owner from the attribute assign screen.  If you are going from WS, the
> trick is knowing which attribute assign id to remove.  If there is one, its
> easy.  But a rule owner could have more than one rule, in which case
> inspect the assignments on that assignment to see which one and remove the
> assignment.  If you need more info or an example or whatever let me know :)
>  btw, there is a DB view which makes the rules easy to see if you are a
> central admin...
>
> Chris
>
> -----Original Message-----
> From:
>
>
> [mailto:]
> On Behalf Of Julio Polo
> Sent: Monday, October 17, 2011 5:52 AM
> To:
>
> Subject: [grouper-users] Re: How to delete a rule?
>
> In case I confused anyone, I meant that I could not find the method
> that deletes a rule by perusing the rule-related classes in the api
> directory.   FWIW, I deleted the group and was able to start over.
>
> That reminds me, I recall seeing something an attribute defined after
> setting a rule.  Is the answer that we delete a rule by deleting the
> appropriate entity from the attribute that was defined with/for the
> rule?
>
> Julio Polo
> University of Hawaii
>
> On Fri, Oct 14, 2011 at 4:09 PM, Julio Polo
> <>
> wrote:
>> How do I delete a rule?  I couldn't find the method to run from gsh
>> files.  I ended up with two rules after defining them twice, and I'd
>> like to start over:
>>
>> gsh 22% RuleApi.rulesToString(group)
>>
>> Rule 0: attributeAssignTypeId: 48fa10a46b6e4dd884bd782f1d43770b,
>> actAsSourceId: g:isa, actAsSubjectId: GrouperSystem, checkType:
>> flattenedMembershipRemove, thenEnum: sendEmail, thenEnumArg0:
>> ,
>> thenEnumArg1: Will remove ${emailAddress} from group
>> ${groupDisplayExtension}, thenEnumArg2: template:
>> testEmailGroupBodyFlattenedRemove,
>>
>> Rule 1: attributeAssignTypeId: c3c1b5b3ec7c4540a687f7956f99ec2d,
>> actAsSourceId: g:isa, actAsSubjectId: GrouperSystem, checkType:
>> flattenedMembershipRemove, thenEnum: sendEmail, thenEnumArg0:
>> ,
>> thenEnumArg1: Will remove
>> ${safeSubject.emailAddress} from group ${groupDisplayExtension},
>> thenEnumArg2: template: testEmailGroupBodyFlattenedRemove,
>>
>> Rule 1 is from the example in
>>
>> https://spaces.internet2.edu/display/Grouper/Grouper+rules+use+case+-+Email+notification+on+flattened+membership+remove
>>
>> but that triggered this error:
>>
>> gsh 10%
>> edu.internet2.middleware.grouper.app.loader.GrouperLoader.runOnceByJobName(grouperSession,
>> "CHANGE_LOG_consumer_grouperRules");
>> loader ran successfully: Error: Error processing record 2319,
>> sequenceNumber: 2319,
>> edu.internet2.middleware.grouper.exception.ExpressionLanguageMissingVariableException:
>> variable 'safeSubject.emailAddress' is not defined in script:
>> 'safeSubject.emailAddress'
>>        at
>> edu.internet2.middleware.grouper.util.GrouperUtil.substituteExpressionLanguage(GrouperUtil.java:8923)
>>        at
>> edu.internet2.middleware.grouper.util.GrouperUtil.substituteExpressionLanguage(GrouperUtil.java:8829)
>>        at
>> edu.internet2.middleware.grouper.util.GrouperUtil.substituteExpressionLanguage(GrouperUtil.java:8800)
>>        at
>> edu.internet2.middleware.grouper.rules.RuleThenEnum$9.fireRule(RuleThenEnum.java:620)
>>        at
>> edu.internet2.middleware.grouper.rules.RuleThen.fireRule(RuleThen.java:226)
>>        at
>> edu.internet2.middleware.grouper.rules.RuleEngine$2.callback(RuleEngine.java:438)
>>        at
>> edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:644)
>>        at
>> edu.internet2.middleware.grouper.rules.RuleEngine.fireRule(RuleEngine.java:430)
>>        at
>> edu.internet2.middleware.grouper.changeLog.esb.consumer.RuleConsumer$RuleEventType$2.processEvent(RuleConsumer.java:96)
>>        at
>> edu.internet2.middleware.grouper.changeLog.esb.consumer.RuleConsumer.processChangeLogEntries(RuleConsumer.java:281)
>>        at
>> edu.internet2.middleware.grouper.changeLog.ChangeLogHelper.processRecords(ChangeLogHelper.java:204)
>>        at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:841)
>>        at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:344)
>>        at
>> edu.internet2.middleware.grouper.app.loader.GrouperLoader.runOnceByJobName(GrouperLoader.java:986)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at bsh.Reflect.invokeMethod(Unknown Source)
>>        at bsh.Reflect.invokeStaticMethod(Unknown Source)
>>        at bsh.Name.invokeMethod(Unknown Source)
>>        at bsh.BSHMethodInvocation.eval(Unknown Source)
>>        at bsh.BSHPrimaryExpression.eval(Unknown Source)
>>        at bsh.BSHPrimaryExpression.eval(Unknown Source)
>>        at bsh.Interpreter.eval(Unknown Source)
>>        at bsh.Interpreter.eval(Unknown Source)
>>        at bsh.Interpreter.eval(Unknown Source)
>>        at
>> edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:48)
>>        at
>> edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:409)
>>        at
>> edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:216)
>>        at
>> edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:146)
>>        at
>> edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)
>> Caused by: org.apache.commons.jexl2.JexlException:
>> edu.internet2.middleware.grouper.util.GrouperUtil.substituteExpressionLanguage@8903![0,24]:
>> 'safeSubject.emailAddress;' undefined variable
>> safeSubject.emailAddress
>>        at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1064)
>>        at
>> org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18)
>>        at
>> org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:162)
>>        at
>> org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:64)
>>        at
>> edu.internet2.middleware.grouper.util.GrouperUtil.substituteExpressionLanguage(GrouperUtil.java:8909)
>>        ... 31 more
>> Did not get all the way through the batch! 2318 != 2319
>>
>> That's when I tried to define the rule again with just ${subject}, but
>> I ended up with two rules.
>>
>> Thanks!
>>
>> Julio Polo
>> University of Hawaii
>>
>



Archive powered by MHonArc 2.6.16.

Top of Page