grouper-users - [grouper-users] Re: How to delete a rule?
Subject: Grouper Users - Open Discussion List
List archive
- From: Julio Polo <>
- To:
- Subject: [grouper-users] Re: How to delete a rule?
- Date: Sun, 16 Oct 2011 23:51:35 -1000
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
>
- [grouper-users] How to delete a rule?, Julio Polo, 10/14/2011
- [grouper-users] Re: How to delete a rule?, Julio Polo, 10/17/2011
- RE: [grouper-users] Re: How to delete a rule?, Chris Hyzer, 10/17/2011
- Re: [grouper-users] Re: How to delete a rule?, Julio Polo, 10/17/2011
- RE: [grouper-users] Re: How to delete a rule?, Chris Hyzer, 10/17/2011
- [grouper-users] Re: How to delete a rule?, Julio Polo, 10/17/2011
Archive powered by MHonArc 2.6.16.