code: @Override
    public void recordProcessDefinitionChange(String processInstanceId, String processDefinitionId) {
      if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
        HistoricProcessInstanceEntity historicProcessInstance = getHistoricProcessInstanceEntityManager().findById(processInstanceId);
        if (historicProcessInstance != null) {
          historicProcessInstance.setProcessDefinitionId(processDefinitionId);
        }
      }
    }
docs: /*
  (non-Javadoc)
  
  @see org.activiti.engine.impl.history.HistoryManagerInterface# recordProcessDefinitionChange(java.lang.String, java.lang.String)