docs: @Override
    public void recordVariableUpdate(VariableInstanceEntity variable) {
      if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
        HistoricVariableInstanceEntity historicProcessVariable = getEntityCache().findInCache(HistoricVariableInstanceEntity.class, variable.getId());
        if (historicProcessVariable == null) {
          historicProcessVariable = getHistoricVariableInstanceEntityManager().findHistoricVariableInstanceByVariableInstanceId(variable.getId());
        }
  
        if (historicProcessVariable != null) {
          getHistoricVariableInstanceEntityManager().copyVariableValue(historicProcessVariable, variable);
        } else {
          getHistoricVariableInstanceEntityManager().copyAndInsert(variable);
        }
      }
    }