<?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 Why is the TASK_CREATED event sent before flushing the tasks to the DB? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/why-is-the-task-created-event-sent-before-flushing-the-tasks-to/m-p/206059#M159189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a listener for TASK_CREATED events that triggers some work to be done in our application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As we need some custom info besides the given by the Activiti tasks, we have a DB table with those attributes and a reference to the Activiti task IDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Usually it works fine but sometimes we have errors because the task is inserted in our table (as a consequence of receiving the TASK_CREATED event) but it is not flushed to the Activiti task DB table due to an Activiti exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This exception makes Activiti rollback the task creation transaction and so, when we search for it in Activiti using the Task Service it always returns null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Was the event dispatching mechanism designed to be this "optimistic" or is this a bug? Is there a way to capture TASK_CREATED events only after the tasks are flushed into the Activiti DB?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2015 17:20:23 GMT</pubDate>
    <dc:creator>jfelix</dc:creator>
    <dc:date>2015-04-21T17:20:23Z</dc:date>
    <item>
      <title>Why is the TASK_CREATED event sent before flushing the tasks to the DB?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-is-the-task-created-event-sent-before-flushing-the-tasks-to/m-p/206059#M159189</link>
      <description>Hi, We have a listener for TASK_CREATED events that triggers some work to be done in our application.As we need some custom info besides the given by the Activiti tasks, we have a DB table with those attributes and a reference to the Activiti task IDs.Usually it works fine but sometimes we have erro</description>
      <pubDate>Tue, 21 Apr 2015 17:20:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-is-the-task-created-event-sent-before-flushing-the-tasks-to/m-p/206059#M159189</guid>
      <dc:creator>jfelix</dc:creator>
      <dc:date>2015-04-21T17:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the TASK_CREATED event sent before flushing the tasks to the DB?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-is-the-task-created-event-sent-before-flushing-the-tasks-to/m-p/206060#M159190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi João,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that DB flush optimizes insert/deletes. I think this was done because of that. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 06:28:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-is-the-task-created-event-sent-before-flushing-the-tasks-to/m-p/206060#M159190</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2015-04-22T06:28:02Z</dc:date>
    </item>
  </channel>
</rss>

