use of org.camunda.bpm.engine.rest.dto.history.HistoricTaskInstanceDto in project camunda-bpm-platform by camunda.
the class HistoricTaskInstanceRestServiceImpl method queryHistoricTaskInstances.
@Override
public List<HistoricTaskInstanceDto> queryHistoricTaskInstances(HistoricTaskInstanceQueryDto queryDto, Integer firstResult, Integer maxResults) {
queryDto.setObjectMapper(objectMapper);
HistoricTaskInstanceQuery query = queryDto.toQuery(processEngine);
List<HistoricTaskInstance> match;
if (firstResult != null || maxResults != null) {
match = executePaginatedQuery(query, firstResult, maxResults);
} else {
match = query.list();
}
List<HistoricTaskInstanceDto> result = new ArrayList<HistoricTaskInstanceDto>();
for (HistoricTaskInstance taskInstance : match) {
HistoricTaskInstanceDto taskInstanceDto = HistoricTaskInstanceDto.fromHistoricTaskInstance(taskInstance);
result.add(taskInstanceDto);
}
return result;
}
Aggregations