<?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: Notification for deleted document in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314984#M1985</link>
    <description>&lt;P&gt;The trash is a sub-tab of the administration tab. When you press the button 'Delete' the 'documentRemoved' event is not fired, this is why the notification is not sended.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2012 11:25:39 GMT</pubDate>
    <dc:creator>Clément_Lardeur</dc:creator>
    <dc:date>2012-02-27T11:25:39Z</dc:date>
    <item>
      <title>Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314975#M1976</link>
      <description>&lt;P&gt;Hi, I'm a new user of Nuxeo.
I'm wondering if it is possible to have notifications when a document is deleted. I write my extension point:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;component name="org.nuxeo.sample.notify"&amp;gt;
    &amp;lt;extension point="notifications" target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService"&amp;gt;
        &amp;lt;notification autoSubscribed="false" availableIn="all" label="Delete" channel="email" enabled="true" name="Document Removed"&amp;gt;
        &amp;lt;event name="documentRemoved" /&amp;gt;
        &amp;lt;/notification&amp;gt;
    &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can subscribe an user to receive the Delete notifications, but they don't work: when I delete a document, user does not receive the notification.&lt;/P&gt;
&lt;P&gt;What's wrong?&lt;/P&gt;
&lt;P&gt;Thank you very much, and sorry for my bad English!&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2012 12:24:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314975#M1976</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-23T12:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314976#M1977</link>
      <description>&lt;P&gt;Is it normal that you have spaces in your target?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2012 12:26:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314976#M1977</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-23T12:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314977#M1978</link>
      <description>&lt;P&gt;I think that is a problem of formattation in the previous message...in orginal code there were not those spaces!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2012 12:53:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314977#M1978</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-23T12:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314978#M1979</link>
      <description>&lt;P&gt;You need to precise a template for your notification :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;notification template="documentRemoved" autoSubscribed="false" availableIn="all" label="Delete" channel="email" enabled="true" name="Document Removed"&amp;gt;
    &amp;lt;event name="documentRemoved" /&amp;gt;
&amp;lt;/notification&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Moreover the template must be defined in an other contribution point :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService"
    point="templates"&amp;gt;
    &amp;lt;template name="documentRemoved" src="templates/documentRemoved.ftl" /&amp;gt;
  &amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can see the template &lt;A href="https://github.com/nuxeo/nuxeo-features/blob/master/nuxeo-platform-notification/nuxeo-platform-notification-core/src/main/resources/templates/modif.ftl"&gt;'modif.ftl'&lt;/A&gt; to create your own template 'documentRemoved.ftl'.&lt;/P&gt;
