<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Ivan,<br>
</p>
<p>Unique attribute is "sapcode".</p>
<p><br>
</p>
<p>Regards,</p>
<p>Aivo<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>Saatja:</b> midPoint <midpoint-bounces@lists.evolveum.com> nimelIvan Noris <ivan.noris@evolveum.com><br>
<b>Saadetud:</b> 24. november 2016 23:22<br>
<b>Adressaat:</b> midpoint@lists.evolveum.com<br>
<b>Teema:</b> Re: [midPoint] Importing multiple accounts</font>
<div> </div>
</div>
<div>
<p>Hi Aivo,</p>
<p>what attribute is configured as unique identifier in your CSV resource....?</p>
<p>Ivan<br>
</p>
<br>
<div class="moz-cite-prefix">On 11/24/2016 10:18 PM, Aivo Kuhlberg wrote:<br>
</div>
<blockquote type="cite"><style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<p>Hello,<br>
</p>
<p>In our HR system the same person can appear multiple times, for example when he/she has 2 jobs.  My problem is how to import these users to midPoint? Even when the same user appears multiple times in HR system I want to see in midPoint only one user. So
 I believe I have to import both accounts under one midPoint user where these should appear as separate projections.</p>
<p>Below is the example CSV-file which I tested. Here I try to import the same user multiple times and in synchronization settings I am correlating users by personalcode attribute which is unique for every person:<br>
</p>
<p><br>
</p>
<p>"sapcode","personalcode","firstname","lastname","email","title"<br>
"8000001","10101010001","John","Smith",<a class="moz-txt-link-rfc2396E" href="mailto:john.smith@org.com">"john.smith@org.com"</a>,"Specialist"<br>
"8000011","10101010001","John","Smith",<a class="moz-txt-link-rfc2396E" href="mailto:john.smith@org1.com">"john.smith@org1.com"</a>,"Adviser"<br>
 <br>
</p>
<p>Unfortunately when I import that file then first line is imported successfully but second line fails:<br>
</p>
<p><br>
</p>
<p>2016-11-24 22:31:38,733 [] [midPointScheduler_Worker-5] INFO (com.evolveum.midpoint.model.impl.util.AbstractSearchIterativeResultHandler): Import object shadow:d8cb8f9d-4209-42c8-8d97-7f9392e86edd(8000001) from
<a class="moz-txt-link-freetext" href="">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a> users) done with status SUCCESS (this one: 352 ms, avg: 352 ms) (total progress: 1, wall clock avg: 434 ms)<br>
2016-11-24 22:31:38,897 [] [midPointScheduler_Worker-5] ERROR (com.evolveum.midpoint.model.impl.sync.SynchronizationServiceImpl): SYNCHRONIZATION: Error in synchronization on
<a class="moz-txt-link-freetext" href="">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a> users) for situation UNMATCHED: ObjectAlreadyExistsException: Error processing focus(user:null(john.smith)): constraint violation: Found conflicting existing object
 with property name = PP({.../common/common-3}name):[PPV(PolyString:john.smith)]: user:c74b5771-f8dc-4929-83a1-2afbf2a8f875(john.smith). Change was ResourceObjectShadowChangeDescription(objectDelta=ObjectDelta(ShadowType:48764d07-8db2-4555-ac5a-4d7c5a9f446b,ADD:
 shadow:48764d07-8db2-4555-ac5a-4d7c5a9f446b(8000011)), currentShadow=shadow:48764d07-8db2-4555-ac5a-4d7c5a9f446b(8000011), oldShadow=null, sourceChannel=<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#import">http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#import</a>,
 resource=<a class="moz-txt-link-freetext" href="">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a> users)<br>
</p>
<p><br>
</p>
<p>What I am doing wrong?</p>
<p>Thanks,</p>
<p>Aivo Kuhlberg<br>
</p>
<br>
<hr>
<font size="2" color="Gray" face="Arial">Käesolev e-kiri võib sisaldada asutusesiseseks kasutamiseks tunnistatud teavet.<br>
This e-mail may contain information which is classified for official use.</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
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="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="2">Käesolev e-kiri võib sisaldada asutusesiseseks kasutamiseks tunnistatud teavet.<br>
This e-mail may contain information which is classified for official use.</font>
</body>
</html>