<?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: How do I add an email notification when comments are added? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278425#M231555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the original question was asking about a document rather than a discussion post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If adding the rule to site discussions then, yes in Repository &amp;gt; Sites ....&lt;/P&gt;&lt;P&gt;I've wrapped up Discussions notifications in an add on &lt;A href="https://github.com/malariagen/alfresco-discussions" title="https://github.com/malariagen/alfresco-discussions" rel="nofollow noopener noreferrer"&gt;GitHub - malariagen/alfresco-discussions: Customizations to Alfresco Site Discussions&lt;/A&gt; that does rather more than just send out an email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure of the pros and cons of behaviour vs rule but in this case I think a rule gives more flexibility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Oct 2016 08:48:40 GMT</pubDate>
    <dc:creator>idwright</dc:creator>
    <dc:date>2016-10-19T08:48:40Z</dc:date>
    <item>
      <title>How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278421#M231551</link>
      <description>I would like to create a new notification that is sent to the author of the document and the commenter when a new comment is added on a document. Can anyone let me know how I can achieve this?</description>
      <pubDate>Tue, 18 Oct 2016 22:33:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278421#M231551</guid>
      <dc:creator>prachi379</dc:creator>
      <dc:date>2016-10-18T22:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278422#M231552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can develop a custom behaviour for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Listen to 'onContentUpdate' event for 'ForumModel.TYPE_POST' types and send the email by using an action 'MailActionExecuter.NAME'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 08:04:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278422#M231552</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-19T08:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278423#M231553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably the easiest way to do this is to create a rule that is configured to run a script when the document is updated.&lt;/P&gt;&lt;P&gt;From the script you can then use the mail action e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14768648620082731" data-hasrefreshed="true" data-renderedposition="83_8_1332_176" jivemacro_uid="_14768648620082731"&gt;&lt;P&gt;&amp;nbsp; var template = "Data Dictionary/Email Templates/Notify Email Templates/xxxxx.ftl";&lt;/P&gt;&lt;P&gt;&amp;nbsp; var mail = actions.create("mail");&lt;/P&gt;&lt;P&gt;&amp;nbsp; var creator = document.properties["cm:creator"];&lt;/P&gt;&lt;P&gt;&amp;nbsp; var peep = people.getPerson(creator);&lt;/P&gt;&lt;P&gt;&amp;nbsp; mail.parameters.to = peep.properties["cm:email"];&lt;/P&gt;&lt;P&gt;&amp;nbsp; mail.parameters.subject="Document changed: "+document.properties.title;&lt;/P&gt;&lt;P&gt;&amp;nbsp; mail.parameters.template = companyhome.childByNamePath(template);&lt;/P&gt;&lt;P&gt;&amp;nbsp; mail.execute(document);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to use a template but it's nicer if you do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 08:16:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278423#M231553</guid>
      <dc:creator>idwright</dc:creator>
      <dc:date>2016-10-19T08:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278424#M231554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting, where do you include such rule? At 'Repository &amp;gt; Sites'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 08:18:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278424#M231554</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-19T08:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278425#M231555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the original question was asking about a document rather than a discussion post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If adding the rule to site discussions then, yes in Repository &amp;gt; Sites ....&lt;/P&gt;&lt;P&gt;I've wrapped up Discussions notifications in an add on &lt;A href="https://github.com/malariagen/alfresco-discussions" title="https://github.com/malariagen/alfresco-discussions" rel="nofollow noopener noreferrer"&gt;GitHub - malariagen/alfresco-discussions: Customizations to Alfresco Site Discussions&lt;/A&gt; that does rather more than just send out an email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure of the pros and cons of behaviour vs rule but in this case I think a rule gives more flexibility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 08:48:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278425#M231555</guid>
      <dc:creator>idwright</dc:creator>
      <dc:date>2016-10-19T08:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278426#M231556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, a document comment is modelled as a discussion post: they both are sharing content model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I have to add that the behaviour should check if the new POST is happening inside 'documentLibrary' component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMO, behaviours are more efficient than rules, as they are only listening to events inside node lifecycle. However, rules must consider all containing folder hierarchy also as triggering condition, which in the end can involve too much overload for the system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 08:58:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278426#M231556</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2016-10-19T08:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an email notification when comments are added?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278427#M231557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting about the shared content model.&lt;/P&gt;&lt;P&gt;I wouldn't think it's a good idea to use a rule everywhere, so I agree a behaviour is probably better in that case.&lt;/P&gt;&lt;P&gt;It might be easier to check if the post is not in a discussion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 09:20:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-add-an-email-notification-when-comments-are-added/m-p/278427#M231557</guid>
      <dc:creator>idwright</dc:creator>
      <dc:date>2016-10-19T09:20:01Z</dc:date>
    </item>
  </channel>
</rss>

