<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting an alert for expiring documents in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/setting-an-alert-for-expiring-documents/m-p/320292#M7293</link>
    <description>&lt;P&gt;To get these notifications you could do the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;set expiration date on documents of your interest (the dublincore schema has an "expired" field of type date so you probably would want to use that one)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;set a &lt;A href="http://doc.nuxeo.com/x/S4Ge"&gt;scheduler&lt;/A&gt; to launch a custom event (i.e. expiration_check) on a regular basis&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;register a service ExpirationChecker to listen for that event&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the expiration checker service will query (NXQL) all documents that&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;have not been checked yet (have the custom "checked" property empty - you'll need this property so that you do not resend notifications on already checked documents)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the expiration date before today&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;OL start="5"&gt;
&lt;LI&gt;loop through the not-processed, expired document list and send notifications to each user subscribed to those documents (you'll have to decide what type of subscription would have to be used for this purpose)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Another approach would be to use NotificationService (via its &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.platform.ec.notification.service.NotificationService--notifications"&gt;extension point&lt;/A&gt;) where you handle  the launched expiration_check event on each document that subscribed to that event.&lt;/P&gt;
&lt;P&gt;Each of these approaches will have its advantages and disadvantages depending on the context and any additional processing you want to perform as well as complexity of the task/future updates to your custom code.&lt;/P&gt;
&lt;P&gt;Some of the questions you'd need to ask yourself would be: do users subscribe to the expiration event or you want it to be checked automatically on all documents (auto-subscribe). Do you need a list of all expired documents? Do you need any other properties/conditions to be checked. What types of documents can expire?&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2012 21:38:41 GMT</pubDate>
    <dc:creator>Wojciech_Sulejm</dc:creator>
    <dc:date>2012-05-29T21:38:41Z</dc:date>
    <item>
      <title>Setting an alert for expiring documents</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/setting-an-alert-for-expiring-documents/m-p/320291#M7292</link>
      <description>&lt;P&gt;Is there any way to configure sending automatic emails to users subscribed to a document when this document has reached its expiring date?&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 10:20:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/setting-an-alert-for-expiring-documents/m-p/320291#M7292</guid>
      <dc:creator>DaniAnte_</dc:creator>
      <dc:date>2012-05-29T10:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Setting an alert for expiring documents</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/setting-an-alert-for-expiring-documents/m-p/320292#M7293</link>
      <description>&lt;P&gt;To get these notifications you could do the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;set expiration date on documents of your interest (the dublincore schema has an "expired" field of type date so you probably would want to use that one)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;set a &lt;A href="http://doc.nuxeo.com/x/S4Ge"&gt;scheduler&lt;/A&gt; to launch a custom event (i.e. expiration_check) on a regular basis&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;register a service ExpirationChecker to listen for that event&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the expiration checker service will query (NXQL) all documents that&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;have not been checked yet (have the custom "checked" property empty - you'll need this property so that you do not resend notifications on already checked documents)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;the expiration date before today&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;OL start="5"&gt;
&lt;LI&gt;loop through the not-processed, expired document list and send notifications to each user subscribed to those documents (you'll have to decide what type of subscription would have to be used for this purpose)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Another approach would be to use NotificationService (via its &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.platform.ec.notification.service.NotificationService--notifications"&gt;extension point&lt;/A&gt;) where you handle  the launched expiration_check event on each document that subscribed to that event.&lt;/P&gt;
&lt;P&gt;Each of these approaches will have its advantages and disadvantages depending on the context and any additional processing you want to perform as well as complexity of the task/future updates to your custom code.&lt;/P&gt;
&lt;P&gt;Some of the questions you'd need to ask yourself would be: do users subscribe to the expiration event or you want it to be checked automatically on all documents (auto-subscribe). Do you need a list of all expired documents? Do you need any other properties/conditions to be checked. What types of documents can expire?&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 21:38:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/setting-an-alert-for-expiring-documents/m-p/320292#M7293</guid>
      <dc:creator>Wojciech_Sulejm</dc:creator>
      <dc:date>2012-05-29T21:38:41Z</dc:date>
    </item>
  </channel>
</rss>

