<?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 How to use 'HistoricTaskInstance.getTaskLocalVariables' in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171662#M124902</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;In Activiti v5.13, I can't task local values using "HistoricTaskInstance.getTaskLocalVariables()".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; HistoricTaskInstance histTask =&amp;nbsp; historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();&lt;BR /&gt;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; locValues = histTask.getTaskLocalVariables(); // locValues is Empty!!&lt;BR /&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In HistoricTaskInstanceEntity.getTaskLocalVariables(), it seems that "queryVariables" is null. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Oct 2013 02:23:40 GMT</pubDate>
    <dc:creator>tamutamu</dc:creator>
    <dc:date>2013-10-22T02:23:40Z</dc:date>
    <item>
      <title>How to use 'HistoricTaskInstance.getTaskLocalVariables'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171662#M124902</link>
      <description>Hi,In Activiti v5.13, I can't task local values using "HistoricTaskInstance.getTaskLocalVariables()".&amp;nbsp; HistoricTaskInstance histTask =&amp;nbsp; historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();&amp;nbsp; Map&amp;lt;String, Object&amp;gt; locValues = histTask.getTaskLocalVariables(); // locValue</description>
      <pubDate>Tue, 22 Oct 2013 02:23:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171662#M124902</guid>
      <dc:creator>tamutamu</dc:creator>
      <dc:date>2013-10-22T02:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'HistoricTaskInstance.getTaskLocalVariables'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171663#M124903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi tamutamu,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It depends on whether the variables are saved with &amp;lt;code&amp;gt;task.setVariable()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;task.setVariableLocal()&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this post can help you. It's about the scope of variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.activiti.org/content/does-taskvariablevalueequals-method-does-not-work" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/content/does-taskvariablevalueequals-method-does-not-work&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 06:38:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171663#M124903</guid>
      <dc:creator>aitor</dc:creator>
      <dc:date>2013-10-22T06:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'HistoricTaskInstance.getTaskLocalVariables'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171664#M124904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks aitor!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I read &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/content/does-taskvariablevalueequals-method-does-not-work" rel="nofollow noopener noreferrer"&gt;that post&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But, I have not obtain the expected results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does'nt &amp;lt;code&amp;gt;Task&amp;lt;/code&amp;gt; interface have &amp;lt;code&amp;gt;setVariable()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setVariableLocal()&amp;lt;/code&amp;gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;TaskService&amp;lt;/code&amp;gt; interface has &amp;lt;code&amp;gt;setVariable()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setVariableLocal()&amp;lt;/code&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since &amp;lt;code&amp;gt;HistoryService&amp;lt;/code&amp;gt; also does'nt have &amp;lt;code&amp;gt;setVariable()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setVariableLocal()&amp;lt;/code&amp;gt;, I tried to use &amp;lt;code&amp;gt;TaksService.setVariableLocal()&amp;lt;/code&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below Code, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;　Map&amp;lt;String, Object&amp;gt; inVarMap = new HashMap&amp;lt;String, Object&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;　inVarMap.put("VAL", "val");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;　taskService.setVariablesLocal(taskId, inVarMap);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;　Map&amp;lt;String, Object&amp;gt; outVarMap = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskService.createTaskQuery().taskId(taskId).singleResult().getTaskLocalVariables();&amp;nbsp; // But outVarMap is Empty!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However it does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is This Code wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After ｒun the above code,&amp;nbsp; &amp;lt;code&amp;gt;VAL&amp;lt;/code&amp;gt; value is stored in Table &amp;lt;code&amp;gt;ACT_RU_VARIABLE&amp;lt;/code&amp;gt;, and the value of &amp;lt;code&amp;gt;Task_ID_&amp;lt;/code&amp;gt; field is exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your advice.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 04:44:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171664#M124904</guid>
      <dc:creator>tamutamu</dc:creator>
      <dc:date>2013-10-24T04:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'HistoricTaskInstance.getTaskLocalVariables'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171665#M124905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi tamutamu.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't want to ask you silly questions. The can be many reasons (is History turned on, did you use historyService.createHistoricTaskInstanceQuery().includeTaskLocalVariables() …..?) The best way could be to create jUnit test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.activiti.org/content/sticky-how-write-unit-test" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/content/sticky-how-write-unit-test&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:51:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171665#M124905</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2013-10-24T19:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use 'HistoricTaskInstance.getTaskLocalVariables'</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171666#M124906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks martin.grofcik!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Explanation is insufficient, and I'm sorry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found the cause.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't use &amp;lt;code&amp;gt;includeTaskLocalVariables&amp;lt;/code&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;HistoricTaskInstance.getTaskLocalVariables&amp;lt;/code&amp;gt; javadoc「if requested 」, it is to call includeTaskLocalVariables in task query, isn't it. I wasn't able to notice that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and best regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 04:39:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-historictaskinstance-gettasklocalvariables/m-p/171666#M124906</guid>
      <dc:creator>tamutamu</dc:creator>
      <dc:date>2013-10-28T04:39:18Z</dc:date>
    </item>
  </channel>
</rss>

