Search in sources :

Example 21 with DurationReportResult

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

the class ReportResultDto method fromReportResult.

public static ReportResultDto fromReportResult(ReportResult reportResult) {
    ReportResultDto dto = null;
    if (reportResult instanceof DurationReportResult) {
        DurationReportResult durationReport = (DurationReportResult) reportResult;
        dto = DurationReportResultDto.fromDurationReportResult(durationReport);
    }
    dto.period = reportResult.getPeriod();
    dto.periodUnit = reportResult.getPeriodUnit().toString();
    return dto;
}
Also used : DurationReportResult(org.camunda.bpm.engine.history.DurationReportResult)

Aggregations

DurationReportResult (org.camunda.bpm.engine.history.DurationReportResult)21 Calendar (java.util.Calendar)9 Date (java.util.Date)4 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)4 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)4 ArrayList (java.util.ArrayList)3 Test (org.junit.Test)3 NotValidException (org.camunda.bpm.engine.exception.NotValidException)1 HistoricProcessInstanceReport (org.camunda.bpm.engine.history.HistoricProcessInstanceReport)1 HistoricTaskInstance (org.camunda.bpm.engine.history.HistoricTaskInstance)1 HistoricTaskInstanceReport (org.camunda.bpm.engine.history.HistoricTaskInstanceReport)1 HistoricTaskInstanceReportResult (org.camunda.bpm.engine.history.HistoricTaskInstanceReportResult)1 ReportResult (org.camunda.bpm.engine.history.ReportResult)1 MockProvider.createMockHistoricTaskInstanceReport (org.camunda.bpm.engine.rest.helper.MockProvider.createMockHistoricTaskInstanceReport)1