<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello Markus,</p>
<p>midPoint has a standard solution to this - just look for "mapping
range" in the docs.</p>
<p>[Yes, midPoint is complex, but that's because the real life is
complex. Of course, we try hard to remove all the unnecessary
complexity from it. But something will necessarily remain.
Fortunately, this particular problem you stumbled upon has a
really nice and elegant solution in midPoint.]<br>
</p>
<pre class="moz-signature" cols="72">--
Pavol Mederly
Software developer
evolveum.com</pre>
<div class="moz-cite-prefix">On 16/10/2023 16:58, Markus Calmius via
midPoint wrote:<br>
</div>
<blockquote type="cite"
cite="mid:EBSd1bjN6obYY-XBLiRziPYde3XCKo494onuJRJyXK5pTziP9SAloetJx75xktiaFNuebGzld8rnH6nKyHVMHJg4qPkwVk0JUv0xBEgWw1M=@proton.ch">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div style="font-family: Arial, sans-serif; font-size: 14px;">Hi,</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">the
complexity of this product is sometimes mind-boggling. You think
you understand something, and then: stacktrace ;)</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">So,
I read this "In this demo, we use archetypes <code>Full time
employee</code>, <code>Part time employee</code>, <code>Contractor</code>,
and <code>Retired</code>.
Archetype is assigned to a user during import from resource
based on his employment type"</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">from:Â <span><a
target="_blank" rel="noreferrer nofollow noopener"
href="https://docs.evolveum.com/midpoint/demo/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://docs.evolveum.com/midpoint/demo/</a></span></div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">and
I'm doing something similar. Basically we have a column in the
csv file that has one of three values:</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">pre-employee</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">current-employee</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">post-employee</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">I
created ArcheTypes for these different kind of users, then
automatically assigned them on import. All good.</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">However,
if I change the value and re-import (or use live synch) I get:</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">"<span>ERROR
(com.evolveum.midpoint.model.impl.sync.reactions.SynchronizationActionExecutor):
SYNCHRONIZATION: Error in synchronization on
resource:<redacted_resource> for situation LINKED:
SchemaException: Found [archetype:<oid>(pre_employee),
archetype:<oid>(current_employee)] structural
archetypes; only a single one is supported</span>"</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">I
removed oids to make it easier to read.</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;">Do I
need to check (another hook?) if a user changes archetype and
remove the previous one first? It seems a bit...well
unnecessary. If the attribute input is set to strong it should
be replaced, right?</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
</div>
<div class="protonmail_signature_block" style="font-family: Arial,
sans-serif; font-size: 14px;">
<div class="protonmail_signature_block-user"> Markus</div>
<div class="protonmail_signature_block-user"><br>
</div>
<div class="protonmail_signature_block-proton
protonmail_signature_block-empty"> </div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</body>
</html>