[midPoint] catch delta events in template
Pavol Mederly
mederly at evolveum.com
Tue Apr 12 06:35:59 CEST 2016
Hello Roman,
I'm not sure I understand what you're trying to achieve.
Do you want to do something like this?
" IF attribute X was changed
THEN do something with attribute Y ?"
Could you provide a more specific description, please?
Best regards,
Pavol
On 11.04.2016 16:21, Roman Pudil - AMI Praha a.s. wrote:
> Hi Ivan,
> once more:
> How to get (or check) in user template, that current attribute
> is changing? How to do it? Some code about deltas?
> Your script about "isNew" variable (see later) evaluates attribute
> every time when user object is changed (without changing this attribute).
> Thanks!
> Regards
>
> 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.
>
> ------ Původní zpráva ------
> Od: "Roman Pudil - AMI Praha a.s." <roman.pudil at ami.cz
> <mailto:roman.pudil at ami.cz>>
> Komu: "midPoint General Discussion" <midpoint at lists.evolveum.com
> <mailto:midpoint at lists.evolveum.com>>
> Odesláno: 7.4.2016 13:15:00
> Předmět: Re[2]: [midPoint] catch delta events in template
>> Thanks! This works!
>>
>> 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: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.
>>
>> ------ Původní zpráva ------
>> Od: "Ivan Noris" <ivan.noris at evolveum.com
>> <mailto:ivan.noris at evolveum.com>>
>> Komu: midpoint at lists.evolveum.com <mailto:midpoint at lists.evolveum.com>
>> Odesláno: 7.4.2016 11:51:30
>> Předmět: Re: [midPoint] catch delta events in template
>>> 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
>>>>
>>>>
>>>>
>>>> AMI Praha a.s.
>>>> Pláničkova 11
>>>> 162 00 Praha 6
>>>> tel./fax: [+420] 274 783 239
>>>> web: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."
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160412/8c327098/attachment.htm>
More information about the midPoint
mailing list