<?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 Suspend operation failed in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106599#M74612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was to suspend an process instance during the execution of a asynchronous service task, but the engine report the following exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecutionEntity was updated by another transaction concurrently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I debugged the engine, and find that the SuspendProcessInstanceCmd and the ExecutionJobCmd have different command contexts each of which has a persistence object cache itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The SuspendProcessInstanceCmd intend to get the execution entity from its own command context, in case of failure, it create an new ExecutionEntity instance from the database and flush it to the database on the end of the command, while in the same time, there is already an ExecutionEntity in the command context of ExecutionJobCmd. So, when the ExecutionJobCmd flushes the ExecutionEntity, the database would not do the update because it's not consistent with the record in the Execution table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I think maybe we can add an shared persistence object cache to each command context stack, and put the ExecutionEntity and other persistence objects that may need to be access by other commands in the shared cache. And all the persistence objects are flushed only by the command context that create it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this scalable?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Aug 2012 02:46:52 GMT</pubDate>
    <dc:creator>rainman</dc:creator>
    <dc:date>2012-08-31T02:46:52Z</dc:date>
    <item>
      <title>Suspend operation failed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106599#M74612</link>
      <description>Hi, allI was to suspend an process instance during the execution of a asynchronous service task, but the engine report the following exception:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecutionEntity was updated by another transaction concurrently.I debugged the engine, and find that the SuspendProcessInstanceCmd and the Execu</description>
      <pubDate>Fri, 31 Aug 2012 02:46:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106599#M74612</guid>
      <dc:creator>rainman</dc:creator>
      <dc:date>2012-08-31T02:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend operation failed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106600#M74613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Won't this already work if you have a transaction managed outside the engine? E.g. Using a jta transactionmanager? There will be no commit then in each command executed and thus no clashes?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2012 14:14:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106600#M74613</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-09-01T14:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend operation failed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106601#M74614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 00:58:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106601#M74614</guid>
      <dc:creator>rainman</dc:creator>
      <dc:date>2012-09-03T00:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend operation failed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106602#M74615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Won't this already work if you have a transaction managed outside the engine? E.g. Using a jta transactionmanager? There will be no commit then in each command executed and thus no clashes?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Sir, did you mean use "JtaProcessEngineConfiguration"?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 02:34:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106602#M74615</guid>
      <dc:creator>rainman</dc:creator>
      <dc:date>2012-09-03T02:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend operation failed</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106603#M74616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your service task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Context.getCommandContext()&lt;BR /&gt;&amp;nbsp;&amp;nbsp; .execute(new SuspendProcessInstanceCmd(…));&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;this allows you to combine both commands into a single command context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;–&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wat Ronald suggests is that if you use a thread-aware transaction and connection propagation mechanism like JTA or Spring transactions, the "inner" command will not open a new DB connection but reuse the connection already obtained by the "outer" command, since it is bound to the thread.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 09:44:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/suspend-operation-failed/m-p/106603#M74616</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2012-09-03T09:44:29Z</dc:date>
    </item>
  </channel>
</rss>

