<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Aivo,</p>
    <p><br>
    </p>
    <p>according to this:</p>
    <p><br>
    </p>
    <p>(com.evolveum.midpoint.model.impl.sync.SynchronizationServiceImpl):
      SYNCHRONIZATION: Error in synchronization on
      <a moz-do-not-send="true" class="moz-txt-link-freetext"
        href="about:blank">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a>
      users) for situation UNMATCHED: ObjectAlreadyExistsException:
      Error processing focus(user:null(john.smith)): constraint
      violation: <b>Found conflicting existing object with property
        name =
        PP({.../common/common-3}name):[PPV(PolyString:john.smith)]:
        user:c74b5771-f8dc-4929-83a1-2afbf2a8f875(john.smith)</b>.</p>
    <br>
    I assume you are trying to create john.smith user in midPoint and
    the same name is already used. I assume the problem must be in
    correlation, and the situation should be UNLINKED and become LINKED
    afterwards.<br>
    <br>
    But I think there is another problem: in midPoint you can have more
    than one accounts on the same resource, but they cannot be with the
    same intent. And in your case, the number of "accounts" for the same
    person is variable... I don't remember to have this situation. Maybe
    someone else?<br>
    <br>
    Regards,<br>
    Ivan<br>
    <br>
    <div class="moz-cite-prefix">On 11/25/2016 07:33 AM, Aivo Kuhlberg
      wrote:<br>
    </div>
    <blockquote cite="mid:1480055579472.39905@rmit.ee" type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
      <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 <a class="moz-txt-link-rfc2396E" href="mailto:midpoint-bounces@lists.evolveum.com"><midpoint-bounces@lists.evolveum.com></a>
            nimelIvan Noris <a class="moz-txt-link-rfc2396E" href="mailto:ivan.noris@evolveum.com"><ivan.noris@evolveum.com></a><br>
            <b>Saadetud:</b> 24. november 2016 23:22<br>
            <b>Adressaat:</b> <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><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
                moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                href="mailto:john.smith@org.com">"john.smith@org.com"</a>,"Specialist"<br>
              "8000011","10101010001","John","Smith",<a
                moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true"
                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 moz-do-not-send="true"
                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 color="Gray" face="Arial" 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> <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <br>
            <pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" 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 color="Gray" face="Arial" 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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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="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>
  </body>
</html>