AnsweredAssumed Answered

ExecutionId differs for task from taskservice versus historyService

Question asked by christianscheer on Mar 30, 2015
Latest reply on Apr 7, 2015 by jbarrez
I get a different executionId for the same task, depending on my type of query.

List<Task> tasks = taskService.createTaskQuery().taskAssignee(userName).list();
//no, that "9" is not hard coded.
tasks.get(9).getId() // 36033
tasks.get(9).getExecutionId // 33107

Task task = historyService.createHistoricTaskInstanceQuery().taskId(36033).singleResult();
task.getExecutionId // 36028


Activiti Version is 5.16.4, but i think the few task concerned by this where created before we upgraded. The old version was 5.14.
The history-property is not configured, so i guess it's 'audit'.

Is this indented and i have understood something wrong?
Or did i stumple upon a bug or use the Activiti API wrong?

I will happily provide more information if needed, but my understanding so far is, that the executionId should match.

SQL:
<blockcode>
select ID_,EXECUTION_ID_ from act_hi_taskinst where id_ = 36033;
->36033, 36028

select ID_,EXECUTION_ID_ from act_ru_task where id_ = 36033;
-> 36033, 33107
</blockcode>

Outcomes