AnsweredAssumed Answered

Request historic task variables is empty

Question asked by dominik.eisenberg on Jun 13, 2013
Latest reply on Sep 4, 2013 by frederikheremans1


i tried to request variables of completed user tasks, but allways get an empty list, when executing:

List<HistoricVariableInstance> variables = historyService.createHistoricVariableInstanceQuery().taskId(historicTask.getId()).list();

Using the taskService dows not work for historic tasks. This will cause an error:

  Map<String, Object> variables2 = taskService.getVariables(historicTask.getId());

What i did, to store the variables:

  taskService.setVariables(taskId, parameterMap);
  Map<String, Object> variablesToVerify = taskService.getVariables(taskId);

Directly after storing the variables, i could verify, they have been saved, because the variables are included in [variablesToVerify]

Does anyone know, how to request variables of historic tasks? Do i have to use a native query? Can someone help me with the native SQL query?