<div dir="ltr">Hi all,<div><br></div><div>I have an Object Template for users, and since I need email to be unique, I defined an iteration on it:</div><div><br></div><div><div><i><font color="#999999"><objectTemplate oid="c0c010c0-d34d-b33f-f00d-777222222333"></font></i></div><div><i><font color="#999999">  <name>User Template CSV sync</name></font></i></div><div><i><font color="#999999">  <iteration></font></i></div><div><i><font color="#999999">    <maxIterations>10</maxIterations></font></i></div><div><i><font color="#999999">    <tokenExpression></font></i></div><div><i><font color="#999999">      <script></font></i></div><div><i><font color="#999999">        <code></font></i></div><div><i><font color="#999999">          if (iteration == 0) {</font></i></div><div><i><font color="#999999">            return "";</font></i></div><div><i><font color="#999999">          } else {</font></i></div><div><i><font color="#999999">            return ""+iteration;</font></i></div><div><i><font color="#999999">          }</font></i></div><div><i><font color="#999999">        </code></font></i></div><div><i><font color="#999999">      </script></font></i></div><div><i><font color="#999999">    </tokenExpression></font></i></div><div><i><font color="#999999">  </iteration></font></i></div></div><div><i><font color="#999999">...</font></i></div><div><i><font color="#999999">...</font></i></div><div><i><font color="#999999"><br></font></i></div><div><font color="#000000">And then within the emailAddress mapping:</font></div><div><font color="#000000"><br></font></div><div><font><div style="color:rgb(153,153,153);font-style:italic"><mapping></div><div style="color:rgb(153,153,153);font-style:italic">    <strength>weak</strength></div><div style="color:rgb(153,153,153);font-style:italic">    <source></div><div style="color:rgb(153,153,153);font-style:italic">      <path>givenName</path></div><div style="color:rgb(153,153,153);font-style:italic">    </source></div><div style="color:rgb(153,153,153);font-style:italic">    <source></div><div style="color:rgb(153,153,153);font-style:italic">      <path>familyName</path></div><div style="color:rgb(153,153,153);font-style:italic">    </source></div><div style="color:rgb(153,153,153);font-style:italic">    <expression></div><div style="color:rgb(153,153,153);font-style:italic">      <script></div><div style="color:rgb(153,153,153);font-style:italic">        <language><a href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy">http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</a></language></div><div style="color:rgb(153,153,153);font-style:italic">        <code></div><div style="color:rgb(153,153,153);font-style:italic">          def givenNameStr = ''+givenName</div><div style="color:rgb(153,153,153);font-style:italic">          givenNameStr.substring(0,1) + '' + familyName + iterationToken + '@<a href="http://domain.com">domain.com</a>'</div><div style="color:rgb(153,153,153);font-style:italic">        </code></div><div style="color:rgb(153,153,153);font-style:italic">      </script></div><div style="color:rgb(153,153,153);font-style:italic">    </expression></div><div style="color:rgb(153,153,153);font-style:italic">    <target></div><div style="color:rgb(153,153,153);font-style:italic">      <path>$user/emailAddress</path></div><div style="color:rgb(153,153,153);font-style:italic">    </target></div><div style="color:rgb(153,153,153);font-style:italic">  </mapping></div><div style="color:rgb(153,153,153);font-style:italic"><br></div><div><font color="#000000">The problem is that whenever I create a user, the email is always being set as if the iterationToken is '' and this result on duplicate emailAddress attribute among users.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Is there something I'm doing wrong?</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Thanks in Advance</font></div></font></div><div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><span></span><span></span>Ing. Martín Marchese</b><br><img src="http://www.identicum.com/img/favicon.ico">Identicum S.A.<br>Anchorena 1357 PB<br>Tel: +54 (11) 3526.5509<br><a href="mailto:mmarchese@identicum.com" target="_blank">mmarchese@identicum.com</a><br><a href="http://www.identicum.com" target="_blank">www.identicum.com</a></div></div></div></div></div>
</div></div>