cancel
Showing results for 
Search instead for 
Did you mean: 

ACT_HI_VARINST table - TASK_ID_

lixkid
Champ in-the-making
Champ in-the-making
Hi,

My goal is to get all HistoricVariableInstances with specific taskId from ACT_HI_VARINST table, but every row in that table (which represents HistoricVariableInstance) is set to NULL.

Is there a way to associate process variable with a task which might result in TASK_ID_ (in table ACT_HI_VARINST) column being set to appropriate value?

I'm using Activiti Engine 5.11.

4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
What is your history level? For variable history, you need to set it higher than default.

lixkid
Champ in-the-making
Champ in-the-making
What is your history level? For variable history, you need to set it higher than default.

Even after I changed property "history" (in the definition of processEngineConfiguration bean in activiti.cfg.xml) by setting it to "full" with the following code:
<code>
<bean id="processEngineConfiguration" class="org.activiti.cdi.CdiJtaProcessEngineConfiguration">
   …
   <property name="history" value="full" />
   …
</bean>
</code>

values in column TASK_ID_ (table ACT_HI_VARINST) are set to NULL.

Do you please have any other suggestions?

lixkid
Champ in-the-making
Champ in-the-making
I have found a solution to my problem in  this post .

In order for task id to be saved in TASK_ID_ column (table ACT_HI_VARINST), it needs to be associated with process variables by using the following code:
<code>
taskService.setVariablesLocal(task.getId(), vars);
</code>

frederikherema1
Star Contributor
Star Contributor
Thanks for sharing the solution!