use of org.camunda.bpm.engine.rest.dto.history.HistoricVariableInstanceDto in project camunda-bpm-platform by camunda.
the class HistoricVariableInstanceRestServiceImpl method queryHistoricVariableInstances.
@Override
public List<HistoricVariableInstanceDto> queryHistoricVariableInstances(HistoricVariableInstanceQueryDto queryDto, Integer firstResult, Integer maxResults, boolean deserializeObjectValues) {
queryDto.setObjectMapper(objectMapper);
HistoricVariableInstanceQuery query = queryDto.toQuery(processEngine);
query.disableBinaryFetching();
if (!deserializeObjectValues) {
query.disableCustomObjectDeserialization();
}
List<HistoricVariableInstance> matchingHistoricVariableInstances;
if (firstResult != null || maxResults != null) {
matchingHistoricVariableInstances = executePaginatedQuery(query, firstResult, maxResults);
} else {
matchingHistoricVariableInstances = query.list();
}
List<HistoricVariableInstanceDto> historicVariableInstanceDtoResults = new ArrayList<HistoricVariableInstanceDto>();
for (HistoricVariableInstance historicVariableInstance : matchingHistoricVariableInstances) {
HistoricVariableInstanceDto resultHistoricVariableInstance = HistoricVariableInstanceDto.fromHistoricVariableInstance(historicVariableInstance);
historicVariableInstanceDtoResults.add(resultHistoricVariableInstance);
}
return historicVariableInstanceDtoResults;
}
Aggregations