grouper-dev - [grouper-dev] RE: [paccman] grouper rules update
Subject: Grouper Developers Forum
List archive
- From: Chris Hyzer <>
- To: Tom Zeller <>
- Cc: Grouper Dev <>
- Subject: [grouper-dev] RE: [paccman] grouper rules update
- Date: Fri, 17 Sep 2010 16:07:55 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
Seems like part rule, part loader...
-----Original Message-----
From:
[mailto:]
On Behalf Of Tom Zeller
Sent: Friday, September 17, 2010 3:08 PM
To: Chris Hyzer
Cc: Grouper Dev
Subject: Re: [paccman] grouper rules update
I would summarize our rule usage as "membership rules".
As part of our homebrew "RolesEngine" implementation, we determine
memberships by evaluating bsh scriptlets (for every subject in batch
or for a single subject in real-time). We concocted all of this before
we started using grouper :-)
For example, the "CurrentStudent" group :
<Role name="CurrentStudent" >
<Description>Registered for the current term.</Description>
<Dependencies>
<AttributeDependency
attribute="BANNER.registeredTerms" />
</Dependencies>
<Membership type="SCRIPTLET" >
<Scriptlet>
if(hasAttribute("BANNER.registeredTerms")) {
if(hasCurrentTerm("BANNER.registeredTerms")) {
return true;
}
}
return false;
</Scriptlet>
</Membership>
</Role>
(The hasAttribute() and hasCurrentTerm() methods are compiled bsh scriptlets.)
I don't think this fits in the existing use cases, and it's
subject-centric rather than group-centric.
The RolesEngine caches results of the membership calculations, since
some role memberships are dependent upon others. Calculated changes in
memberships are then made to the underlying grouper groups, and these
changes are queued for provisioning.
A "composite" role :
<Role name="All Students" >
<Description>All Students</Description>
<Dependencies>
<RoleDependency role="SponsoredStudent" />
<RoleDependency role="CurrentStudent" />
</Dependencies>
<Membership type="INCLUDE_ALL_DEPENDENCIES" />
</Role>
A "template" role :
<Template name="Undergrad %MAJOR% Majors" >
<Description>ECG</Description>
<Dependencies>
<RoleDependency role="All Undergraduate Students" />
<AttributeDependency
attribute="BANNER.SOVLFOS_MAJR_CODE"/>
</Dependencies>
<Membership type="SCRIPTLET" >
<Scriptlet>
if(!hasRole("All Undergraduate Students")) {
return false;
}
if(hasAttribute("BANNER.SOVLFOS_MAJR_CODE",
"%MAJOR%")) {
return true;
}
return false;
</Scriptlet>
</Membership>
<Roles MAJOR="ACCT" />
<Roles MAJOR="ANTH" />
...
</Template>
TomZ
On Thu, Sep 16, 2010 at 12:35 AM, Chris Hyzer
<>
wrote:
> What are the things you do with the rules. And are those things included
> in the grouper rules use cases perchance? :)
>
> Thanks,
> Chris
>
> -----Original Message-----
> From:
>
>
> [mailto:]
> On Behalf Of Tom Zeller
> Sent: Wednesday, September 15, 2010 11:10 PM
> To: Chris Hyzer
> Cc: Grouper Dev
> Subject: Re: [paccman] grouper rules update
>
> I'm not sure where it fits on the priority list, but Memphis does have
> an interest in Grouper's rules. We currently have a rules engine of
> sorts which processes bsh scriptlets expressed in a custom xml format.
> It would be a good test to reproduce our current setup (or at least
> part of) with the new rules implementation.
>
> TomZ
>
> On Sat, Sep 11, 2010 at 5:09 PM, Chris Hyzer
> <>
> wrote:
>> Hey,
>>
>>
>>
>> I finished implementing all the use cases for grouper rules in Grouper 2.0.
>> I documented each with an example of setting the attributes to make it
>> work
>> (e.g. in API or GSH or WS), then there is a shortcut method (API or GSH),
>> and a GSH test case so you can see how it is supposed to work. The use
>> cases are here:
>>
>>
>>
>> https://spaces.internet2.edu/display/GrouperWG/Grouper+rules+use+cases
>>
>>
>>
>> The main Grouper rules wiki is here:
>>
>>
>>
>> https://spaces.internet2.edu/display/GrouperWG/Grouper+rules+use+cases
>>
>>
>>
>> I want to implement each rule type in the use cases to work in daemon mode
>> (or at least doesn't throw an error), do examples of configuring rules via
>> WS and grouperClient, document some more things, and I will consider it
>> done.
>>
>>
>>
>> Let me know any thoughts.
>>
>>
>>
>> Thanks,
>>
>> Chris
>
- RE: [grouper-dev] gsh scripting operations - questions about API, (continued)
- RE: [grouper-dev] gsh scripting operations - questions about API, Chris Hyzer, 09/14/2010
- Re: [grouper-dev] gsh scripting operations - questions about API, Julien Gribonvald, 09/15/2010
- RE: [grouper-dev] gsh scripting operations - questions about API, Chris Hyzer, 09/15/2010
- Re: [grouper-dev] gsh scripting operations - questions about API, Julien Gribonvald, 09/17/2010
- RE: [grouper-dev] gsh scripting operations - questions about API, Chris Hyzer, 09/22/2010
- Re: [grouper-dev] gsh scripting operations - questions about API, Julien Gribonvald, 09/22/2010
- Re: [grouper-dev] gsh scripting operations - questions about API, Julien Gribonvald, 09/22/2010
- [grouper-dev] RE: [paccman] grouper rules update, Chris Hyzer, 09/16/2010
- [grouper-dev] Re: [paccman] grouper rules update, Tom Zeller, 09/17/2010
- [grouper-dev] RE: [paccman] grouper rules update, Chris Hyzer, 09/17/2010
- [grouper-dev] Re: [paccman] grouper rules update, Tom Zeller, 09/17/2010
Archive powered by MHonArc 2.6.16.