<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Jason,<br>
      problem is in syntax - remove the "semicolon" behind
      midpoint.getPlaintextUserPassword(requestee).<br>
      <br>
      Regards<br>
      Roman Pudil<br>
      <div class="moz-signature">
        <title></title>
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <p> </p>
        <table style="border-collapse:collapse;">
          <tbody>
            <tr>
              <td colspan="2" style="font-family:Arial, sans-serif;
                font-size:11px; color:#000000; vertical-align:bottom;">
                <p> <span style="font-size:14px; font-weight:bold;">Roman
                    Pudil</span><br>
                  solution architect<br>
                  <br>
                  gsm: [+420] 775 663 666<br>
                  e-mail: <a href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a>
                </p>
              </td>
              <td style="border-right:1px solid #cccccc;">   </td>
              <td>   </td>
              <td style="font-family:Arial, sans-serif; font-size:11px;
                color:#000000; vertical-align:bottom;">
                <p> AMI Praha a.s.<br>
                  Pláničkova 11<br>
                  162 00 Praha 6<br>
                  tel./fax: [+420] 274 783 239<br>
                  web: <a href="http://www.ami.cz">www.ami.cz</a> </p>
              </td>
              <td style="border-right:1px solid #cccccc;">   </td>
              <td>   </td>
              <td style="font-family:Arial, sans-serif; font-size:11px;
                color:#000000;">
                <p> <img src="cid:part3.05080207.06040900@ami.cz"
                    alt="AMI Praha a.s." title="AMI Praha a.s."> </p>
              </td>
            </tr>
            <tr>
              <td colspan="8"><br>
                <a
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
                    src="cid:part4.06070000.06040203@ami.cz" alt=""></a></td>
            </tr>
            <tr>
              <td colspan="8" style="font-family:Arial, sans-serif;
                font-size:11px; color:#808080;"> <br>
                Textem tohoto e-mailu podepisující neslibuje uzavřít ani
                neuzavírá za společnost AMI Praha a.s.<br>
                jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena,
                musí mít výhradně písemnou formu.</td>
            </tr>
          </tbody>
        </table>
      </div>
      Dne 31.10.2014 v 14:40 Jason Everling napsal(a):<br>
    </div>
    <blockquote
