<?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 historyService: variables have revision # 0 all the time in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62423#M38940</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;I have a simple process with two script task in sequence. At process start, I pass in a variable x with value 4, in the first task, my script is x=x+1, in the second task x=x+2. If I look up the variable with historyService after the execution, revision is 0 at anytime:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ProcessInstance procInst = runtimeService.startProcessInstanceByKey(processDefinitionId, variables);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&amp;lt;HistoricDetail&amp;gt; variablesUpdateList = historyService.createHistoricDetailQuery().processInstanceId(procInst.getProcessInstanceId()).list();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (HistoricDetail histDet : variablesUpdateList){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HistoricVariableUpdate var = (HistoricVariableUpdate) histDet;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("Name: " + var.getVariableName() +" * Value: "+ var.getValue()+" * Revision: "+ var.getRevision() +" * Time: "+ var.getTime().getTime());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;has following output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Name: x * Wert: 4 * Revision: 0 * Time: 1313752726000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Name: x * Wert: 5.0 * Revision: 0 * Time: 1313752727000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Name: x * Wert: 7.0 * Revision: 0 * Time: 1313752727000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set the history level to 'full' in my config-file. If I query the database, history level is set to 3, which is correct in my opinion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is the timestamp always the same? Even if the process is very short-running, in my point of view, the timestamps should differ a little, or when is the timestamp set?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to query for the last value of my variables, so if the revision is always 0, is the returned list ordered? So the last list entry would always hold the latest value of the variable. What I want to achieve is to get the "output-variables" of my process this way, is there another solution for that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2011 11:36:33 GMT</pubDate>
    <dc:creator>gant</dc:creator>
    <dc:date>2011-08-19T11:36:33Z</dc:date>
    <item>
      <title>historyService: variables have revision # 0 all the time</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62423#M38940</link>
      <description>Hi,I have a simple process with two script task in sequence. At process start, I pass in a variable x with value 4, in the first task, my script is x=x+1, in the second task x=x+2. If I look up the variable with historyService after the execution, revision is 0 at anytime&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rocessInstance procInst =</description>
      <pubDate>Fri, 19 Aug 2011 11:36:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62423#M38940</guid>
      <dc:creator>gant</dc:creator>
      <dc:date>2011-08-19T11:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: historyService: variables have revision # 0 all the time</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62424#M38941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the revision is always zero since every insert is a new record. The timestamp accuracy is one second (the first one IS DIFFERENT)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 12:13:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62424#M38941</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-19T12:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: historyService: variables have revision # 0 all the time</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62425#M38942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so any other way, to get the latest value of a variable modified during processes? Is it possible to raise the accuracy of the timestamp, I think yes, but where?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 12:37:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62425#M38942</guid>
      <dc:creator>gant</dc:creator>
      <dc:date>2011-08-19T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: historyService: variables have revision # 0 all the time</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62426#M38943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;via the runtime service you'll get the latest version of the variable&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 19:59:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/historyservice-variables-have-revision-0-all-the-time/m-p/62426#M38943</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-19T19:59:59Z</dc:date>
    </item>
  </channel>
</rss>

