grouper-users - Re: [grouper-users] Rules daemon(s) not running?
Subject: Grouper Users - Open Discussion List
List archive
- From: Julio Polo <>
- To: Chris Hyzer <>
- Cc: "" <>
- Subject: Re: [grouper-users] Rules daemon(s) not running?
- Date: Tue, 18 Oct 2011 14:20:37 -1000
Thanks for the tip on how to turn on debug for rules. That made me
realize that safeSubject was an SafeSubject object, and that I could
look up its methods. I wanted to print the uid attribute from LDAP,
so I ended up using this in my rule:
${safeSubject.getAttributeValue(\"uid\")}
As for ${safeSubject.emailAddress} not working, my colleague Baron
Fujimoto spotted that I wasn't making the change to the correct
section of sources.xml (had to modify the GrouperJndiSourceAdapter
block since we were using LDAP). After some experimentation, it looks
like we only needed to add <attribute>mail</attribute> for
${safeSubject.emailAddress} to work. We didn't need the init-param
block you mentioned (well, at least it worked from gsh even after we
commented it out)
In case anyone was wondering, these are the EL variables the debug revealed:
groupId
groupName
ruleElUtils
groupDescription
groupDisplayName
ownerGroupId
safeSubject
groupDisplayExtension
memberId
groupExtension
Thanks!
Julio Polo
University of Hawaii
On Tue, Oct 18, 2011 at 5:54 AM, Chris Hyzer
<>
wrote:
>> While we're on the subject of the email being sent by these rules,
>> could you point me to documentation that goes over the variables and
>> templates used in these emails? Through trial and error, I know I can
>> use these:
>>
>> ${groupDisplayExtension}
>> ${groupName}
>> ${memberId}
>> ${membershipId}
>
> Well, it's a little hard to know since it depends on the rule firing...
> If you are the grouper admin, you can set this in log4j.properties
>
> log4j.logger.edu.internet2.middleware.grouper.rules = DEBUG
>
> Then you should see all the variables.
>
>>
>> If I want to print the deleted member's subject ID, how do I do that?
>
> Try this: ${safeSubject.id}
>
>> Do I need to write a custom EL class?
>
> Shouldn't for standard stuff :) What else do you need?
>
>>
>> I also notice the rules use case examples reference
>> ${safeSubject.emailAddress} but I get an error when I use it.
>
> Set this in the sources.xml for that source:
>
> <init-param>
> <param-name>emailAttributeName</param-name>
> <param-value>someAttributeNameWhichIsEmailAddress</param-value>
> </init-param>
>
> Just replace "someAttributeNameWhichIsEmailAddress" with "emailAddress" or
> whatever your email address attribute is.
>
>>
>> I am also guessing that "template: " is a special string that tells
>> the rule to use a template file instead of the string literal. The
>> use case example uses
>>
>> "template: testEmailGroupBodyFlattenedRemove"
>>
>> but I could not find such file. Where is the template located?
>>
>
> They will be on the classpath, in here:
>
> grouperRulesEmailTemplates/someTemplate.txt
>
> However, you can set this in the grouper.properties to put it in a certain
> folder instead of classpath...
>
> # If not blank, then keep email templates in this folder instead of
> classpath
> # If in classpath, it is classpath:
> grouperRulesEmailTemplates/someTemplate.txt
> rules.emailTemplatesFolder =
>
> Thanks,
> Chris
>
>> Thanks!
>>
>> Julio Polo
>> University of Hawaii
>>
>> On Mon, Oct 17, 2011 at 3:09 PM, Chris Hyzer
>> <>
>> wrote:
>> > The daemons run from the loader... are you running it?
>> >
>> > nohup ./bin/gsh.sh -loader &
>> >
>> > There should be an entry in the table grouper_loader_log for each job
>> > run. You will see one per minute for the ones that run every minute.
>> > You can also use the WS diagnostics to hook up the health/status of
>> > daemons with a monitoring service like nagios.
>> >
>> > https://spaces.internet2.edu/display/Grouper/Grouper+diagnostics
>> >
>> > Let me know how it goes.
>> >
>> > Thanks,
>> > Chris
>> >
>> > -----Original Message-----
>> > From:
>> >
>> >
>> > [mailto:]
>> > On Behalf Of Julio Polo
>> > Sent: Monday, October 17, 2011 7:52 PM
>> > To:
>> >
>> > Subject: [grouper-users] Rules daemon(s) not running?
>> >
>> > The rules I've defined only work when I execute these from gsh:
>> >
>> > edu.internet2.middleware.grouper.app.loader.GrouperLoader.runOnceByJobName(grouperSession,
>> > "CHANGE_LOG_changeLogTempToChangeLog");
>> >
>> > edu.internet2.middleware.grouper.app.loader.GrouperLoader.runOnceByJobName(grouperSession,
>> > "CHANGE_LOG_consumer_grouperRules");
>> >
>> > My grouper-loader.properties file has these values:
>> >
>> > ---------------------------------
>> >
>> > changeLog.changeLogTempToChangeLog.enable = true
>> >
>> > changeLog.changeLogTempToChangeLog.quartz.cron = 50 * * * * ?
>> >
>> > changeLog.consumer.grouperRules.class =
>> > edu.internet2.middleware.grouper.changeLog.esb.consumer.RuleConsumer
>> >
>> > changeLog.consumer.grouperRules.quartzCron = 0 * * * * ?
>> >
>> > rules.quartz.cron = 0 39 12 * * ?
>> >
>> > ---------------------------------
>> >
>> > and I've done the usual reconfiguration and restarting after 12:39 pm,
>> > just in case rules.quartz.cron had to run first:
>> >
>> > ---------------------------------
>> >
>> > # edit the grouper-loaded.properties file here
>> >
>> > cd ~/grouper/grouper-ui/
>> > ant war
>> >
>> > cd ~/grouper/grouper-ws/grouper-ws
>> > ant dist
>> >
>> > # stop grouper here
>> >
>> > cd ~grouper
>> > rm -rf ./tomcat/webapps/grouper*
>> > rm -rf ./tomcat/work/Catalina/localhost
>> > cp ./grouper/grouper-ui/dist/grouper.war ./tomcat/webapps/
>> > cp ./grouper/grouper-ws/grouper-ws/build/dist/grouper-ws.war
>> > ./tomcat/webapps/
>> >
>> > # start grouper here
>> >
>> > ---------------------------------
>> >
>> > and I still get no email after deleting someone. It's supposed to be
>> > 2-4 minutes according to above properties. I decided to run the above
>> > gsh commands, and that's the only thing that triggers the email. That
>> > tells me the daemons aren't really running. What am I missing? Does
>> > the database need to be restarted? How do you check if the daemons
>> > are running?
>> >
>> > Thanks!
>> >
>> > Julio Polo
>> > University of Hawaii
>> >
>>
>
- [grouper-users] Rules daemon(s) not running?, Julio Polo, 10/17/2011
- RE: [grouper-users] Rules daemon(s) not running?, Chris Hyzer, 10/17/2011
- Re: [grouper-users] Rules daemon(s) not running?, Julio Polo, 10/17/2011
- RE: [grouper-users] Rules daemon(s) not running?, Chris Hyzer, 10/18/2011
- Re: [grouper-users] Rules daemon(s) not running?, Julio Polo, 10/18/2011
- RE: [grouper-users] Rules daemon(s) not running?, Chris Hyzer, 10/18/2011
- Re: [grouper-users] Rules daemon(s) not running?, Julio Polo, 10/17/2011
- RE: [grouper-users] Rules daemon(s) not running?, Chris Hyzer, 10/17/2011
Archive powered by MHonArc 2.6.16.