Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Rules daemon(s) not running?

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Rules daemon(s) not running?


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Julio Polo <>
  • Cc: "" <>
  • Subject: RE: [grouper-users] Rules daemon(s) not running?
  • Date: Tue, 18 Oct 2011 15:54:18 +0000
  • Accept-language: en-US

> 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
> >
>



Archive powered by MHonArc 2.6.16.

Top of Page