[midPoint] Mail notifications as Server Task

Pavol Mederly mederly at evolveum.com
Thu Oct 15 10:57:59 CEST 2015


Hello Roman,

unfortunately, there's currently no support for such a method. What you 
can do is to use filter like

|<||expressionFilter||> ||<!-- passes 'new account' events requested by 
user named "security-admin" -->|
|||<||script||><||code||>

      event.isUserRelated() && 
event.getFocusContext()?.getSecondaryDeltas()?.findItemDelta( 
YOUR-PATH-HERE ) != null|
||
|    </||code||></||script||>|
|</||expressionFilter||>

|I've not tested it, however.

Caveats:
1) does not work with DELETE deltas
2) YOUR-PATH has to be matched exactly (i.e. if you want to catch e.g. 
user/fullName changes, it's ok; if you want to catch any user/assignment 
changes - like modifying user/assignment[1]/targetRef - it won't work)

Best regards,
Pavol

> Hi Pavol,
> thanks for answer!
> Ok, now I have partial workarond about it.
> Another question:
> I want send notification to user only when change ONLY one defined 
> attribute. How to create right condition/filter in notification to 
> resolve it? Maybe check some operation/action on requestee 
> object? What action?
> 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: "Pavol Mederly" <mederly at evolveum.com <mailto:mederly at evolveum.com>>
> Komu: "Roman Pudil - AMI Praha a.s." <roman.pudil at ami.cz 
> <mailto:roman.pudil at ami.cz>>; "midPoint General Discussion" 
> <midpoint at lists.evolveum.com <mailto:midpoint at lists.evolveum.com>>
> Odesláno: 14.10.2015 12:40:18
> Předmět: Re: [midPoint] Mail notifications as Server Task
>> I see. So, these should be - in fact - periodically generated 
>> reports, sent via mail?
>>
>> It is not implemented in the current version of midPoint.
>> The exact implementation would depend on various factors.
>>
>> For example, in case of password expiration notifications, it could 
>> be advantageous to create a new type of event ("your password is 
>> about to expire"), and use existing notification mechanism to deliver 
>> it.
>>
>> In case of daily/weekly/monthly reports, maybe a direct code for mail 
>> delivery could be inserted into reporting module... And there would 
>> be a periodic reporting task that would simply create the report PLUS 
>> deliver it via mail. But, this could work only if there would not be 
>> necessary to create e.g. hundreds of reports (for each user / org 
>> unit manager / etc). In that case, the report generation would need 
>> to be parameterized somehow.
>>
>> Pavol
>>
>>
>>> Hi Pavol,
>>> thanks for answer!
>>> These notifications I want to use mainly for two things:
>>> 1) Notify users about password expiration (I know, how to calculate 
>>> pwd expiration date)
>>> 2) Send to users daily/weekly/monthly generated reports about IdM
>>> Thanks!
>>> Regards
>>>
>>> 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: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: "Pavol Mederly" <mederly at evolveum.com <mailto:mederly at evolveum.com>>
>>> Komu: midpoint at lists.evolveum.com <mailto:midpoint at lists.evolveum.com>
>>> Odesláno: 14.10.2015 12:09:53
>>> Předmět: Re: [midPoint] Mail notifications as Server Task
>>>> Hello Roman,
>>>>
>>>> what should be in these batched notifications? The same content as 
>>>> for immediate ones, with only difference is that these should be 
>>>> sent once a day? Perhaps aggregated - i.e. all changes for a given 
>>>> recipient summarized into one message?
>>>>
>>>> Best regards,
>>>> Pavol
>>>>
>>>>> Hi all,
>>>>> how to create mail notifications as server task?
>>>>> The goal is to create email notifications for users once per day 
>>>>> (not based on create/update/delete action).
>>>>> Thanks!
>>>>> Regards
>>>>>
>>>>> 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: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
>>>>
>>>
>>>
>>> _______________________________________________
>>> midPoint mailing list
>>> midPoint at lists.evolveum.com
>>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>
>
> _______________________________________________
> 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/20151015/c8017b35/attachment.htm>


More information about the midPoint mailing list