Subject: Grouper Users - Open Discussion List
Re: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data
- From: John Gasper <>
- To: "Hyzer, Chris" <>, "" <>
- Subject: Re: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data
- Date: Sun, 24 Jul 2016 21:26:40 -0700
We’ve got membership attributes that reference a group (as an attribute value). If that group name changes, then the attribute values referencing that group need to be updated as well. (Using the Group DB ID is a possible solution, but it isn’t a very friendly value. Using a preCommit value theoretically works unless a (future) subsequent hook vetos this action then the attribute value has been changed but the group did not. If the API provided before and after for post events that would be great.
We can look into a Thread local option. (I’ll chat with the client.) I guess we just need to make sure we clear it out if a subsequent veto is invoked.
OK, sorry, this compares state to whats in the DB, so it only applies to preCommit… Can you use pre commit? Or if you need post can store whatever state in a very short lived threadlocal or something? J What are you trying to do? Need help? Should we try to add something to the API to make it easier? J
We need to wrap that sentence in a blink tag. J
Unfortunately, I’m still getting the updated object, dbVersionDifferentFields() is empty. Would the post (after) hook still have remnants of the old since the db commit has occurred?
On this wiki:
Is this line:
To find out how the data has changed (in an update or delete), you can use the dbVersion API.
Which links here:
Does that work for you? J
I’m working on a groupPostUpdate hook and am struggling with the best way to access info about the group from before the update as postUpdateBean only has a reference to the updated Group. I know I can get the before and after in the ChangeLog or with a pre hook, but those aren’t ideal... and the PIT tables update after the fact.
Thoughts are welcome.
- Re: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data, John Gasper, 07/25/2016
- RE: [grouper-users] RE: Grouper GroupUpdateHook Old Group Data, Hyzer, Chris, 07/25/2016
Archive powered by MHonArc 2.6.19.