I would like to be notified when someone adds an annotation to a document.
I had already implement this feature for a project by adding a contribution to the notification extension point and it works fine. Below my contribution :
<extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="notifications"> <notification name="AnnotatedDocument" channel="email" enabled="true" availableIn="Workspace" autoSubscribed="false" template="annotatedDocument" subject="Document annotated" label="label.notification.annotations"> <event name="annotationCreated" /> <event name="annotationUpdated" /> <event name="annotationDeleted" /> </notification> </extension>
And don't forget to declare your template linked to the previous notification :
<extension target="org.nuxeo.ecm.platform.ec.notification.service.NotificationService" point="templates"> <template name="annotatedDocument" src="templates/annotatedDocument.ftl" /> </extension>
There are sevral ways to do this. You could for instance had a listener to the 'annotationCreated' event and manage the mail sending yourself. Or you could add a contribution to the notification extension point . This will add a new possible subscription in the alert tab that anyone can subscribed to.