<HTML><HEAD>
<STYLE id=eMClientCss>
<![CDATA[
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
.plain pre, .plain tt { font-family: monospace; font-size: 100%; font-weight: normal; font-style: normal;}
a img { border: 0px; }body {font-family: Tahoma;font-size: 12pt;}
.plain pre, .plain tt {font-family: Tahoma;font-size: 12pt;}]]></STYLE>

<STYLE>#x8c9c3951f6534f5383f55258201cf7e0 BLOCKQUOTE.cite2
{MARGIN-TOP: 3px; PADDING-TOP: 0px; PADDING-LEFT: 10px; MARGIN-LEFT: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px}
#x8c9c3951f6534f5383f55258201cf7e0 .plain PRE, #x8c9c3951f6534f5383f55258201cf7e0 .plain TT
{FONT-SIZE: 100%; FONT-FAMILY: monospace; FONT-WEIGHT: normal; FONT-STYLE: normal}
#x8c9c3951f6534f5383f55258201cf7e0 A IMG
{BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px}
#x8c9c3951f6534f5383f55258201cf7e0 .plain PRE, #x8c9c3951f6534f5383f55258201cf7e0 .plain TT, #x8c9c3951f6534f5383f55258201cf7e0
{FONT-SIZE: 12pt; FONT-FAMILY: Tahoma}
</STYLE>
</HEAD>
<BODY bgColor=#ffffff scroll=auto class>
<DIV>Thanks! This works!</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV id=signature_old>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Tahoma">
<TABLE style="WHITE-SPACE: normal; WORD-SPACING: 0px; BORDER-COLLAPSE: collapse; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); FONT: medium 'Times New Roman'; WIDOWS: 1; LETTER-SPACING: normal; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px">
<TBODY>
<TR>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial, sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)" colSpan=2>
<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:<SPAN class=Apple-converted-space> </SPAN><A href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</A></P></TD>
<TD style="BORDER-RIGHT: rgb(204,204,204) 1px solid">   </TD>
<TD>   </TD>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial, sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)">
<P>AMI Praha a.s.<BR>Pláničkova 11<BR>162 00 Praha 6<BR>tel./fax: [+420] 274 783 239<BR>web:<SPAN class=Apple-converted-space> </SPAN><A href="http://www.ami.cz/">www.ami.cz</A></P></TD>
<TD style="BORDER-RIGHT: rgb(204,204,204) 1px solid">   </TD>
<TD>   </TD>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial, sans-serif; COLOR: rgb(0,0,0)">
<P><IMG title="AMI Praha a.s." border=0 alt="" src="http://www.ami.cz/images/podpis/ami_logo.gif"></P></TD></TR>
<TR>
<TD colSpan=8><BR><A href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><IMG border=0 alt="" src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png"></A></TD></TR>
<TR>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial, sans-serif; COLOR: rgb(128,128,128)" colSpan=8><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></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>------ Původní zpráva ------</DIV>
<DIV>Od: "Ivan Noris" <<A href="mailto:ivan.noris@evolveum.com">ivan.noris@evolveum.com</A>></DIV>
<DIV>Komu: <A href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</A></DIV>
<DIV>Odesláno: 7.4.2016 11:51:30</DIV>
<DIV>Předmět: Re: [midPoint] catch delta events in template</DIV>
<DIV> </DIV>
<DIV id=x8c9c3951f6534f5383f55258201cf7e0 style="COLOR: #000000">
<BLOCKQUOTE class=cite2 cite=57062DA2.80400@evolveum.com type="cite">Hi Roman,<BR><BR>I was using this in user template to copy each change of emailAddress attribute, i.e. only new addresses entered there, to extended attribute allMailAddresses (to keep all previous addresses):<BR><BR>    <mapping><BR>        <name>copy emailAddress on change</name><BR>        <source><BR>            <path>$user/employeeType</path><BR>        </source><BR>        <source><BR>            <path>$user/emailAddress</path><BR>        </source><BR>        <expression><BR>        <script><BR>            <code><BR>boolean isNew = com.evolveum.midpoint.model.common.expression.script.ScriptExpressionEvaluationContext.getThreadLocal().isEvaluateNew()<BR>if (isNew &amp;&amp; !basic.isEmpty(emailAddress)) return emailAddress<BR>            </code><BR>        </script><BR>    </expression><BR>        <target><BR>            <path>$user/extension/allMailAddresses</path><BR>        </target><BR>        <condition><BR>             <script><BR>                <code>employeeType == 'EMP' || employeeType == 'EXT'</code><BR>            </script>  <BR>        </condition><BR>        <evaluationPhase>afterAssignments</evaluationPhase><BR>    </mapping><BR><BR>Regards,<BR>Ivan<BR><BR><BR>
<DIV class=moz-cite-prefix>On 04/07/2016 11:45 AM, Roman Pudil - AMI Praha a.s. wrote:<BR></DIV>
<BLOCKQUOTE class=cite cite=mid:emcbb807f8-a21f-42f3-a8a9-e142b442a30a@rpudil-dell7440 type="cite">
<DIV>Hi all,</DIV>
<DIV> </DIV>
<DIV>how to catch delta events in user template (similar "events" objects in notifications)?</DIV>
<DIV> </DIV>
<DIV>Situation - example:</DIV>
<OL>
<LI>
<DIV>User has familyName = "oldFamilyName"</DIV></LI>
<LI>
<DIV>Helpdesk Operator change familyname (in GUI) from "oldFamilyName" to "newFamilyName"</DIV></LI>
<LI>
<DIV>I need catch (probably in User Template?) ONLY new value "newFamilyName" and operate with this.</DIV></LI></OL>
<DIV>Thanks!</DIV>
<DIV> </DIV>
<DIV>Regards</DIV>
<DIV> </DIV>
<DIV>Roman Pudil</DIV>
<DIV> </DIV>
<DIV id=signature_old>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: Tahoma">
<TABLE style="WHITE-SPACE: normal; WORD-SPACING: 0px; BORDER-COLLAPSE: collapse; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); FONT: medium 'Times New Roman'; WIDOWS: 1; LETTER-SPACING: normal; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px">
<TBODY>
<TR>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial,                   sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)" colSpan=2>
<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:<SPAN class=Apple-converted-space> </SPAN><A href="mailto:roman.pudil@ami.cz" moz-do-not-send="true"><A class=moz-txt-link-abbreviated href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</A></A></P></TD>
<TD style="BORDER-RIGHT: rgb(204,204,204) 1px solid">   </TD>
<TD>   </TD>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial,                   sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)">
<P>AMI Praha a.s.<BR>Pláničkova 11<BR>162 00 Praha 6<BR>tel./fax: [+420] 274 783 239<BR>web:<SPAN class=Apple-converted-space> </SPAN><A href="http://www.ami.cz/" moz-do-not-send="true"><A class=moz-txt-link-abbreviated href="http://www.ami.cz/">www.ami.cz</A></A></P></TD>
<TD style="BORDER-RIGHT: rgb(204,204,204) 1px solid">   </TD>
<TD>   </TD>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial,                   sans-serif; COLOR: rgb(0,0,0)">
<P><IMG title="AMI Praha a.s." border=0 alt="" src="http://www.ami.cz/images/podpis/ami_logo.gif" moz-do-not-send="true"></P></TD></TR>
<TR>
<TD colSpan=8><BR><A href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management" moz-do-not-send="true"><IMG border=0 alt="" src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png" moz-do-not-send="true"></A></TD></TR>
<TR>
<TD style="FONT-SIZE: 11px; FONT-FAMILY: Arial,                   sans-serif; COLOR: rgb(128,128,128)" colSpan=8><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></DIV>
<DIV> </DIV><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 & IDM Architect
  evolveum.com                     evolveum.com/blog/
  ___________________________________________________
  "Semper ID(e)M Vix."
</PRE></BLOCKQUOTE></DIV></BODY></HTML>