Why doesn't Document.Publish trigger a subscribed notification
We have integrated Nuxeo with our business system and with a Java application we are updating document properties using the Document.SetProperty command and that works fine. But, when we use the Document.Publish command to publish the documents that have been changed they are published but the publishing does not trigger a mail notification in the same way as it does when doing a manual publishing. Furthermore, when looking at the history for a document the updating of properties using Document.SetProperty is logged, but the publishing using Document.Publish does not log an event.
The solution is to not only publish the document by calling Document.Publish but also to trigger an event. If I call Notification.SendEvent with the event named documentPublished it will trigger the email notification in the same way as if the document was published manually.