cite="mid:CAFkZXY63gOpciuFZzhq63wRuQ3noQmLCp-BgVCxOqfb8wNHX0g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks for the information,
        <div><br>
        </div>
        <div>The one he had given me does not work, it errors out</div>
        <div><br>
        </div>
        <div>So this does NOT work</div>
        <div><br>
        </div>
        <div>
          <div>"Your Student ID is " + requestee?.getEmployeeNumber() +
            " \n\n" +</div>
          <div>"Your Username is " + requestee?.getName()?.getOrig() + "
            \n\n" +</div>
          <div>"Your Password is " +
            midpoint.getPlaintextUserPassword(requestee); + " \n\n" +</div>
        </div>
        <div><br>
        </div>
        <div>But if I remove the password like in the below, it works,
          so it is the password code,</div>
        <div><br>
        </div>
        <div>
          <div>"Your Student ID is " + requestee?.getEmployeeNumber() +
            " \n\n" +</div>
          <div>"Your Username is " + requestee?.getName()?.getOrig() + "
            \n\n" +</div>
        </div>
        <div><br>
        </div>
        <div>Is there anything else in the password string that is
          incorrect?</div>
        <div><br>
        </div>
        <div>JASON</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Oct 31, 2014 at 6:01 AM, Ivan
          Noris <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:Ivan.Noris@evolveum.com" target="_blank">Ivan.Noris@evolveum.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <div style="font-family:times new roman,new
                york,times,serif;font-size:12pt;color:#000000">
                <div>Hi Jason,<br>
                </div>
                <div><br>
                </div>
                <div>first please see the wiki page referenced by Roman
                  in previous e-mail (<a moz-do-not-send="true"
href="https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions"
                    target="_blank">https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions</a>).
                  This is handy also for other usages.<br>
                </div>
                <div><br>
                </div>
                <div>Back to notifications. I've just hacked my
                  notifications like this to show you how to access
                  user's properties:<br>
                </div>
                <div><br>
                </div>
                <div>      <handler><br>
                           <simpleUserNotifier><br>
                              <recipientExpression><br>
                                
                  <value>vix@localhost</value><br>
                              </recipientExpression><br>
                              <subjectExpression><br>
                                 <script><br>
                                    <code><br>
                  if (event.isSuccess())<br>
                      tmpText = "[IDM] SUCCESS: User " +
                  event.getChangeType() + " operation succeeded for "<br>
                  else if (event.isFailure())<br>
                      tmpText = "[IDM] ERROR: User " +
                  event.getChangeType() + " operation failed for "<br>
                  else  tmpText = "[IDM] IN PROGRESS: User " +
                  event.getChangeType() + " operation in progress for "<br>
                  <br>
                  tmpText + requestee?.getName()?.getOrig() + ', family=
                  ' + requestee?.getFamilyName()?.getOrig() + ',
                  employee number= ' + requestee?.getEmployeeNumber() +
                  ', property employeeNumber= ' +
                  basic.getPropertyValue(requestee, 'employeeNumber')<span
                    class=""><br>
                    </code><br>
                                   </script><br>
                                </subjectExpression><br>
                                <transport>mail</transport><br>
                  </span>         </simpleUserNotifier><br>
                        </handler></div>
                <div><br>
                </div>
                <div>Subject in e-mail became:<br>
                </div>
                <div><br>
                </div>
                <div>Subject: [IDM] SUCCESS: User ADD operation
                  succeeded for bbbbb,<br>
                      family= Rimmer, employee number= 12123434,<br>
                      property employeeNumber= 12123434<br>
                  <br>
                </div>
                <div>For standard polystring attributes, you may use
                  simple requestee?.getFamilyName()?.getOrig()<br>
                </div>
                <div>For standard string attributes, you may use simple
                  requestee?.getEmployeeNumber()<br>
                </div>
                <div><br>
                </div>
                <div>Please see our Common Schema to see which attribute
                  is Polystring.<br>
                </div>
                <div><br>
                </div>
                <div>Or you can use Basic library's
                  basic.getPropertyValue(requestee, 'employeeNumber').<br>
                </div>
                <div><br>
                </div>
                <div>To access the extended attributes, you need to use
                  Basic library (basic.getExtensionPropertyValue(...))<br>
                </div>
                <div><br>
                </div>
                <div>I have already added such examples to our <a
                    moz-do-not-send="true"
                    href="https://wiki.evolveum.com/display/midPoint/Notifications"
                    target="_blank">https://wiki.evolveum.com/display/midPoint/Notifications</a>
                  page earlier.<br>
                </div>
                <div><br>
                </div>
                <div>Regards,<br>
                </div>
                <div>Ivan<br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <hr>
                <blockquote style="border-left:2px solid
#1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From:
                  </b>"Jason Everling" <<a moz-do-not-send="true"
                    href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>><br>
                  <b>To: </b>"midPoint General Discussion" <<a
                    moz-do-not-send="true"
                    href="mailto:midpoint@lists.evolveum.com"
                    target="_blank">midpoint@lists.evolveum.com</a>><br>
                  <b>Sent: </b>Thursday, October 30, 2014 7:39:01 PM<br>
                  <b>Subject: </b>Re: [midPoint] Email Notification
                  <div>
                    <div class="h5"><br>
                      <div><br>
                      </div>
                      <div dir="ltr">I got this down, I had to figure
                        out where and what these were for \n\n but I was
                        able to add a ton of information that was
                        needed.
                        <div><br>
                        </div>
                        <div>I need to add in the password and Employee
                          Number which is actually the student ID,</div>
                        <div><br>
                        </div>
                        <div>Is this correct, I couldn't find much on
                          the subject,</div>
                        <div><br>
                        </div>
                        <div>Your Password is " +
                          requestee?.getPassword()?.getOrig()<br>
                        </div>
                        <div>Your Student ID is " +
                          requestee?.getEmployeeNumber()?.getOrig()<br>
                        </div>
                        <div><br>
                        </div>
                        <div>Thanks for all your help!</div>
                      </div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">On Wed, Oct 29, 2014 at
                          3:07 PM, Jason Everling <span dir="ltr"><<a
                              moz-do-not-send="true"
                              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">Ohh I see, Thanks!
                              <div><br>
                              </div>
                              <div>JASON</div>
                            </div>
                            <div>
                              <div>
                                <div class="gmail_extra"><br>
                                  <div class="gmail_quote">On Wed, Oct
                                    29, 2014 at 3:01 PM, Ivan Noris <span
                                      dir="ltr"><<a
                                        moz-do-not-send="true"
                                        href="mailto:ivan.noris@evolveum.com"
                                        target="_blank">ivan.noris@evolveum.com</a>></span>
                                    wrote:<br>
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex">
                                      <div>Hi Jason,<span><span><br>
                                            <br>
                                          </span></span>
                                        <div>On 10/29/2014 07:26 PM,
                                          Jason Everling wrote:<br>
                                        </div>
                                        <blockquote>
                                          <div dir="ltr">Not that one,
                                            that one works just fine but
                                            if I try to add to it is
                                            when it fails, like
                                            <div><br>
                                            </div>
                                            <div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"><bodyExpression></div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                      <script></div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                            <code></div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                                 Welome
                                                to blah blah, the
                                                following below are
                                                links to the various
                                                resources you will use
                                                here</div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                                   </div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                      Your Username
                                                is  +
                                                requestee?.getName()?.getOrig()</div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"><br>
                                              </div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                                   You
                                                should login and should
                                                your password at <a
                                                  moz-do-not-send="true"
