[midPoint] - Notification to user when new projection is set

Rodrigo Yanis ryanis at identicum.com
Tue Nov 15 21:03:32 CET 2016


Pavol,

Thanks a lot for that information. I've been through the documentation and
I wasn't sure how to solve this particular case. I'll be testing this piece
now.

Regards,


*Rodrigo Yanis.*
Identicum S.A.
Jorge Newbery 3226
Tel: +54 (11) 4824-9971
ryanis at identicum.com
www.identicum.com

2016-11-15 14:54 GMT-05:00 Pavol Mederly <mederly at evolveum.com>:

> Hello Rodrigo,
>
> is it quite easy. An example:
>
> <notificationConfiguration>
>   <handler>
>     <expressionFilter>
>       <script>
>         <code>
>           import com.evolveum.midpoint.notifications.api.events.*
>
>           if (!(event instanceof ResourceObjectEvent)) {
>             return false
>           }
>           return basic.stringify(event.getResourceName()).contains("OpenDJ")
>
>         </code>
>       </script>
>     </expressionFilter>
>     <simpleResourceObjectNotifier>
>       <transport>mail</transport>
>     </simpleResourceObjectNotifier>
>   </handler>
>   .....
> </notificationConfiguration>
>
> Please see https://wiki.evolveum.com/display/midPoint/Notifications and
> https://wiki.evolveum.com/display/midPoint/Configuring+notifications. As
> for the Groovy code, you can access the *event* variable and its
> features. For example, in case of ResourceObjectEvent (event that is
> related to resource objects, i.e. projections), you can use methods defined
> in ResourceObjectEvent
> <https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ResourceObjectEvent.java>,
> BaseEvent
> <https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/BaseEvent.java>,
> and Event
> <https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/Event.java>
> .
>
> Best regards,
>
> Pavol Mederly
> Software developerevolveum.com
>
> On 14.11.2016 18:32, Rodrigo Yanis wrote:
>
> Hello everyone,
>
> Is it possible to send a notification to the user's mail in the event of a
> new projection beign set to it, and furthermore, only if that projection
> complies with a regex?
>
> For example, user is assigned to resource A, and gets a projection in said
> resource. Since I have a notification configured to be sent when the user
> gets a new projection in "A", a new notification is sent to the user.
>
> If the user gets a new projection in resource B, the user doesn't get any
> notifications.
>
> Thanks in advance,
>
> *Rodrigo Yanis.*
> Identicum S.A.
> Jorge Newbery 3226
> Tel: +54 (11) 4824-9971
> ryanis at identicum.com
> www.identicum.com
>
>
> _______________________________________________
> midPoint mailing listmidPoint at lists.evolveum.comhttp://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/20161115/a7dd56c4/attachment.htm>


More information about the midPoint mailing list