<HTML><HEAD>
<STYLE id=eMClientCss>BLOCKQUOTE.cite {
PADDING-LEFT: 10px; MARGIN-LEFT: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px
}
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
}
.plain PRE {
FONT-SIZE: 100%; FONT-FAMILY: monospace; FONT-WEIGHT: normal; FONT-STYLE: normal
}
.plain TT {
FONT-SIZE: 100%; FONT-FAMILY: monospace; FONT-WEIGHT: normal; FONT-STYLE: normal
}
A IMG {
BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px
}
#xb91cc98f19b044e98423450ae345ebd7 {
FONT-SIZE: 12pt; FONT-FAMILY: Tahoma
}
.plain PRE {
FONT-SIZE: 12pt; FONT-FAMILY: Tahoma
}
.plain TT {
FONT-SIZE: 12pt; FONT-FAMILY: Tahoma
}
BODY {
FONT-SIZE: 12pt; FONT-FAMILY: Tahoma
}
</STYLE>
<STYLE>#x2cc747d0139c451cbb53860f8b96fdaf BLOCKQUOTE.cite
{PADDING-LEFT: 10px; MARGIN-LEFT: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px}
#x2cc747d0139c451cbb53860f8b96fdaf 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}
#x2cc747d0139c451cbb53860f8b96fdaf .plain PRE, #x2cc747d0139c451cbb53860f8b96fdaf .plain TT
{FONT-SIZE: 100%; FONT-FAMILY: monospace; FONT-WEIGHT: normal; FONT-STYLE: normal}
#x2cc747d0139c451cbb53860f8b96fdaf A IMG
{BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px}
#x2cc747d0139c451cbb53860f8b96fdaf .plain PRE, #x2cc747d0139c451cbb53860f8b96fdaf .plain TT, #x2cc747d0139c451cbb53860f8b96fdaf
{FONT-SIZE: 12pt; FONT-FAMILY: Tahoma}
#x2cc747d0139c451cbb53860f8b96fdaf #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}
#x2cc747d0139c451cbb53860f8b96fdaf #x8c9c3951f6534f5383f55258201cf7e0 .plain PRE, #x2cc747d0139c451cbb53860f8b96fdaf #x8c9c3951f6534f5383f55258201cf7e0 .plain TT
{FONT-SIZE: 100%; FONT-FAMILY: monospace; FONT-WEIGHT: normal; FONT-STYLE: normal}
#x2cc747d0139c451cbb53860f8b96fdaf #x8c9c3951f6534f5383f55258201cf7e0 A IMG
{BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px}
#x2cc747d0139c451cbb53860f8b96fdaf #x8c9c3951f6534f5383f55258201cf7e0, #x2cc747d0139c451cbb53860f8b96fdaf #x8c9c3951f6534f5383f55258201cf7e0 .plain PRE, #x2cc747d0139c451cbb53860f8b96fdaf #x8c9c3951f6534f5383f55258201cf7e0 .plain TT
{FONT-SIZE: 12pt; FONT-FAMILY: Tahoma}
</STYLE>
</HEAD>
<BODY bgColor=#ffffff scroll=auto class>
<DIV><SPAN id=xb91cc98f19b044e98423450ae345ebd7>
<DIV>Hi Ivan,</DIV>
<DIV>once more: </DIV>
<DIV>How to get (or check) in user template, that current attribute is changing? How to do it? Some code about deltas?</DIV>
<DIV> </DIV>
<DIV>Your script about "isNew" variable (see later) evaluates attribute every time when user object is changed (without changing this attribute).</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV>Regards</DIV></SPAN></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: "Roman Pudil - AMI Praha a.s." <<A href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</A>></DIV>
<DIV>Komu: "midPoint General Discussion" <<A href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</A>></DIV>
<DIV>Odesláno: 7.4.2016 13:15:00</DIV>
<DIV>Předmět: Re[2]: [midPoint] catch delta events in template</DIV>
<DIV> </DIV>
<DIV id=x2cc747d0139c451cbb53860f8b96fdaf class=class>
<BLOCKQUOTE class=cite2 cite=em862fed24-2083-418e-88e8-e9b601d77936@rpudil-dell7440 type="cite">
<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/">http://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 && !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/">http://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></BLOCKQUOTE></DIV></BODY></HTML>