MID-102 training we use the following logic:
- archetype is assigned to users and organizations when importing from sources (inbound mappings)
- object template uses midpoint.hasArchetype for logic when doing other assignments including assignment with create on demand
- also role autoassignment uses midpoint.hasArchetype
When I use object template mapping with midpoint.hasArchetype(checking if the user or organization has the correct archetype set by inbound), this does not work until reconcile/recompute.
I tried the following:
1. stopping using midpoint.hasArchetype in global object template alltogether (works, but this is limited)
2. stopping using global organization object template in favor of using object template referenced from archetype, which is assigned to my organizations. This partially works: metarole assigned by that template creates LDAP projection (group) for organization, but order=2 mapping to make user's account member of the group does not work until reconcile/recompute
It seems that midPoint has no information about archetype "yet", during the evaluation of the condition.
Technically it means that I cannot use midpoint.hasArchetype() when doing condition for assignment of something.