AnsweredAssumed Answered

History Service Variable Update

Question asked by boulif18 on Apr 11, 2014
Latest reply on May 31, 2016 by jbarrez
I would like modify variableUpdates with historyService in JAVA.

I can gather all variable of tasks of a process instance


List<HistoricTaskInstance> historicTasks = historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstanceId).list();
HashMap<String, List<HistoricDetail>> historicTaskDetails = new HashMap<String, List<HistoricDetail>>();
      for (HistoricTaskInstance historicTask : historicTasks) {
         historicTaskDetails.put(historicTask.getId(), historyService.createHistoricDetailQuery().taskId(historicTask.getId()).list());
      }
   
      for(Entry<String, List<HistoricDetail>> entry : historicTaskDetails.entrySet()) {
          key = entry.getKey();
          List<HistoricDetail> listTaskDetail = entry.getValue();
          for (int iteration = 0; iteration<listTaskDetail.size(); iteration++) {
             HistoricVariableUpdate historicVariableUpdate = (HistoricVariableUpdate) listTaskDetail.get(iteration);
             variableName = historicVariableUpdate.getVariableName();
          }
      }

How can i modify an historicVariableUpdate ?

Thanks

Outcomes