use of org.camunda.bpm.engine.impl.persistence.entity.HistoricDetailVariableInstanceUpdateEntity in project camunda-bpm-platform by camunda.
the class TaskServiceTest method checkHistoricVariableUpdateEntity.
private void checkHistoricVariableUpdateEntity(String variableName, String processInstanceId) {
if (processEngineConfiguration.getHistoryLevel().getId() == ProcessEngineConfigurationImpl.HISTORYLEVEL_FULL) {
boolean deletedVariableUpdateFound = false;
List<HistoricDetail> resultSet = historyService.createHistoricDetailQuery().processInstanceId(processInstanceId).list();
for (HistoricDetail currentHistoricDetail : resultSet) {
assertTrue(currentHistoricDetail instanceof HistoricDetailVariableInstanceUpdateEntity);
HistoricDetailVariableInstanceUpdateEntity historicVariableUpdate = (HistoricDetailVariableInstanceUpdateEntity) currentHistoricDetail;
if (historicVariableUpdate.getName().equals(variableName)) {
if (historicVariableUpdate.getValue() == null) {
if (deletedVariableUpdateFound) {
fail("Mismatch: A HistoricVariableUpdateEntity with a null value already found");
} else {
deletedVariableUpdateFound = true;
}
}
}
}
assertTrue(deletedVariableUpdateFound);
}
}
use of org.camunda.bpm.engine.impl.persistence.entity.HistoricDetailVariableInstanceUpdateEntity in project camunda-bpm-platform by camunda.
the class HistoricDetailQueryImpl method executeList.
public List<HistoricDetail> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
List<HistoricDetail> historicDetails = commandContext.getHistoricDetailManager().findHistoricDetailsByQueryCriteria(this, page);
if (historicDetails != null) {
for (HistoricDetail historicDetail : historicDetails) {
if (historicDetail instanceof HistoricDetailVariableInstanceUpdateEntity) {
HistoricDetailVariableInstanceUpdateEntity entity = (HistoricDetailVariableInstanceUpdateEntity) historicDetail;
if (shouldFetchValue(entity)) {
try {
entity.getTypedValue(isCustomObjectDeserializationEnabled);
} catch (Exception t) {
// do not fail if one of the variables fails to load
LOG.exceptionWhileGettingValueForVariable(t);
}
}
}
}
}
return historicDetails;
}
use of org.camunda.bpm.engine.impl.persistence.entity.HistoricDetailVariableInstanceUpdateEntity in project camunda-bpm-platform by camunda.
the class RuntimeServiceTest method checkHistoricVariableUpdateEntity.
private void checkHistoricVariableUpdateEntity(String variableName, String processInstanceId) {
if (processEngineConfiguration.getHistoryLevel().equals(HistoryLevel.HISTORY_LEVEL_FULL)) {
boolean deletedVariableUpdateFound = false;
List<HistoricDetail> resultSet = historyService.createHistoricDetailQuery().processInstanceId(processInstanceId).list();
for (HistoricDetail currentHistoricDetail : resultSet) {
assertTrue(currentHistoricDetail instanceof HistoricDetailVariableInstanceUpdateEntity);
HistoricDetailVariableInstanceUpdateEntity historicVariableUpdate = (HistoricDetailVariableInstanceUpdateEntity) currentHistoricDetail;
if (historicVariableUpdate.getName().equals(variableName)) {
if (historicVariableUpdate.getValue() == null) {
if (deletedVariableUpdateFound) {
fail("Mismatch: A HistoricVariableUpdateEntity with a null value already found");
} else {
deletedVariableUpdateFound = true;
}
}
}
}
assertTrue(deletedVariableUpdateFound);
}
}
Aggregations