[midPoint] outbound mapping in archetype vs mapping in resource schemaHandling

Yakov Revyakin yrevyakin at gmail.com
Mon May 2 17:11:26 CEST 2022


I reach code working. But I am not sure that I understand the concept.
So, can someone approve that this is correct behavior for:
If we redefine, for example, ri:manager in role or archetype construction
then sequence of calculation is the following:
1) MP calculates AD manager using role or archetype construction for
attribute ri:manager
2) MP calculates AD manager using schemaHandling for attribute ri:manager
and uses this knowledge somehow by its algorithm
So, that means we must write schemaHandling code with a thought about
future roles or archetype implementation.








On Mon, 2 May 2022 at 14:46, Yakov Revyakin <yrevyakin at gmail.com> wrote:

> It looks like the archetype mapping for ri:manager is fully processed yet.
> But after that MP runs ri.manager mapping from default mapping in
> schemaHandling. Could you interpret what happens?
>
> INFO (com.evolveum.midpoint.expression): CN=Ali
> Si,OU=Contractors,OU=dev2,OU=midpoint,DC=examlabpractice,DC=corp
> INFO (com.evolveum.midpoint.model.common.mapping.AbstractMappingImpl):
> Mapping trace:
> ---[ MAPPING  in outbound mapping for attribute
> {.../resource/instance-3}manager in
> archetype:685106e4-1dfe-11eb-8429-534869969212(Contractor
> Archetype)]---------------------------
> Strength: STRONG
> Source contractorManagerNumber:
>   old: PP({
> http://example.com/xml/ns/midpoint/schema}contractorManagerNumber):[PPV(String:100064
> )]
>   delta: null
>   new: PP({
> http://example.com/xml/ns/midpoint/schema}contractorManagerNumber):[PPV(String:100064
> )]
> Target: rRAD:{.../resource/instance-3}manager {xsd:}string[0,1],RAM
> native=manager framework=manager,Disp,OUT,IN:MODEL
> Expression: script: ScriptExpression( import
> com.evolveum.midpoint.xml.ns._publ...)
> Condition: true -> true
> Result: unchanged: CN=Ma Gog
> dev2,OU=MARKETING,OU=dev2,OU=midpoint,DC=examlabpractice,DC=corp
> ------------------------------------------------------
> ###the following 2 lines indicate that ri:manager in shemaHandling was
> involved
> INFO (com.evolveum.midpoint.expression): ad
> ERROR
> (com.evolveum.midpoint.model.common.expression.script.ScriptExpression):
> Expression error: Index 0 out of bounds for length 0 in (old) expression in
> mapping in outbound mapping for attribute {.../resource/instance-3}manager
> in resource:746ecf5e-3e8c-11e6-b2f9-3c970e44b9e2(AD)
>
>
>
> On Mon, 2 May 2022 at 11:33, Yakov Revyakin <yrevyakin at gmail.com> wrote:
>
>> Hi friends,
>>
>> I have default mapping in AD schemaHandling for ri:dn and ri:manager with
>> normal strength.
>> I also have alternative mapping in an archetype for the same attributes
>> with strong strength defined as inducement with order=2 for UserType. The
>> archetype is assigned to an org. All users under the org get AD accounts
>> with right dn via the archetype mapping for dn.
>>
>> So, the mapping for dn works properly via any path - default or archetype
>> dependent on business logic.
>> If I comment default mapping for ri:manager in schemaHandling my mapping
>> in archetype works fine.
>> If I uncomment default mapping for ri:manager in schemaHandling I have
>> the following picture:
>> 1) MP calculates new ri:manager using archetype mapping
>> 2) calculates old value using schemaHandling mapping getting an error.
>> Calculation even doesn't enter the archetype mapping.
>>
>> I am waiting for the calculation to be done by the archetype mapping
>> completely.
>>
>> How to solve this collision?
>> Thanks,
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220502/f975775b/attachment.htm>


More information about the midPoint mailing list