Search in sources :

Example 1 with HistoricExternalTaskLogDto

use of org.camunda.bpm.engine.rest.dto.history.HistoricExternalTaskLogDto in project camunda-bpm-platform by camunda.

the class HistoricExternalTaskLogRestServiceImpl method queryHistoricExternalTaskLogs.

@Override
public List<HistoricExternalTaskLogDto> queryHistoricExternalTaskLogs(HistoricExternalTaskLogQueryDto queryDto, Integer firstResult, Integer maxResults) {
    queryDto.setObjectMapper(objectMapper);
    HistoricExternalTaskLogQuery query = queryDto.toQuery(processEngine);
    List<HistoricExternalTaskLog> matchingHistoricExternalTaskLogs;
    if (firstResult != null || maxResults != null) {
        matchingHistoricExternalTaskLogs = executePaginatedQuery(query, firstResult, maxResults);
    } else {
        matchingHistoricExternalTaskLogs = query.list();
    }
    List<HistoricExternalTaskLogDto> results = new ArrayList<HistoricExternalTaskLogDto>();
    for (HistoricExternalTaskLog historicExternalTaskLog : matchingHistoricExternalTaskLogs) {
        HistoricExternalTaskLogDto result = HistoricExternalTaskLogDto.fromHistoricExternalTaskLog(historicExternalTaskLog);
        results.add(result);
    }
    return results;
}
Also used : ArrayList(java.util.ArrayList) HistoricExternalTaskLog(org.camunda.bpm.engine.history.HistoricExternalTaskLog) HistoricExternalTaskLogQuery(org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery) HistoricExternalTaskLogDto(org.camunda.bpm.engine.rest.dto.history.HistoricExternalTaskLogDto)

Aggregations

ArrayList (java.util.ArrayList)1 HistoricExternalTaskLog (org.camunda.bpm.engine.history.HistoricExternalTaskLog)1 HistoricExternalTaskLogQuery (org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery)1 HistoricExternalTaskLogDto (org.camunda.bpm.engine.rest.dto.history.HistoricExternalTaskLogDto)1