Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Using hooks for group effective membership changes

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Using hooks for group effective membership changes

Chronological Thread 
  • From: Chris Hyzer <>
  • To: Peter DiCamillo <>, Shilen Patel <>
  • Cc: "" <>
  • Subject: RE: [grouper-users] Using hooks for group effective membership changes
  • Date: Sat, 22 Jan 2011 17:14:25 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

The change log consumer is just like a hook, but better. :)

Just extend: edu.internet2.middleware.grouper.changeLog.ChangeLogConsumerBase

Attached is the built in example

Then you register that with the like this:

changeLog.consumer.yourNameHere.class = edu.yourSchool.ChangeLogConsumer
changeLog.consumer.yourNameHere.quartzCron = 0 * * * * ?

(note, just leave that cron every minute)

This is better for notification than hooks since it does flattened
calculations, operates in batches of 100 I believe, and is asynchronous
(after the transaction of the membership change is done, then these are
processed in the next minute).

If you want web service or XMPP notifications, then the ESB connector is
built on top of the change log consumer, if you want to write your own code,
stick with change log, otherwise I can give more info about ESB.



-----Original Message-----

On Behalf Of Peter DiCamillo
Sent: Saturday, January 22, 2011 2:31 PM
To: Shilen Patel

Subject: Re: [grouper-users] Using hooks for group effective membership

Shilen Patel wrote:
> Hi Peter,
> Are you using Grouper 1.6? If so, as you've noticed, hooks don't fire
> for effective memberships.
Hi, yes it is Grouper 1.6.

> It sounds like you basically want to know when a flattened membership is
> added or deleted. Is that right? A flattened membership is added the
> first time a group gets a member whether it's direct or indirect. A
> flattened membership is removed when a group no longer has a member
> where the member previously could have been direct or indirect.
Yes, that's exactly what I want.

> You can get flattened notifications using the change log by directly
> querying the change log table, implementing a change log consumer in
> Java, or using the ESB connector. The change log also includes
> immediate membership changes. The flattened ones have a
> membershipType=flattened.
I was hoping there was a way to use a hook for flattened membership
changes, because I'm trying to get a lightweight solution in place
quickly, and hooks are otherwise working well for that. In this
particular case, our structure of course groups, the relationships
between the groups can be managed by logic in the code, so I'll do that
for now. However I think we will have to look at the other solutions in
the future.


> On 1/21/11 4:31 PM, Peter DiCamillo wrote:
>> I'd like to use the hooks mechanism in Grouper to get a notification
>> when the effective membership of a group changes. I've done some
>> experimenting with hooks, and understand how to set them up. However,
>> when I add or remove group members, the only notifications I've been
>> able to get are for the immediate group that was modified, not other
>> groups which include the modified group.
>> Is there a way to do this? If so, could you describe it at a high
>> level? I don't necessarily have to use hooks, if Grouper provides an
>> alternative mechanism. The requirement is that I can run my own code
>> when the effective membership of any group changes. The use case is for
>> real-time provisioning.
>> Peter


Archive powered by MHonArc 2.6.16.

Top of Page