<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      The assignments to non-existing objects are not removed
      automatically (not even in recopute) by purpose. Assignment is a
      policy statement. We do not want to change it in any way that is
      not compliant with the business processes. Even if it points to a
      non-existing role. Because we do not know if the assignment is OK,
      just the role was accidentally deleted or the role was deleted by
      purpose and the assignment accidentally remained. As there is not
      simple way how to resolve this we have chosen not to do anything
      automatically.<br>
      <br>
      Now, it would be easy to re-create a missing role. But I guess you
      are pointing out that it is not that easy to remove these
      assignments. And you are partially right. There is no efficient
      mechanism how to remove all the assignment to all the missing
      targets. But there is a way how to do it one by one for each
      missing target. You can use bulk actions for that. See
      samples/tasks/bulk-actions/modify-selected-users-unassign-role.xml<br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Radovan Semancik
Software Architect
evolveum.com
</pre>
      <br>
      <br>
      On 12/10/2015 12:52 PM, Roman Pudil - AMI Praha a.s. wrote:<br>
    </div>
    <blockquote
      cite="mid:em5c749e95-7462-4b07-83c3-911f7ba22ec2@rpudil-dell7440"
      type="cite">
      <style id="eMClientCss">
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
.plain pre, .plain tt { font-family: monospace; font-size: 100%; font-weight: normal; font-style: normal; white-space: pre-wrap; }
a img { border: 0px; }body {font-family: Tahoma;font-size: 12pt;}
.plain pre, .plain tt {font-family: Tahoma;font-size: 12pt;}</style>
      <div>Hi,</div>
      <div>how to bulk remove assignments of non-existent objects?
        Recomputing has no effect.</div>
      <div> </div>
      <div>Example - source code of User object:</div>
      <div> </div>
      <div>   <assignment id="3"><br>
              <targetRef oid="b1b778bf-b731-4715-b8fb-c109a5705485"
        type="c:RoleType"><!-- (object not found)
        --></targetRef><br>
           </assignment><br>
           <assignment id="4"><br>
              <targetRef oid="5017359e-8fd5-40d5-bc23-76c0ad274a49"
        type="c:RoleType"><!-- (object not found)
        --></targetRef><br>
           </assignment><br>
           <assignment id="5"><br>
              <targetRef oid="701722db-dfd1-4291-9ce5-7f0f9234af20"
        type="c:RoleType"><!-- (object not found)
        --></targetRef><br>
           </assignment><br>
      </div>
      <div> </div>
      <div>Thanks!</div>
      <div>Roman</div>
      <div> </div>
      <div id="signature_old">
        <div style="FONT-SIZE: 12pt; FONT-FAMILY: Tahoma">
          <table style="WHITE-SPACE: normal; WORD-SPACING: 0px;
            BORDER-COLLAPSE: collapse; TEXT-TRANSFORM: none; COLOR:
            rgb(0,0,0); FONT: medium 'Times New Roman'; WIDOWS: 1;
            LETTER-SPACING: normal; TEXT-INDENT: 0px;
            -webkit-text-stroke-width: 0px">
            <tbody>
              <tr>
                <td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
                  sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)"
                  colspan="2">
                  <p><span style="FONT-SIZE: 14px; FONT-WEIGHT: bold">Roman
                      Pudil</span><br>
                    solution architect<br>
                    <br>
                    gsm: [+420] 775 663 666<br>
                    e-mail:<span class="Apple-converted-space"> </span><a
                      moz-do-not-send="true"
                      href="mailto:roman.pudil@ami.cz"><a class="moz-txt-link-abbreviated" href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a></a></p>
                </td>
                <td style="BORDER-RIGHT: rgb(204,204,204) 1px solid">   </td>
                <td>   </td>
                <td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
                  sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)">
                  <p>AMI Praha a.s.<br>
                    Pláničkova 11<br>
                    162 00 Praha 6<br>
                    tel./fax: [+420] 274 783 239<br>
                    web:<span class="Apple-converted-space"> </span><a
                      moz-do-not-send="true" href="http://www.ami.cz"><a class="moz-txt-link-abbreviated" href="http://www.ami.cz">www.ami.cz</a></a></p>
                </td>
                <td style="BORDER-RIGHT: rgb(204,204,204) 1px solid">   </td>
                <td>   </td>
                <td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
                  sans-serif; COLOR: rgb(0,0,0)">
                  <p><img moz-do-not-send="true" title="AMI Praha a.s."
                      alt=""
                      src="http://www.ami.cz/images/podpis/ami_logo.gif"
                      border="0"></p>
                </td>
              </tr>
              <tr>
                <td colspan="8"><br>
                  <a moz-do-not-send="true"
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
                      moz-do-not-send="true" alt=""
                      src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png"
                      border="0"></a></td>
              </tr>
              <tr>
                <td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
                  sans-serif; COLOR: rgb(128,128,128)" colspan="8"><br>
                  Textem tohoto e-mailu podepisující neslibuje uzavřít
                  ani neuzavírá za společnost AMI Praha a.s.<br>
                  jakoukoliv smlouvu. Každá smlouva, pokud bude
                  uzavřena, musí mít výhradně písemnou formu.</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div> </div>
      <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>
    <br>
  </body>
</html>