<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Jason,<br>
<br>
<div class="moz-cite-prefix">On 10/29/2014 07:26 PM, Jason Everling
wrote:<br>
</div>
<blockquote
cite="mid:CAFkZXY51+1bREVgYso8qJEQgwrGyvx9mbp=kOD2DBDrFyN_vug@mail.gmail.com"
type="cite">
<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>
<br>
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 class="moz-txt-link-freetext" href="http://www.example/com">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:<br>
<br>
Welome to blah blah, the following below are links to the various
resources<br>
you will use here. <br>
Your Username is hulahop<br>
You should login and should your password at <a class="moz-txt-link-freetext" href="http://www.example/com">http://www.example/com</a><br>
<br>
(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
cite="mid:CAFkZXY51+1bREVgYso8qJEQgwrGyvx9mbp=kOD2DBDrFyN_vug@mail.gmail.com"
type="cite">
<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 bgcolor="#FFFFFF" text="#000000"> 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
class=""><br>
<div><br>
</div>
<blockquote type="cite">
<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>
<br>
</span> Regards,<br>
Ivan<span class=""><br>
<pre cols="72">--
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>
</span></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>
<pre class="moz-signature" cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
evolveum.com
___________________________________________
"Idem per idem - semper idem Vix."
</pre>
</body>
</html>