<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello Prabhakar,</p>
    <p>yes, this is a subtle issue in the bulk actions, connected to
      searchObjectsIterative call with a handler that includes object
      deletion. On some databases (H2 and MySQL if I remember correctly)
      the iterative search is implemented by paging, which does not work
      reliably if the handler changes the identity of objects. (Which
      deletion obviously does ;)<br>
    </p>
    <p>For more information, please see "Processing fetched objects" in
      <a moz-do-not-send="true"
        href="https://wiki.evolveum.com/display/midPoint/Search">https://wiki.evolveum.com/display/midPoint/Search</a>.</p>
    <p>If you would like to avoid the need of repeated execution of the
      bulk action, use the approach #2 (Search with bulk processing). <br>
    </p>
    <p>It is also described here: <br>
    </p>
    <p><a moz-do-not-send="true"
href="https://wiki.evolveum.com/display/midPoint/Cleaning+up+the+mess+HOWTO">https://wiki.evolveum.com/display/midPoint/Cleaning+up+the+mess+HOWTO</a></p>
    <p>Best regards,<br>
    </p>
    <pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
    <div class="moz-cite-prefix">On 05.06.2017 2:35, Prabhakara Rao
      Doddapaneni wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1303961086.1963747.1496622914689@mail.yahoo.com">
      <div style="color:#000; background-color:#fff;
        font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande,
        sans-serif;font-size:13px">
        <div id="yui_3_16_0_1_1496622528124_2686">Hi</div>
        <div id="yui_3_16_0_1_1496622528124_2686">I accomplished this by
          running a bulk-action with following definition to delete
          users with projection of target resource.</div>
        <div id="yui_3_16_0_1_1496622528124_2686"><span style="color:
            rgb(69, 69, 69); font-family: "Helvetica Neue";
            font-size: 12px;"><br>
          </span></div>
        <div id="yui_3_16_0_1_1496622528124_2686"><span style="color:
            rgb(69, 69, 69); font-family: "Helvetica Neue";
            font-size: 12px;" id="yui_3_16_0_1_1496622528124_4451"><s:search
xmlns:s=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3">"http://midpoint.evolveum.com/xml/ns/public/model/scripting-3"</a></span></div>
        <div id="yui_3_16_0_1_1496622528124_4452">         
          xmlns:c=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a></div>
        <div id="yui_3_16_0_1_1496622528124_4453">         
          xmlns:q=<a class="moz-txt-link-rfc2396E" href="http://prism.evolveum.com/xml/ns/public/query-3">"http://prism.evolveum.com/xml/ns/public/query-3"</a>></div>
        <div id="yui_3_16_0_1_1496622528124_4454">   
          <s:type>UserType</s:type></div>
        <div id="yui_3_16_0_1_1496622528124_4455">   
          <s:searchFilter></div>
        <div id="yui_3_16_0_1_1496622528124_4456">        <q:ref></div>
        <div id="yui_3_16_0_1_1496622528124_4457"><span
            id="yui_3_16_0_1_1496622528124_4458"> </span>   
          <q:path>linkRef/@/resourceRef</q:path></div>
        <div id="yui_3_16_0_1_1496622528124_4459">           
          <q:value oid="XXXXXXX"/></div>
        <div id="yui_3_16_0_1_1496622528124_4460">        </q:ref></div>
        <div id="yui_3_16_0_1_1496622528124_4461">   
          </s:searchFilter></div>
        <div id="yui_3_16_0_1_1496622528124_4462">    <s:action></div>
        <div id="yui_3_16_0_1_1496622528124_4463">       
          <s:type>delete</s:type></div>
        <div id="yui_3_16_0_1_1496622528124_4464">    </s:action></div>
        <div dir="ltr" id="yui_3_16_0_1_1496622528124_4465"></s:search></div>
        <div id="yui_3_16_0_1_1496622528124_2686"><br>
        </div>
        <div id="yui_3_16_0_1_1496622528124_2686">This may not be ideal
          one because i had to execute the repeatedly to delete all the
          accounts.</div>
        <div id="yui_3_16_0_1_1496622528124_2686"><br>
        </div>
        <div id="yui_3_16_0_1_1496622528124_2686">Thanks,</div>
        <div id="yui_3_16_0_1_1496622528124_2686">Prabhakar.</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>
  </body>
</html>