<?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: Activiti process variable version and Optimistic Locking Exception in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167125#M120673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you share the kind of serializable class you're using? Are you 100% sure that the serialised form of one instance of such a variable is consistent across multiple saves, when NO instance values are changes? Because, when such a variable is loaded from the context, it's temporarily kept "under a close eye" of the engine. When the context closes (so when all variables/tasks have been gathered and are about to be returned from the .list() call on the query) the actual serialised byte-array is compared with the existing one. In case they have changed, an update will be done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure that the serialisable value marks all irrelevant fields as "private transient" and that no funny stuff happens &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, 27 Jan 2014 09:03:13 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2014-01-27T09:03:13Z</dc:date>
    <item>
      <title>Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167121#M120669</link>
      <description>I totally understand to avoid multiple thread concurrently access the same variable is necessary.But in my case, I found some weird behavior of the optimistic locking system.I found that when I have a program issue an Task Query like this: taskService.createTaskQuery().taskAssignee("SomeGuy").includ</description>
      <pubDate>Mon, 27 Jan 2014 04:11:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167121#M120669</guid>
      <dc:creator>silverhoof1</dc:creator>
      <dc:date>2014-01-27T04:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167122#M120670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And I have multiple variables in the process instance, only one of them's version is getting upgraded each time I call:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;Task&amp;gt; tasks =&amp;nbsp; taskService.createTaskQuery().taskId("xxxxx").includeProcessVariables().list()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is very very weird!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:38:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167122#M120670</guid>
      <dc:creator>silverhoof1</dc:creator>
      <dc:date>2014-01-27T08:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167123#M120671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So you get a variable-update when doing a query? That's indeed strange… I'll take a look, having write-operations in a query is not good. I'll keep you posted on the progress.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:49:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167123#M120671</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-27T08:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167124#M120672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes, I have a simple test case just do the call:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; @Test&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; @Rollback(true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; public void testFetchWithVar(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; List&amp;lt;Task&amp;gt; tasks =&amp;nbsp; taskService.createTaskQuery().taskId("19063").includeProcessVariables().list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And even rollback is set to true, the version is still upgraded…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Very confusing behavior and totally not acceptable because a lot of client may open their task list UI and will call this concurrently which may result in Optimistic Lock Error. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 09:00:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167124#M120672</guid>
      <dc:creator>silverhoof1</dc:creator>
      <dc:date>2014-01-27T09:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167125#M120673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you share the kind of serializable class you're using? Are you 100% sure that the serialised form of one instance of such a variable is consistent across multiple saves, when NO instance values are changes? Because, when such a variable is loaded from the context, it's temporarily kept "under a close eye" of the engine. When the context closes (so when all variables/tasks have been gathered and are about to be returned from the .list() call on the query) the actual serialised byte-array is compared with the existing one. In case they have changed, an update will be done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure that the serialisable value marks all irrelevant fields as "private transient" and that no funny stuff happens &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, 27 Jan 2014 09:03:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167125#M120673</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-27T09:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167126#M120674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a HashMap in that Serializable object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Will this cause the problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 09:37:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167126#M120674</guid>
      <dc:creator>silverhoof1</dc:creator>
      <dc:date>2014-01-27T09:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167127#M120675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's indeed an issue. Hashmap uses keys that are based on the virtual adress of an object (hashkey) in the VM. In case this gets serialised/deserialized, the hashes for the keys will likely change, resulting in a "different" byte-stream in the end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the use case of having a map persisted?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 09:49:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167127#M120675</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-27T09:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167128#M120676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I make the map transient. When I deserialize old one from process variable. What will happen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A new instance of the new version of the class get created and reserialized without the HashMap field and persist to that process variable? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 10:02:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167128#M120676</guid>
      <dc:creator>silverhoof1</dc:creator>
      <dc:date>2014-01-27T10:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167129#M120677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The main question is WHY you want to have a hashmap as a variable? If you want to store key-values pairs, why not just use seperate variables? If you want to store a key-value-mapping, make sure you use a map-implementation that WILL NOT change any serialized bytes, when not changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you really want key-value stored in a single variable, I suggest using a JSON-string (stored as a byte-array)…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 10:13:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167129#M120677</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-28T10:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti process variable version and Optimistic Locking Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167130#M120678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks… I was running in the same issue, problem solved, +1 for you answer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 17:23:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-process-variable-version-and-optimistic-locking/m-p/167130#M120678</guid>
      <dc:creator>hrobayo</dc:creator>
      <dc:date>2014-07-02T17:23:01Z</dc:date>
    </item>
  </channel>
</rss>

