<div dir="ltr">Pavol,<div><br></div><div>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.</div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b>Rodrigo Yanis.</b><br><img src="http://www.identicum.com/img/favicon.ico">Identicum S.A.<br></font>Jorge Newbery 3226<br>Tel: +54 (11) 4824-9971<font face="arial, helvetica, sans-serif"><br><a href="mailto:ryanis@identicum.com" target="_blank"><font color="#0b5394">ryanis@identicum.com</font></a><br><a href="http://www.identicum.com/" target="_blank"><font color="#0b5394">www.identicum.com</font></a></font></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2016-11-15 14:54 GMT-05:00 Pavol Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello Rodrigo,</p>
    <p>is it quite easy. An example:</p>
    <p><tt><notificationConfiguration></tt><tt><br>
      </tt><tt>  <handler></tt><tt><br>
      </tt><tt>    <expressionFilter></tt><tt><br>
      </tt><tt>      <script></tt><tt><br>
      </tt><tt>        <code></tt><tt><br>
      </tt><tt>          import
        com.evolveum.midpoint.<wbr>notifications.api.events.*</tt><tt><br>
      </tt><tt>                      </tt><tt><br>
      </tt><tt>          if (!(event instanceof ResourceObjectEvent)) {</tt><tt><br>
      </tt><tt>            return false</tt><tt><br>
      </tt><tt>          }</tt><tt><br>
      </tt><tt>          return
        basic.stringify(event.<wbr>getResourceName()).contains("<wbr>OpenDJ") </tt><tt><br>
      </tt><tt>        </code></tt><tt><br>
      </tt><tt>      </script></tt><tt><br>
      </tt><tt>    </expressionFilter></tt><tt><br>
      </tt><tt>    <simpleResourceObjectNotifier><br>
              <transport>mail</transport><br>
            </<wbr>simpleResourceObjectNotifier><br>
          </handler><br>
          .....<br>
        </notificationConfiguration></tt></p>
    <p>Please see <a href="https://wiki.evolveum.com/display/midPoint/Notifications" target="_blank">https://wiki.evolveum.com/<wbr>display/midPoint/Notifications</a>
      and <a href="https://wiki.evolveum.com/display/midPoint/Configuring+notifications" target="_blank">https://wiki.evolveum.com/<wbr>display/midPoint/Configuring+<wbr>notifications</a>.
      As for the Groovy code, you can access the <i>event</i> 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 <a href="https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ResourceObjectEvent.java" target="_blank">ResourceObjectEvent</a>,
      <a href="https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/BaseEvent.java" target="_blank">BaseEvent</a>,
      and <a href="https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/Event.java" target="_blank">Event</a>.<br>
    </p>
    <p>Best regards,<br>
    </p>
    <pre class="m_3726026668882447415moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><div><div class="h5">
    <div class="m_3726026668882447415moz-cite-prefix">On 14.11.2016 18:32, Rodrigo Yanis
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello everyone,
        <div><br>
        </div>
        <div>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?</div>
        <div><br>
        </div>
        <div>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.</div>
        <div><br>
        </div>
        <div>If the user gets a new projection in resource B, the user
          doesn't get any notifications.</div>
        <div><br>
        </div>
        <div>Thanks in advance, <br clear="all">
          <div>
            <div class="m_3726026668882447415gmail_signature" data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr"><br>
                              </div>
                              <div dir="ltr"><font face="arial,
                                  helvetica, sans-serif"><b>Rodrigo
                                    Yanis.</b><br>
                                  <img src="http://www.identicum.com/img/favicon.ico">Identicum
                                  S.A.<br>
                                </font>Jorge Newbery 3226<br>
                                Tel: +54 (11) 4824-9971<font face="arial, helvetica, sans-serif"><br>
                                  <a href="mailto:ryanis@identicum.com" target="_blank"><font color="#0b5394">ryanis@identicum.com</font></a><br>
                                  <a href="http://www.identicum.com/" target="_blank"><font color="#0b5394">www.identicum.com</font></a></font></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_3726026668882447415mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_3726026668882447415moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_3726026668882447415moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>