<?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 Saving comment in process without user task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213322#M166452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a process consisting of a start event, a couple of service tasks, and a mail task. In the start even, there are some form fields users fill out. There is also a comment field which is not part of the form. The comment field is rendered after the form and users have an option to add a comment. On the back end I call the following code to start the process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessInstance pi = runtimeService.startProcessInstanceByKey(processDefinitionKey, variableMap);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;then, I would like to save the comment, by using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;taskService.addComment(null, pi.getId(), commentText);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The line above will only work if there is a user task present in the process, but in this particular process there is no user tasks. So, I am getting &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;org.activiti.engine.ActivitiObjectNotFoundException: execution doesn't exist&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; exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I realize one of the options would be to write some custom method that would save my comment to the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ACT_HI_COMMENT&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; table. But is there something out-of-the-box in Activiti that would allow me to save a comment in this use case? I am using version 5.16.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–Ivan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2015 16:46:50 GMT</pubDate>
    <dc:creator>ivan_activiti</dc:creator>
    <dc:date>2015-11-25T16:46:50Z</dc:date>
    <item>
      <title>Saving comment in process without user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213322#M166452</link>
      <description>I have a process consisting of a start event, a couple of service tasks, and a mail task. In the start even, there are some form fields users fill out. There is also a comment field which is not part of the form. The comment field is rendered after the form and users have an option to add a comment.</description>
      <pubDate>Wed, 25 Nov 2015 16:46:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213322#M166452</guid>
      <dc:creator>ivan_activiti</dc:creator>
      <dc:date>2015-11-25T16:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Saving comment in process without user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213323#M166453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ivan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the correct way to add a comment to a process instance. However, we currently only support adding comments to running process instances. Is your process instance already completed when invoking the addComment method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 18:09:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213323#M166453</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-11-25T18:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Saving comment in process without user task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213324#M166454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I call the &amp;lt;code&amp;gt;taskService.addComment(null, pi.getId(), commentText);&amp;lt;/code&amp;gt; in my code right after the process is started. I assume since there is no user task in my process, it completes before a comment can be added. If I add a user task after the start event, the comment is added successfully.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2015 19:18:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/saving-comment-in-process-without-user-task/m-p/213324#M166454</guid>
      <dc:creator>ivan_activiti</dc:creator>
      <dc:date>2015-11-25T19:18:00Z</dc:date>
    </item>
  </channel>
</rss>