href="http://www.example/com" target="_blank">http://www.example/com</a><br>
                                              </div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"><br>
                                              </div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                                   Link
                                                1</div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                                   Link
                                                2<br>
                                              </div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                                   Link
                                                3<br>
                                              </div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                           </code></div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"> 
                                                        </script></div>
                                              <div
                                                style="font-family:arial,sans-serif;font-size:13px"></bodyExpression></div>
                                            </div>
                                          </div>
                                          <div class="gmail_extra"><br>
                                          </div>
                                        </blockquote>
                                        I see. But the answer is very
                                        simple: everything in
                                        <code> is a groovy
                                        expression. Return value of this
                                        expression is what will be used
                                        for e-mail body (in this case).<br>
                                        <br>
                                        For example in my previous
                                        sample, the Groovy expression
                                        "[IDM] Your username is: " +
                                        requestee?.getName()?.getOrig()
                                        is actually the same as:<br>
                                        <br>
                                        return <b>"</b>[IDM] Your
                                        username is: <b>"</b> <b>+</b>
                                        requestee?.getName()?.getOrig()<br>
                                        <br>
                                        In your case, you are missing:<br>
                                        1) quotes for strings<br>
                                        2) + operator for concatenating
                                        strings<br>
                                        <br>
                                        So your example needs to be
                                        rewritten to maintain your
                                        required formatting, as:<br>
                                        <br>
                                                   
                                        <bodyExpression><br>
                                                       <script><br>
                                                          <code><br>
                                                           "Welome to
                                        blah blah, the following below
                                        are links to the various
                                        resources you will use here. \n"
                                        + "Your Username is " +
                                        requestee?.getName()?.getOrig()
                                        + "\nYou should login and should
                                        your password at <a
                                          moz-do-not-send="true"
                                          href="http://www.example/com"
                                          target="_blank">http://www.example/com</a>"<br>
                                                     </code><br>
                                                       </script><br>
                                                   
                                        </bodyExpression><br>
                                        <br>
                                        (this is a copy/paste from
                                        actual System Configuration)<br>
                                        <br>
                                        Which will produce notification
                                        for example:<span><br>
                                          <br>
                                          Welome to blah blah, the
                                          following below are links to
                                          the various resources<br>
                                        </span> you will use here. <br>
                                        Your Username is hulahop<span><br>
                                          You should login and should
                                          your password at <a
                                            moz-do-not-send="true"
                                            href="http://www.example/com"
                                            target="_blank">http://www.example/com</a><br>
                                          <br>
                                        </span> (this is copy/paste from
                                        actual e-mail that was sent).<br>
                                        <br>
                                        So now you should be able to do
                                        anything (except the HTML
                                        discussed earlier).<br>
                                        <br>
                                        Regards,<br>
                                        Ivan<br>
                                        <br>
                                        <blockquote>
                                          <div class="gmail_extra">
                                            <div class="gmail_quote">On
                                              Wed, Oct 29, 2014 at 1:18
                                              PM, Ivan Noris <span
                                                dir="ltr"><<a
                                                  moz-do-not-send="true"
