<?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: Manual DB commit in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153549#M108129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You cannot do this. Every API-call has it's own command-context. At the end, the changes to the entities are flushed. Most of the times, transactions is also committed right after that, unless participating in an existing container-managed transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you add "async" to an activity, all progress up until that point will be saved to the database, job will be queued and transaction will be committed BEFORE control is returned to calling thread that did the API-call, causing the process to flow to that activity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is just how it works. You can't persists state in the DB unless activiti is certain that is consistent and can be continued at a later point in time (eg. after task complete, after timer fire, …) - exactly the reason why we don't allow forcing commits to the DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the usecase for this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 10:34:45 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2014-04-22T10:34:45Z</dc:date>
    <item>
      <title>Manual DB commit</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153548#M108128</link>
      <description>Hi,Is there anyway to commit the Activiti related state at any particular point in the code execution without reaching wait state?I tried 'Asynchronous' and timer event but it didnot commit to the state to DB. Is there a API method where we can achieve it from java code?Thanks.</description>
      <pubDate>Wed, 16 Apr 2014 04:21:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153548#M108128</guid>
      <dc:creator>krpraghu</dc:creator>
      <dc:date>2014-04-16T04:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Manual DB commit</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153549#M108129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You cannot do this. Every API-call has it's own command-context. At the end, the changes to the entities are flushed. Most of the times, transactions is also committed right after that, unless participating in an existing container-managed transaction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you add "async" to an activity, all progress up until that point will be saved to the database, job will be queued and transaction will be committed BEFORE control is returned to calling thread that did the API-call, causing the process to flow to that activity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is just how it works. You can't persists state in the DB unless activiti is certain that is consistent and can be continued at a later point in time (eg. after task complete, after timer fire, …) - exactly the reason why we don't allow forcing commits to the DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the usecase for this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 10:34:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153549#M108129</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-04-22T10:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Manual DB commit</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153550#M108130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So only way to commit the current instance is to reach a wait state in an activiti flow, makes sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was trying to achieve this through timer event, but it didnt work. Let me try again and see if that works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 19:51:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/manual-db-commit/m-p/153550#M108130</guid>
      <dc:creator>krpraghu</dc:creator>
      <dc:date>2014-04-25T19:51:35Z</dc:date>
    </item>
  </channel>
</rss>

