<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Roboto;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.StylE-mailovZprvy17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="CS" link="#0563C1" vlink="#954F72"><div class="WordSection1"><p class="MsoNormal">Hello guys,</p><p class="MsoNormal">it seems that there is a bug in support 3.7 branch (<span style="font-size:10.0pt;font-family:Roboto;color:#263238">git-v3.7.2-125-g6ad06a767f</span>) – connected with <target><set><condition> construction.</p><p class="MsoNormal"> </p><p class="MsoNormal">We have midpoint with 2 nodes. Node A (<span style="font-size:10.0pt;font-family:Roboto;color:#263238">git-v3.7.2-104-gc91e30d</span>) and Node B (<span style="font-size:10.0pt;font-family:Roboto;color:#263238">git-v3.7.2-125-g6ad06a767f</span>).</p><p class="MsoNormal">On Node B it tries to remove assignments on user when I try to recompute it. I tried to log it and workflow is the same, just there is a different behaviour.</p><p class="MsoNormal">And it seems that it is just related to target sets on resource (not in templates).</p><p class="MsoNormal"> </p><p class="MsoNormal">Our scenario is following:</p><p class="MsoNormal">We have user from Resource R. In the resource there are 2 mappings (using target set) which assign him 2 different roles (workplace and building). When I try to recompute user, it tries to remove assignments.</p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal"><span style="font-family:"Courier New""><attribute></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">  <c:ref>ri:ORG_SystemisedSite_TreeNum</c:ref></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">  <inbound></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">     <expression></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">        <assignmentTargetSearch xsi:type="c:SearchObjectRefExpressionEvaluatorType"></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">           <targetType>c:OrgType</targetType></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">           <filter></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">              <q:and></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                 <q:equal></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                    <q:path>identifier</q:path></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                    <expression></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                       <script xsi:type="c:ScriptExpressionEvaluatorType"></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                          <code></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                             return basic.getAttributeValue(account, '<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>', 'ORG_SystemisedSite_TreeNum');</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                          </code></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                       </script></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                    </expression></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                 </q:equal></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                 <q:equal></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                    <q:path>orgType</q:path></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                    <expression></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                       <value>WORKPLACE</value></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                    </expression></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                 </q:equal></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">              </q:and></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">           </filter></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">        </assignmentTargetSearch></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">     </expression></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">    <target></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">      <c:path>$focus/assignment</c:path></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">      <set></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">        <condition></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">          <script></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">            <code></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType;</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                import com.evolveum.midpoint.util.exception.ObjectNotFoundException;</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                import javax.xml.namespace.QName;  </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                import com.evolveum.midpoint.schema.util.ObjectTypeUtil;</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                import com.evolveum.midpoint.schema.constants.SchemaConstants  </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                final String NS_C = "<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>";       </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                if (assignment.targetRef != null) {  </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                   ObjectReferenceType ort = assignment.getTargetRef();</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                   if(ort.getType() == new QName(NS_C, "OrgType")) {</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                      try {   </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                         OrgType current = (OrgType) midpoint.getObject(OrgType.class, ort.getOid());                                                        </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                         if (current.getOrgType().contains("WORKPLACE")) {</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                            return true; // zde definujeme ze tento vztah ridi organizacni jednotky typu workplace</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                         }</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                      }catch(ObjectNotFoundException nf){ </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                         return false; </span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                      }</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                   }</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                }</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                return false;</span></p><p class="MsoNormal"><span style="font-family:"Courier New"">            </code></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">          </script></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">        </condition></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">      </set></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">    </target></span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Jan Vaňáček</span></b><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"><br>JAVA programátor<br><br>gsm: [+420] 734 510 214<br>e-mail: <a href="mailto:jan.vanacek@ami.cz" target="_blank"><span style="color:blue">jan.vanacek@ami.cz</span></a></span></p><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="500" style="width:375.0pt;border-collapse:collapse"><tr><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:8.5pt;font-family:"Arial",sans-serif;border:none windowtext 1.0pt;padding:0cm">AMI Praha a.s.</span></b><span style="font-size:8.5pt;font-family:"Arial",sans-serif"><br>Pláničkova 11, 162 00 Praha 6</span></p></td></tr><tr style="height:9.5pt"><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm;height:9.5pt"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif"> </span></p></td></tr><tr><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif">tel.: [+420] 274 783 239 | web: <a href="http://www.ami.cz/"><span style="color:#0066cc;border:none windowtext 1.0pt;padding:0cm">www.ami.cz</span></a></span></p></td></tr><tr style="height:9.5pt"><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm;height:9.5pt"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif"> </span></p></td></tr><tr><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif"><img border="0" width="104" height="40" style="width:1.0833in;height:.4166in" id="Obrázek_x0020_5" src="cid:image001.gif@01D4F07B.B9429860" alt="AMI Praha a.s."></span></p></td></tr><tr style="height:9.5pt"><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm;height:9.5pt"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif"> </span></p></td></tr></table><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#aaaaaa">Textem tohoto e‑mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s.</span><span style="mso-fareast-language:CS"><br></span><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#aaaaaa">jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.</span><span style="mso-fareast-language:CS"><br></span><span style="font-size:4.0pt;font-family:"Arial",sans-serif"> </span><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#aaaaaa"><br>Tento e‑mail je určen výhradně pro potřeby jeho adresáta/ů a může obsahovat důvěrné nebo osobní<br>informace. Nejste‑li zamýšleným příjemcem, je zakázáno jakékoliv zveřejňování, zprostředkování<br>nebo jiné použití těchto informací. Pokud jste obdrželi e‑mail neoprávněně, informujte o tom prosím<br>odesílatele a vymažte neprodleně všechny kopie tohoto e‑mailu včetně všech jeho příloh. Nakládáním<br>s neoprávněně získanými informacemi se vystavujete riziku právního postihu.</span><span style="mso-fareast-language:CS"></span></p><p class="MsoNormal"> </p></div></body></html>