href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@evolveum.com</a>></span>
                                              wrote:<br>
                                              <blockquote
                                                class="gmail_quote"
                                                style="margin:0 0 0
                                                .8ex;border-left:1px
                                                #ccc
                                                solid;padding-left:1ex">
                                                <div>Hi Jason,<br>
                                                  <br>
                                                  so the following
                                                  didn't work for you?
                                                  It looks ok at the
                                                  first look.<br>
                                                  <br>
                                                  Do you get any
                                                  exception when sending
                                                  notifications? Errors
                                                  in log? What precisely
                                                  "does not work"? I'll
                                                  try to replicate the
                                                  behaviour. But please
                                                  send the whole
                                                  notification handler
                                                  which does not work.
                                                  Thank you.<span><span><br>
                                                    </span></span>
                                                  <div><br>
                                                  </div>
                                                  <blockquote>
                                                    <div><bodyExpression><br>
                                                    </div>
                                                    <div>
                                                      <div><span
                                                          style="white-space:pre-wrap">
                                                        </span><script></div>
                                                      <div><span
                                                          style="white-space:pre-wrap">
                                                        </span><code></div>
                                                      <div><span
                                                          style="white-space:pre-wrap">
                                                        </span>"[IDM]
                                                        Your username
                                                        is: " +
                                                        requestee?.getName()?.getOrig()</div>
                                                      <div><span
                                                          style="white-space:pre-wrap">
                                                        </span></code></div>
                                                      <div><span
                                                          style="white-space:pre-wrap">
                                                        </span></script></div>
                                                      <div></bodyExpression></div>
                                                    </div>
                                                  </blockquote>
                                                  <span><br>
                                                  </span> Regards,<br>
                                                  Ivan<span><span><br>
                                                    </span></span>
                                                  <pre>-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  <a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
  ___________________________________________
           "Idem per idem - semper idem Vix."
</pre>
                                                </div>
                                                <br>
_______________________________________________<br>
                                                midPoint mailing list<br>
                                                <a
                                                  moz-do-not-send="true"
href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
                                                <a
                                                  moz-do-not-send="true"
href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                                                  target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
                                                <br>
                                              </blockquote>
                                            </div>
                                            <br>
                                          </div>
                                          <span><br>
                                          </span><span><br>
                                            <br>
                                            <span> 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. </span></span><br>
                                          <br>
                                          <fieldset></fieldset>
                                          <br>
                                          <pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
                                        </blockquote>
                                        <span><span> <br>
                                          </span></span>
                                        <pre>-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  <a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
  ___________________________________________
           "Idem per idem - semper idem Vix."
</pre>
                                      </div>
                                      <br>
_______________________________________________<br>
                                      midPoint mailing list<br>
                                      <a moz-do-not-send="true"
                                        href="mailto:midPoint@lists.evolveum.com"
                                        target="_blank">midPoint@lists.evolveum.com</a><br>
                                      <a moz-do-not-send="true"
                                        href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                                        target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
                                      <br>
                                    </blockquote>
                                  </div>
                                  <br>
                                </div>
                              </div>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                      <br>
                      <span style="font-size:small" size="2"><span
                          style="font-size:small" size="2"><br>
                        </span></span>
                      <div><br>
                      </div>
                      <span style="font-size:small" size="2">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. </span><br>
                      <div><br>
                      </div>
                      _______________________________________________<br>
                      midPoint mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:midPoint@lists.evolveum.com"
                        target="_blank">midPoint@lists.evolveum.com</a><br>
                      <a moz-do-not-send="true"
                        href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                        target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
                    </div>
                  </div>
                </blockquote>
                <div>
                  <div class="h5">
                    <div><br>
                      <br>
                    </div>
                    <div><br>
                    </div>
                    <div>-- <br>
                    </div>
                    <div><span name="x"></span>  Ing. Ivan Noris<br>
                        Senior Identity Management Engineer<br>
                        <a moz-do-not-send="true"
                        href="http://evolveum.com" target="_blank">evolveum.com</a><br>
                        ___________________________________________<br>
                                 "Idem per idem - semper idem Vix."<span
                        name="x"></span><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            midPoint mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
            <a moz-do-not-send="true"
              href="http://lists.evolveum.com/mailman/listinfo/midpoint"
              target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </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>
      <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>