return (HistoricVariableInstanceEntity) getDbSqlSession().selectOne("selectHistoricVariableInstanceByVariableInstanceId", variableInstanceId);
}
public void deleteHistoricVariableInstancesByTaskId(String taskId) {
if (getHistoryManager().isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
HistoricVariableInstanceQueryImpl historicProcessVariableQuery =
(HistoricVariableInstanceQueryImpl) new HistoricVariableInstanceQueryImpl().taskId(taskId);
List<HistoricVariableInstance> historicProcessVariables = historicProcessVariableQuery.list();
for(HistoricVariableInstance historicProcessVariable : historicProcessVariables) {
((HistoricVariableInstanceEntity) historicProcessVariable).delete();
}
}
}