<?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 Emailing workflow comments in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268994#M222124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear listers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I like my workflows to email users at each stage (my company does not have (and will not switch to) email software supporting RSS feeds). I have created a workflow with task-nodes for multiple users and I would like to be able to access their comments at each stage for emailing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Workflow overview: Start-&amp;gt; Assignee accepts (writes a comment) -&amp;gt; Email generated (including the comment) -&amp;gt; document owner then accepts/rejects and writes a comment -&amp;gt; Email generated (including the comment)-&amp;gt;End (simple stuff).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workflow details page in &lt;/SPAN&gt;&lt;EM&gt;Share&lt;/EM&gt;&lt;SPAN&gt; shows the comments from each stage, but I can only seem to email the first comment. In each task transition I have used the code&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;token.comments.get(0).message&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;to grab the comment. When I noticed that the comment emailed was always the first comment, I changed some of the instances to read&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;token.comments.get(1).message&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;assuming there was an array to access. But whilst this throws no errors, I still get the first comment emailed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would anybody be able to tell me how to access a comment made in the task being performed and not just from the first task-node?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks in advance, Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Mar 2011 17:29:52 GMT</pubDate>
    <dc:creator>ph73nt</dc:creator>
    <dc:date>2011-03-07T17:29:52Z</dc:date>
    <item>
      <title>Emailing workflow comments</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268994#M222124</link>
      <description>Dear listersI like my workflows to email users at each stage (my company does not have (and will not switch to) email software supporting RSS feeds). I have created a workflow with task-nodes for multiple users and I would like to be able to access their comments at each stage for emailing.Workflow</description>
      <pubDate>Mon, 07 Mar 2011 17:29:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268994#M222124</guid>
      <dc:creator>ph73nt</dc:creator>
      <dc:date>2011-03-07T17:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing workflow comments</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268995#M222125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've had good success doing it like this… This way, you will get whatever is the "last" comment, wherever you are in the workflow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var comment = "";&lt;BR /&gt;if (token.comments != null &amp;amp;amp;&amp;amp;amp; token.comments.size() &amp;amp;gt; 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment = token.comments.get(token.comments.size() - 1).message;&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 21:08:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268995#M222125</guid>
      <dc:creator>lucille_arkenst</dc:creator>
      <dc:date>2011-03-08T21:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing workflow comments</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268996#M222126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;that code did the trick. The first couple of times I tried it I didn't get any change. There must have been a problem with my workflow in another respect or with my deployment. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 12:12:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/emailing-workflow-comments/m-p/268996#M222126</guid>
      <dc:creator>ph73nt</dc:creator>
      <dc:date>2011-03-09T12:12:13Z</dc:date>
    </item>
  </channel>
</rss>

