[midPoint] Email Notification
Ivan Noris
ivan.noris at evolveum.com
Wed Oct 29 21:01:27 CET 2014
Hi Jason,
On 10/29/2014 07:26 PM, Jason Everling wrote:
> Not that one, that one works just fine but if I try to add to it is
> when it fails, like
>
> <bodyExpression>
> <script>
> <code>
> Welome to blah blah, the following below are links
> to the various resources you will use here
>
> Your Username is + requestee?.getName()?.getOrig()
>
> You should login and should your password
> at http://www.example/com
>
> Link 1
> Link 2
> Link 3
> </code>
> </script>
> </bodyExpression>
>
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).
For example in my previous sample, the Groovy expression "[IDM] Your
username is: " + requestee?.getName()?.getOrig() is actually the same as:
return *"*[IDM] Your username is: *"* *+* requestee?.getName()?.getOrig()
In your case, you are missing:
1) quotes for strings
2) + operator for concatenating strings
So your example needs to be rewritten to maintain your required
formatting, as:
<bodyExpression>
<script>
<code>
"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 http://www.example/com"
</code>
</script>
</bodyExpression>
(this is a copy/paste from actual System Configuration)
Which will produce notification for example:
Welome to blah blah, the following below are links to the various resources
you will use here.
Your Username is hulahop
You should login and should your password at http://www.example/com
(this is copy/paste from actual e-mail that was sent).
So now you should be able to do anything (except the HTML discussed
earlier).
Regards,
Ivan
> On Wed, Oct 29, 2014 at 1:18 PM, Ivan Noris <ivan.noris at evolveum.com
> <mailto:ivan.noris at evolveum.com>> wrote:
>
> Hi Jason,
>
> so the following didn't work for you? It looks ok at the first look.
>
> 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.
>
>> <bodyExpression>
>> <script>
>> <code>
>> "[IDM] Your username is: " + requestee?.getName()?.getOrig()
>> </code>
>> </script>
>> </bodyExpression>
>
> Regards,
> Ivan
>
> --
> Ing. Ivan Noris
> Senior Identity Management Engineer
> evolveum.com <http://evolveum.com>
> ___________________________________________
> "Idem per idem - semper idem Vix."
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
>
>
> CONFIDENTIALITY NOTICE:
> 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.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
--
Ing. Ivan Noris
Senior Identity Management Engineer
evolveum.com
___________________________________________
"Idem per idem - semper idem Vix."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141029/9160fb57/attachment.htm>
More information about the midPoint
mailing list