<div dir="ltr">Oh wait, let me check me email address script, that is referring to that one</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 11:02 AM, Jason Everling <span dir="ltr"><<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok thanks, so I updated it and removed tmpAdditionalName and just used additionalName I get this now, fields look to be null. It is using the script with condition without but in CSV the user has a additionalName<div><br></div><div>Internal Error: Synchronization error: 
com.evolveum.midpoint.util.exception.ExpressionEvaluationException: 
groovy.lang.MissingPropertyException: No such property: name for class: 
Script31 expression in mapping 'Generate Email Address without 
additionalName' in 
objectTemplate:10000000-0000-0000-0000-000000000203(User Template 
3)(tmpFamilyName=null; additionalName=null; tmpGivenName=null; ) in 
expression in mapping 'Generate Email Address without additionalName' in
 objectTemplate:10000000-0000-0000-0000-000000000203(User Template 3)<br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jul 28, 2015 at 10:33 AM, Ivan Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@evolveum.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    Hi Jason,<br>
    <br>
    a wild shot for now..<br>
    <br>
    Try to use tmpAdditionalName in the condition as well.<br>
    <br>
    Or, do not use tmpAdditionalName at all (use additionalName
    everywhere in your expressions):<br>
    <br>
          <source><br>
               <!-- <name>tmpAdditionalName</name> --><br>
                <path>additionalName</path><br>
            </source><br>
    <br>
    Regards,<br>
    Ivan<div><div><br>
    <br>
    <div>On 07/28/2015 05:24 PM, Jason Everling
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">I have modified my username generation based on
        condition additionalName (middle initial) in our case so that it
        uses the middle initial if present,
        <div><br>
        </div>
        <div>I have 2 one with condition and one without or null</div>
        <div><br>
        </div>
        <div>Can you take a look at the below template mappings for me.</div>
        <div><br>
        </div>
        <div>It does not seems to work, I get </div>
        <div><br>
        </div>
        <div>groovy.lang.MissingPropertyException: No such property:
          additionalName for class: Script24 condition in mapping
          'Generate Username without additionalName'</div>
        <div><br>
        </div>
        <div>
          <div>    <mapping></div>
          <div>        <name>Generate Username without
            additionalName</name></div>
          <div>        <source></div>
          <div>            <name>tmpGivenName</name></div>
          <div>            <path>givenName</path></div>
          <div>        </source></div>
          <div>        <source></div>
          <div>            <name>tmpAdditionalName</name></div>
          <div>            <path>additionalName</path></div>
          <div>        </source></div>
          <div>        <source></div>
          <div>            <name>tmpFamilyName</name></div>
          <div>            <path>familyName</path></div>
          <div>        </source></div>
          <div>        <expression></div>
          <div>            <script></div>
          <div>                <code></div>
          <div><span style="white-space:pre-wrap"> </span>tmpGivenNameInitial
            = basic.stringify(tmpGivenName)?.size() &gt; 0 ? </div>
          <div><span style="white-space:pre-wrap"> </span>(basic.stringify(tmpGivenName)).substring(0,2)
            : ''</div>
          <div><br>
          </div>
          <div><span style="white-space:pre-wrap"> </span>if
            (iteration == 0) {</div>
          <div><span style="white-space:pre-wrap"> </span>if
            (basic.stringify(tmpFamilyName).size() &lt; 12) {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpFamilyName))</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>else
            {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial)
            + basic.stringify(tmpFamilyName)?.substring(0, 12))</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>else
            {</div>
          <div><span style="white-space:pre-wrap"> </span>if
            (basic.stringify(tmpFamilyName).size() &lt; 11) {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpFamilyName)) + iterationToken</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>else
            {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpFamilyName?.substring(0, 11))) + iterationToken</div>
          <div><br>
          </div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div>                </code><span style="white-space:pre-wrap"> </span></div>
          <div>            </script></div>
          <div>        </expression></div>
          <div>        <target></div>
          <div>            <path>name</path></div>
          <div>        </target></div>
          <div>        <condition></div>
          <div>            <script></div>
          <div>                <code>additionalName ==
            null</code></div>
          <div>            </script></div>
          <div>        </condition></div>
          <div>    </mapping></div>
          <div><br>
          </div>
          <div>    <mapping></div>
          <div>        <name>Generate Username with
            additionalName</name></div>
          <div>        <source></div>
          <div>            <name>tmpGivenName</name></div>
          <div>            <path>givenName</path></div>
          <div>        </source></div>
          <div>        <source></div>
          <div>            <name>tmpAdditionalName</name></div>
          <div>            <path>additionalName</path></div>
          <div>        </source></div>
          <div>        <source></div>
          <div>            <name>tmpFamilyName</name></div>
          <div>            <path>familyName</path></div>
          <div>        </source></div>
          <div>        <expression></div>
          <div>            <script></div>
          <div>                <code></div>
          <div><span style="white-space:pre-wrap"> </span>tmpGivenNameInitial
            = basic.stringify(tmpGivenName)?.size() &gt; 0 ? </div>
          <div><span style="white-space:pre-wrap"> </span>(basic.stringify(tmpGivenName)).substring(0,1)
            : ''</div>
          <div><br>
          </div>
          <div><span style="white-space:pre-wrap"> </span>if
            (iteration == 0) {</div>
          <div><span style="white-space:pre-wrap"> </span>if
            (basic.stringify(tmpFamilyName).size() &lt; 12) {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpAdditionalName + tmpFamilyName))</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>else
            {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpAdditionalName) +
            basic.stringify(tmpFamilyName)?.substring(0, 12))</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>else
            {</div>
          <div><span style="white-space:pre-wrap"> </span>if
            (basic.stringify(tmpFamilyName).size() &lt; 11) {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpAdditionalName + tmpFamilyName)) + iterationToken</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>else
            {</div>
          <div><span style="white-space:pre-wrap"> </span>basic.norm(basic.stringify(tmpGivenNameInitial
            + tmpAdditionalName + tmpFamilyName?.substring(0, 11))) +
            iterationToken</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div>                </code><span style="white-space:pre-wrap"> </span></div>
          <div>            </script></div>
          <div>        </expression></div>
          <div>        <target></div>
          <div>            <path>name</path></div>
          <div>        </target></div>
          <div>        <condition></div>
          <div>            <script></div>
          <div>                <code>additionalName !=
            null</code></div>
          <div>            </script></div>
          <div>        </condition></div>
          <div>    </mapping></div>
        </div>
        <div>
          <div><br>
          </div>
          -- <br>
          <div>
            <div dir="ltr">JASON</div>
          </div>
        </div>
      </div>
      <br>
      </div></div><font size="2"><br>
        <br>
        CONFIDENTIALITY NOTICE:<br>
        This e-mail together with any attachments is proprietary and
        confidential; intended for only the recipient(s) named above and
        may contain information that is privileged. You should not
        retain, copy or use this e-mail or any attachments for any
        purpose, or disclose all or any part of the contents to any
        person. Any views or opinions expressed in this e-mail are those
        of the author and do not represent those of the Baptist School
        of Health Professions. If you have received this e-mail in
        error, or are not the named recipient(s), you are hereby
        notified that any review, dissemination, distribution or copying
        of this communication is prohibited by the sender and to do so
        might constitute a violation of the Electronic Communications
        Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
        notify the sender and delete this e-mail and any attachments
        from your computer. </font><br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><span><font color="#888888">
</font></span></pre><span><font color="#888888">
    </font></span></blockquote></div></div><span><font color="#888888">
    <br>
    <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer & IDM Architect
  <a href="http://evolveum.com" target="_blank">evolveum.com</a>                     <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
  ___________________________________________________
  "Semper Id(e)M Vix."
</pre>
  </font></span></div>

<br><span class="">_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">JASON</div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">JASON</div></div>
</div>

<br>
<font size="2"><br><br>CONFIDENTIALITY NOTICE:<br>This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of the Baptist School of Health Professions. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer. </font><br>