<div dir="ltr">Hello All,<div><br></div><div>This approach helped us understanding a similar issue we were having in our project. Thanks Ivan for your support.</div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b>Rodrigo Yanis.</b><br><img src="http://www.identicum.com/img/favicon.ico">Identicum S.A.<br></font>Jorge Newbery 3226<br>Tel: +54 (11) 4824-9971<font face="arial, helvetica, sans-serif"><br><a href="mailto:ryanis@identicum.com" target="_blank"><font color="#0b5394">ryanis@identicum.com</font></a><br><a href="http://www.identicum.com/" target="_blank"><font color="#0b5394">www.identicum.com</font></a></font></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2016-10-03 10:00 GMT-03:00 Ivan Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hi Mariano,</p>
    <p>I would probably start with something like this:</p>
    <p>                        <correlation><br>
                                    <wbr>  <q:and><span class=""><br>
                                    <wbr>          <q:equal><br>
                                    <wbr>                 
      <q:path>c:name</q:path><br>
                                    <wbr>                  <expression><br></span>
                                    <wbr>                 
      <path>$account/attributes/<wbr>icfs:name</path><br>
                                    <wbr>                 
      </expression><br>
                                    <wbr>          </q:equal><br>
                                    <wbr>          <q:equal><br>
                                    <wbr>                 
      <q:path>c:employeeType</q:<wbr>path><br>
                                    <wbr>                  <q:value><b>EMPLOYEE</b></q:value><br>
                                    <wbr>          </q:equal><br>
                                    <wbr>  </q:and><br>
                              </correlation><br>
    </p>
    <p>Similar logic used here: samples/resources/openldap$ less
      openldap-localhost-advanced-<wbr>sync-modifytimestamp.xml     <br>
    </p>
    Ivan<div><div class="h5"><br>
    <br>
    <div class="m_8646012635050268671moz-cite-prefix">On 09/29/2016 09:03 PM, mariano marron
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi everyone! The issue I have is the following.<br>
                  <br>
                </div>
                I have accounts in a resource that I want to link to
                existing users in MidPoint based on a condition: if the
                user in MidPoint has a certain "employeeType" value, I
                want the account in the resource to get linked to that
                user. Otherwise, the user shouldn't be linked.<br>
              </div>
              I understand that I can add the following code to the
              synchronization of the resource:<br>
              <br>
              <i>   <synchronization><br>
                      <objectSynchronization><br>
                         <enabled>true</enabled><br>
                         <correlation><br>
                            <condition><br>
                              <script><br>
                                  <code><br>
                                    <b>basic.getAttributeValue(<wbr>account,
                  'name') == "xxxxxxx"</b><br>
                                  </code><br>
                                </script><br>
                            </condition><br>
                <br>
                            <q:equal><br>
                               <q:path>c:name</q:path><br>
                               <expression><br>
                                  <c:path>declare namespace icfs='<a href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>connector/icf-1/resource-<wbr>schema-3</a>';
                $account/attributes/icfs:name<<wbr>/c:path><br>
                               </expression><br>
                            </q:equal><br>
                         </correlation></i><br>
              <br>
            </div>
            But that "name" attribute, refeers to the name of the
            account in the resource, not the one in MidPoint. Is there
            anyway I can refeer to the MidPoint account and get the
            "employeeType" values to compare them to a certain value,
            instead of using the resource account attributes for the
            condition?<br>
            <br>
          </div>
          Thanks a lot!<br>
          <br>
        </div>
        <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Mariano<br>
        </blockquote>
      </div>
      <br>
      <fieldset class="m_8646012635050268671mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_8646012635050268671moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_8646012635050268671moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre class="m_8646012635050268671moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>