[midPoint] catch delta events in template
Ivan Noris
ivan.noris at evolveum.com
Thu Apr 7 11:51:30 CEST 2016
Hi Roman,
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):
<mapping>
<name>copy emailAddress on change</name>
<source>
<path>$user/employeeType</path>
</source>
<source>
<path>$user/emailAddress</path>
</source>
<expression>
<script>
<code>
boolean isNew =
com.evolveum.midpoint.model.common.expression.script.ScriptExpressionEvaluationContext.getThreadLocal().isEvaluateNew()
if (isNew && !basic.isEmpty(emailAddress)) return emailAddress
</code>
</script>
</expression>
<target>
<path>$user/extension/allMailAddresses</path>
</target>
<condition>
<script>
<code>employeeType == 'EMP' || employeeType == 'EXT'</code>
</script>
</condition>
<evaluationPhase>afterAssignments</evaluationPhase>
</mapping>
Regards,
Ivan
On 04/07/2016 11:45 AM, Roman Pudil - AMI Praha a.s. wrote:
> Hi all,
>
> how to catch delta events in user template (similar "events" objects
> in notifications)?
>
> Situation - example:
>
> 1.
> User has familyName = "oldFamilyName"
> 2.
> Helpdesk Operator change familyname (in GUI) from "oldFamilyName"
> to "newFamilyName"
> 3.
> I need catch (probably in User Template?) ONLY new value
> "newFamilyName" and operate with this.
>
> Thanks!
>
> Regards
>
> Roman Pudil
>
>
> Roman Pudil
> solution architect
>
> gsm: [+420] 775 663 666
> e-mail: roman.pudil at ami.cz <mailto:roman.pudil at ami.cz>
>
>
>
> AMI Praha a.s.
> Pláničkova 11
> 162 00 Praha 6
> tel./fax: [+420] 274 783 239
> web: www.ami.cz <http://www.ami.cz>
>
>
>
>
> <http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>
>
> Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
> společnost AMI Praha a.s.
> jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít
> výhradně písemnou formu.
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
--
Ing. Ivan Noris
Senior Identity Management Engineer & IDM Architect
evolveum.com evolveum.com/blog/
___________________________________________________
"Semper ID(e)M Vix."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160407/9c469fe7/attachment.htm>
More information about the midPoint
mailing list