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();
}
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;
}
Aggregations