&lt;P&gt;I think it should work  better!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2012 13:18:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314978#M1979</guid>
      <dc:creator>Clément_Lardeur</dc:creator>
      <dc:date>2012-02-23T13:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314979#M1980</link>
      <description>&lt;P&gt;Can you (by convention) use a name without space (this is the technical name, so my advice would be to use the Camel Case.&lt;/P&gt;
&lt;P&gt;Have you defined your component into the Manifest ?&lt;/P&gt;
&lt;P&gt;How did you generate your bundle. My piece of advice would be to use &lt;A href="http://doc.nuxeo.com/x/aoKE"&gt;the Nuxeo IDE&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Or more easily you can use studio and copy you contribution (from &lt;CODE&gt;&amp;lt;extension... to &amp;lt;/extension&amp;gt;&lt;/CODE&gt;) into Advanced setting &amp;gt; XML Extension.&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2012 13:21:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314979#M1980</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-23T13:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314980#M1981</link>
      <description>&lt;P&gt;The curious thing is that the code works with every other defined event (for example: documentModified or documentLocked or versionRemoved)... it doesn't work only with documentRemoved and I really don't understand why...
(I try to add my own template...it works with other event too)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2012 14:40:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314980#M1981</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-23T14:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314981#M1982</link>
      <description>&lt;P&gt;This is my new piece of code: this works with every event, except for documentRemoved and documentMoved...can anyone tell me why?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="templates"&amp;gt;
    	&amp;lt;template name="remove" src="templates/documentRemoved.ftl" /&amp;gt;
  	&amp;lt;/extension&amp;gt;
	&amp;lt;extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="notifications"&amp;gt;
	
		&amp;lt;notification name="Cancellazione" channel="email" availableIn="all" autoSubscribed="false"
          label="Cancellazione" template="remove"&amp;gt;
          &amp;lt;event name="documentRemoved"/&amp;gt;
        &amp;lt;/notification&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:18:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314981#M1982</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-27T10:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314982#M1983</link>
      <description>&lt;P&gt;The event 'documentRemoved' is throwed when a document is permanently removed form the trash. What is your test case ?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:27:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314982#M1983</guid>
      <dc:creator>Clément_Lardeur</dc:creator>
      <dc:date>2012-02-27T10:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314983#M1984</link>
      <description>&lt;P&gt;Where is the trash?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:36:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314983#M1984</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-27T10:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314984#M1985</link>
      <description>&lt;P&gt;The trash is a sub-tab of the administration tab. When you press the button 'Delete' the 'documentRemoved' event is not fired, this is why the notification is not sended.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:25:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314984#M1985</guid>
      <dc:creator>Clément_Lardeur</dc:creator>
      <dc:date>2012-02-27T11:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314985#M1986</link>
      <description>&lt;P&gt;Ok, thanks, now all has got sense!
Could I bind the "documentRemoved" event to the "Delete" button?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 11:37:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314985#M1986</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-27T11:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314986#M1987</link>
      <description>&lt;P&gt;There is no simply way to do that.&lt;/P&gt;
&lt;P&gt;A solution would be to implement your own event 'documentDeleted' and to create a listener or by overriding the concerned bean to fired this event. See &lt;A href="http://doc.nuxeo.com/display/NXDOC/Events+and+Listeners"&gt;http://doc.nuxeo.com/display/NXDOC/Events+and+Listeners&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 12:06:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314986#M1987</guid>
      <dc:creator>Clément_Lardeur</dc:creator>
      <dc:date>2012-02-27T12:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314987#M1988</link>
      <description>&lt;P&gt;Thanks, I will try to create a listener.
Instead, is there an event associated to the moving of a document in the trash? I tried with "aboutToRemove", but it does not seem to work...and "lifecycle_transition_event" catch other events too (for example: restoring).&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 12:27:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314987#M1988</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-27T12:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314988#M1989</link>
      <description>&lt;P&gt;There is no event when a document is moved to the trash, but you should catch the event 'lifecycle_transition_event' and test if the currentLifeCycleState of the document is 'delete', then you can fired your own event 'documentDeleted'.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2012 14:22:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314988#M1989</guid>
      <dc:creator>Clément_Lardeur</dc:creator>
      <dc:date>2012-02-27T14:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314989#M1990</link>
      <description>&lt;P&gt;Sorry, another question: if I move the "Permanently delete" button from the trash to the workspace with this piece of code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;action confirm="if( !confirmDeleteDocumentsForever() ) return false;" help="comand.deleteDocs.help" icon="" id="CURRENT_SELECTION_DELETE" label="command.deleteDocs" link="#deleteActions.purgeSelection}"&amp;gt;
  &amp;lt;category&amp;gt;CURRENT_SELECTION_LIST&amp;lt;/category&amp;gt;
  &amp;lt;filter id="canPurge"&amp;gt;
    &amp;lt;rule grant="true"&amp;gt;
      &amp;lt;condition&amp;gt;#{deleteActions.canPurge}&amp;lt;/condition&amp;gt;
    &amp;lt;/rule&amp;gt;
  &amp;lt;/filter&amp;gt;
&amp;lt;/action&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have the button, but it does not delete the document. Is there a way to fix it?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 09:17:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314989#M1990</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-28T09:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314990#M1991</link>
      <description>&lt;P&gt;Can I filter the notifications? Something like&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 10:22:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314990#M1991</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-28T10:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314991#M1992</link>
      <description>&lt;P&gt;Well, thanks in any case, but I found a cleaner solution...I write it here, so, if someone will be interested...
It is possible to disable the trash service, adding the following extension:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="config" target="org.nuxeo.ecm.webapp.trashManagement.TrashManagementService"&amp;gt;
    &amp;lt;trashConfig enabled="false"/&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2012 12:21:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314991#M1992</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-02-28T12:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314992#M1993</link>
      <description>&lt;P&gt;Testing the notification service for deleted files, I noticed that when a document has got more than one version, nuxeo send me a mail for each version when I delete the entire document... is there a way to filter to notifications?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2012 10:31:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314992#M1993</guid>
      <dc:creator>Alice_</dc:creator>
      <dc:date>2012-03-27T10:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314993#M1994</link>
      <description>&lt;P&gt;You can use the method isVersion() of a DocumentModel in your listener to filter.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2012 13:34:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314993#M1994</guid>
      <dc:creator>Clément_Lardeur</dc:creator>
      <dc:date>2012-03-27T13:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Notification for deleted document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314994#M1995</link>
      <description>&lt;P&gt;Please ask new questions as a separate Question in this site. Or add comments. But don't ask questions in the Answers of an existing question.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2012 16:58:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/notification-for-deleted-document/m-p/314994#M1995</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2012-03-29T16:58:31Z</dc:date>
    </item>
  </channel>
</rss>

