<?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: Facing issue with Task complete event in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175662#M128792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm afraid there is no built-in solution for this. After completing the task, it's possible that a load of other operations occur (service-tasks, …) in the same transaction. Only when the process reached a wait-state/async/process-end, the transaction will be comitted. The event you get when completing is indeed only valid if the transaction commits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a solution, I whould suggest keeping the task-ID (or whatever data you need) somewhere in a thread-local. Add a transaction-listener to the ongoing transaction (depends on your transaction implementation. For Spring, use a TransactionSynchronizationAdapter) that is called on commit and sends out any notifications at that moment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also piggy-back on the activiti generalisation of these listeners if you don't want to dig deep into transaction-management, see the class org.activiti.engine.impl.cfg.TransactionContext, which you can obtain an IMPL from by using org.activiti.engine.impl.interceptor.CommandContext.getTransactionContext(). The context allows adding a listener - Please note that this is "internal" activiti stuff and CAN change in the future. However, it's a safe bet to say that transaction-behaviour won't be very likely to change in the future &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Mar 2014 09:08:12 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2014-03-17T09:08:12Z</dc:date>
    <item>
      <title>Facing issue with Task complete event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175661#M128791</link>
      <description>I'm publishing some events to notify user about task completion whenever a task complete event is fired using task listener . I'm using formService.submitTaskFormData(taskId, formVariables); to complete the task. in some cases&amp;nbsp; after the compelte event is getting fired, task is not getting completed</description>
      <pubDate>Thu, 13 Mar 2014 16:24:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175661#M128791</guid>
      <dc:creator>ganeshr</dc:creator>
      <dc:date>2014-03-13T16:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue with Task complete event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175662#M128792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm afraid there is no built-in solution for this. After completing the task, it's possible that a load of other operations occur (service-tasks, …) in the same transaction. Only when the process reached a wait-state/async/process-end, the transaction will be comitted. The event you get when completing is indeed only valid if the transaction commits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a solution, I whould suggest keeping the task-ID (or whatever data you need) somewhere in a thread-local. Add a transaction-listener to the ongoing transaction (depends on your transaction implementation. For Spring, use a TransactionSynchronizationAdapter) that is called on commit and sends out any notifications at that moment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also piggy-back on the activiti generalisation of these listeners if you don't want to dig deep into transaction-management, see the class org.activiti.engine.impl.cfg.TransactionContext, which you can obtain an IMPL from by using org.activiti.engine.impl.interceptor.CommandContext.getTransactionContext(). The context allows adding a listener - Please note that this is "internal" activiti stuff and CAN change in the future. However, it's a safe bet to say that transaction-behaviour won't be very likely to change in the future &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 09:08:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175662#M128792</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-03-17T09:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue with Task complete event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175663#M128793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In case if we have next opertation like(Service task) after the user task and which is async. Can the user task transaction is commited after the complete event is fired eventhough if service task invocation fails?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is User task complete event fired after the task is completed or just before the task is about to be completed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 15:25:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175663#M128793</guid>
      <dc:creator>ganeshr</dc:creator>
      <dc:date>2014-03-17T15:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue with Task complete event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175664#M128794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If async point is encountered, the transaction is committed, with the listener firing included. It is only the service task that is handled async.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 11:33:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/facing-issue-with-task-complete-event/m-p/175664#M128794</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-03-24T11:33:41Z</dc:date>
    </item>
  </channel>
</rss>

