Bug in treatment of HistoricDetail (VariableUpdate type)

Description

Hello,

I found a bug in the treatment of HistoricDetail (VariableUpdate type) in later versions to 5.16.4.
It is occours when I store variables in a UserTask with "processEngine.getTaskService().setVariable()", without completing the UserTask.

If I store variables with:
processEngine.getTaskService().setVariable(taskId, "var_1", "this is a save var");
With activiti 5.19.0.2. In the database. ACT_HI_DETAIL table: the "ACT_INST_ID_" field is null.
With activiti 5.16.4 the field has the correct value (the ID of the activity).

I attached two JUnit tests to prove it: activiti-unit-test-hcovardetail_5.16.4_OK.zip and activiti-unit-test-hcovardetail_5.19.0.2_FAIL.zip

Thanks.

Environment

None

Status

Assignee

Joram Barrez

Reporter

Aitor Rodríguez

Labels

Components

Affects versions

5.18
5.19
5.17

Priority

High
Configure