use of org.camunda.bpm.engine.rest.dto.history.HistoricDecisionInstanceDto in project camunda-bpm-platform by camunda.
the class HistoricDecisionInstanceRestServiceImpl method queryHistoricDecisionInstances.
public List<HistoricDecisionInstanceDto> queryHistoricDecisionInstances(HistoricDecisionInstanceQueryDto queryDto, Integer firstResult, Integer maxResults) {
HistoricDecisionInstanceQuery query = queryDto.toQuery(processEngine);
List<HistoricDecisionInstance> matchingHistoricDecisionInstances;
if (firstResult != null || maxResults != null) {
matchingHistoricDecisionInstances = executePaginatedQuery(query, firstResult, maxResults);
} else {
matchingHistoricDecisionInstances = query.list();
}
List<HistoricDecisionInstanceDto> historicDecisionInstanceDtoResults = new ArrayList<HistoricDecisionInstanceDto>();
for (HistoricDecisionInstance historicDecisionInstance : matchingHistoricDecisionInstances) {
HistoricDecisionInstanceDto resultHistoricDecisionInstanceDto = HistoricDecisionInstanceDto.fromHistoricDecisionInstance(historicDecisionInstance);
historicDecisionInstanceDtoResults.add(resultHistoricDecisionInstanceDto);
}
return historicDecisionInstanceDtoResults;
}
Aggregations