Search in sources :

Example 1 with ReportResult

use of org.camunda.bpm.engine.history.ReportResult in project camunda-bpm-platform by camunda.

the class ReportResultToCsvConverter method convertDurationReportResult.

protected static String convertDurationReportResult(List<ReportResult> reports) {
    StringBuffer buffer = new StringBuffer();
    buffer.append(DURATION_HEADER);
    for (ReportResult report : reports) {
        DurationReportResult durationReport = (DurationReportResult) report;
        buffer.append(NEW_LINE_SEPARATOR);
        buffer.append(durationReport.getPeriod());
        buffer.append(DELIMITER);
        buffer.append(durationReport.getPeriodUnit().toString());
        buffer.append(DELIMITER);
        buffer.append(durationReport.getMinimum());
        buffer.append(DELIMITER);
        buffer.append(durationReport.getMaximum());
        buffer.append(DELIMITER);
        buffer.append(durationReport.getAverage());
    }
    return buffer.toString();
}
Also used : DurationReportResult(org.camunda.bpm.engine.history.DurationReportResult) ReportResult(org.camunda.bpm.engine.history.ReportResult) DurationReportResult(org.camunda.bpm.engine.history.DurationReportResult)

Example 2 with ReportResult

use of org.camunda.bpm.engine.history.ReportResult in project camunda-bpm-platform by camunda.

the class HistoricProcessInstanceRestServiceImpl method getReportResultAsJson.

protected List<ReportResultDto> getReportResultAsJson(UriInfo uriInfo) {
    List<ReportResult> reports = queryHistoricProcessInstanceReport(uriInfo);
    List<ReportResultDto> result = new ArrayList<ReportResultDto>();
    for (ReportResult report : reports) {
        result.add(ReportResultDto.fromReportResult(report));
    }
    return result;
}
Also used : ReportResultDto(org.camunda.bpm.engine.rest.dto.history.ReportResultDto) ArrayList(java.util.ArrayList) ReportResult(org.camunda.bpm.engine.history.ReportResult)

Aggregations

ReportResult (org.camunda.bpm.engine.history.ReportResult)2 ArrayList (java.util.ArrayList)1 DurationReportResult (org.camunda.bpm.engine.history.DurationReportResult)1 ReportResultDto (org.camunda.bpm.engine.rest.dto.history.ReportResultDto)1