Search in sources :

Example 1 with CleanableHistoricProcessInstanceReportDto

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

the class HistoricProcessDefinitionRestServiceImpl method getCleanableHistoricProcessInstanceReport.

@Override
public List<CleanableHistoricProcessInstanceReportResultDto> getCleanableHistoricProcessInstanceReport(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
    CleanableHistoricProcessInstanceReportDto queryDto = new CleanableHistoricProcessInstanceReportDto(objectMapper, uriInfo.getQueryParameters());
    CleanableHistoricProcessInstanceReport query = queryDto.toQuery(processEngine);
    List<CleanableHistoricProcessInstanceReportResult> reportResult;
    if (firstResult != null || maxResults != null) {
        reportResult = executePaginatedQuery(query, firstResult, maxResults);
    } else {
        reportResult = query.list();
    }
    return CleanableHistoricProcessInstanceReportResultDto.convert(reportResult);
}
Also used : CleanableHistoricProcessInstanceReportResult(org.camunda.bpm.engine.history.CleanableHistoricProcessInstanceReportResult) CleanableHistoricProcessInstanceReportDto(org.camunda.bpm.engine.rest.dto.history.CleanableHistoricProcessInstanceReportDto) CleanableHistoricProcessInstanceReport(org.camunda.bpm.engine.history.CleanableHistoricProcessInstanceReport)

Example 2 with CleanableHistoricProcessInstanceReportDto

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

the class HistoricProcessDefinitionRestServiceImpl method getCleanableHistoricProcessInstanceReportCount.

@Override
public CountResultDto getCleanableHistoricProcessInstanceReportCount(UriInfo uriInfo) {
    CleanableHistoricProcessInstanceReportDto queryDto = new CleanableHistoricProcessInstanceReportDto(objectMapper, uriInfo.getQueryParameters());
    queryDto.setObjectMapper(objectMapper);
    CleanableHistoricProcessInstanceReport query = queryDto.toQuery(processEngine);
    long count = query.count();
    CountResultDto result = new CountResultDto();
    result.setCount(count);
    return result;
}
Also used : CountResultDto(org.camunda.bpm.engine.rest.dto.CountResultDto) CleanableHistoricProcessInstanceReportDto(org.camunda.bpm.engine.rest.dto.history.CleanableHistoricProcessInstanceReportDto) CleanableHistoricProcessInstanceReport(org.camunda.bpm.engine.history.CleanableHistoricProcessInstanceReport)

Aggregations

CleanableHistoricProcessInstanceReport (org.camunda.bpm.engine.history.CleanableHistoricProcessInstanceReport)2 CleanableHistoricProcessInstanceReportDto (org.camunda.bpm.engine.rest.dto.history.CleanableHistoricProcessInstanceReportDto)2 CleanableHistoricProcessInstanceReportResult (org.camunda.bpm.engine.history.CleanableHistoricProcessInstanceReportResult)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1