use of org.camunda.bpm.engine.rest.dto.history.HistoricCaseActivityInstanceDto in project camunda-bpm-platform by camunda.
the class HistoricCaseActivityInstanceRestServiceImpl method queryHistoricCaseActivityInstances.
public List<HistoricCaseActivityInstanceDto> queryHistoricCaseActivityInstances(HistoricCaseActivityInstanceQueryDto queryDto, Integer firstResult, Integer maxResults) {
HistoricCaseActivityInstanceQuery query = queryDto.toQuery(processEngine);
List<HistoricCaseActivityInstance> matchingHistoricCaseActivityInstances;
if (firstResult != null || maxResults != null) {
matchingHistoricCaseActivityInstances = executePaginatedQuery(query, firstResult, maxResults);
} else {
matchingHistoricCaseActivityInstances = query.list();
}
List<HistoricCaseActivityInstanceDto> historicCaseActivityInstanceResults = new ArrayList<HistoricCaseActivityInstanceDto>();
for (HistoricCaseActivityInstance historicCaseActivityInstance : matchingHistoricCaseActivityInstances) {
HistoricCaseActivityInstanceDto resultHistoricCaseActivityInstance = HistoricCaseActivityInstanceDto.fromHistoricCaseActivityInstance(historicCaseActivityInstance);
historicCaseActivityInstanceResults.add(resultHistoricCaseActivityInstance);
}
return historicCaseActivityInstanceResults;
}
Aggregations