@Override
public List<ExecutionDto> queryExecutions(
ExecutionQueryDto queryDto, Integer firstResult, Integer maxResults) {
ProcessEngine engine = getProcessEngine();
queryDto.setObjectMapper(getObjectMapper());
ExecutionQuery query = queryDto.toQuery(engine);
List<Execution> matchingExecutions;
if (firstResult != null || maxResults != null) {
matchingExecutions = executePaginatedQuery(query, firstResult, maxResults);
} else {
matchingExecutions = query.list();
}
List<ExecutionDto> executionResults = new ArrayList<ExecutionDto>();
for (Execution execution : matchingExecutions) {
ExecutionDto resultExecution = ExecutionDto.fromExecution(execution);