Skip to content

Commit

Permalink
Update do-not-use-different-archetypes-for-student-and-employees.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
khazelton authored Oct 16, 2024
1 parent 1b000dd commit 7ed64d4
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@

do-not-use-different-archetypes-for-student-and-employees.adoc
==== Do Not Use Different Archetypes for Student and Employees

Trevor Lucas
Hello, I am trying to understand the relationship between Archetypes and Object Templates. Specifically, I'm looking at the built-in Person Archetype and the Person Object Template in midPoint 4.8 and trying to understand how they are linked together so that I can extrapolate them to other Archetypes and Object Templates. I can't see any assignments or links between the two object types within the XML. I have looked at examples within the Workbench and the midPoint demos and have read the Archetype and Object Template docs several times trying to find this answer.

The end goal is to try to mimic the Workbench and have a Student Archetype for the SIS resource and an Employee Archetype for the HR Resource. Then I would like to extend those by adding Object Templates that could specifically affect the respective Archetype Users. Those Object Templates would have specific name and email constructions, auto-assigned roles, etc, just like the Person Object Template can have by default. Ultimately I'd like to know how a specific Template is applied to a specific Archetype.

Slavek Licehammer
Hi Trevor. You are looking for objectTemplateRef in the archetype configuration. For example: https://github.com/Evolveum/midpoint/blob/master/config/initial-objects/archetype/702-archetype-person.xml#L22

Having separate archetype for students and separate for employees might be problematic if a single user can be both employee and student at the same time. I'm still looking for a universal design pattern how to represent affiliations, but I'm not sure if there is any. Because different universities are handling it differently.

Trevor Lucas
Hi Slavek, that's exactly it. Thank you! I see that now in the Person Archetype and am wondering how I didn't see it before.
I was wondering the same thing about splitting into separate archetypes versus using the Person archetype. We can have Students who are also Student Employees, but I was thinking of handling that with Roles. So a Student Archetype User could have a role of Student Employee and get their account created, roles assigned, all that stuff. These would be different than Employee Archetype Users in ways like software licensing.

Either way we do it we'll have to have some kind of logic to determine which Person is staff, which is student, and grant them roles that way. Would you recommend for a new midPoint deployment to use the Person archetype and build out from there?

Trevor Lucas
After pondering some more today, I think it will be the best approach to use Person Archetype and not try to split it out by "user type". We would immediately run into collisions with people who are both Students and Employees, and you can't really make those Users owner of other Users. I think we'll rely on roles and getting those auto-assigned to get people their correct accounts and everything else.

Thank you, again!

Amol Athawale
Expand All @@ -27,15 +31,13 @@ Why did you go with a custom Archetype rather than use Person? There must have b

Amol Athawale
Hello Trevor, I apologize if this isn't the answer you were expecting, but part of the reason lies in my preference for avoiding defaults. Initially, we created a hierarchical structure of Archetypes but quickly realized it wasn't working for us, so we reverted to using the parent archetype (USDPerson). As I'm still fairly new to Midpoint, I wanted to thoroughly understand the relationships between various objects like Archetypes, Object Templates, Resources, etc. Creating custom components wherever possible is helping me do that.

FYI - We are still in development phase.

Trevor Lucas
Fair enough, we are in a similar boat. Very much in development and trying lots of different things. Thank you for the reply, I appreciate it.
Thank you, Amol! We would have similar scenarios. We also have staff who are faculty, students and student employees who make that transition to FTE (and sometimes back again), etc. Better to keep them all as "Person" or equivalent, especially if Archetype should never change on a user.
Footer
Internet2

Internet2 avatar Internet2
Thank you, Amol! We would have similar scenarios. We also have staff who are faculty, students and student employees who make that transition to FTE (and sometimes back again), etc. Better to keep them all as "Person" or equivalent, especially if Archetype should never change on a user.

© 2024 GitHub, Inc.
Footer navigation
Expand Down

0 comments on commit 7ed64d4

Please sign in to comment.