/**
* Record task definition key change, if audit history is enabled.
*/
public void recordTaskDefinitionKeyChange(String taskId, String taskDefinitionKey) {
if (isHistoryLevelAtLeast(HistoryLevel.AUDIT)) {
HistoricTaskInstanceEntity historicTaskInstance = getDbSqlSession().selectById(HistoricTaskInstanceEntity.class, taskId);
if (historicTaskInstance!=null) {
historicTaskInstance.setTaskDefinitionKey(taskDefinitionKey);
}
}
}