Search in sources :

Example 1 with HistoricDecisionInstanceStatisticsDto

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

the class HistoricDecisionStatisticsRestServiceImpl method getDecisionStatistics.

@Override
public List<HistoricDecisionInstanceStatisticsDto> getDecisionStatistics(String decisionRequirementsDefinitionId, String decisionInstanceId) {
    List<HistoricDecisionInstanceStatisticsDto> result = new ArrayList<HistoricDecisionInstanceStatisticsDto>();
    HistoricDecisionInstanceStatisticsQuery statisticsQuery = processEngine.getHistoryService().createHistoricDecisionInstanceStatisticsQuery(decisionRequirementsDefinitionId);
    if (decisionInstanceId != null) {
        statisticsQuery.decisionInstanceId(decisionInstanceId);
    }
    for (HistoricDecisionInstanceStatistics stats : statisticsQuery.list()) {
        result.add(HistoricDecisionInstanceStatisticsDto.fromDecisionDefinitionStatistics(stats));
    }
    return result;
}
Also used : HistoricDecisionInstanceStatistics(org.camunda.bpm.engine.history.HistoricDecisionInstanceStatistics) ArrayList(java.util.ArrayList) HistoricDecisionInstanceStatisticsDto(org.camunda.bpm.engine.rest.dto.history.HistoricDecisionInstanceStatisticsDto) HistoricDecisionInstanceStatisticsQuery(org.camunda.bpm.engine.history.HistoricDecisionInstanceStatisticsQuery)

Aggregations

ArrayList (java.util.ArrayList)1 HistoricDecisionInstanceStatistics (org.camunda.bpm.engine.history.HistoricDecisionInstanceStatistics)1 HistoricDecisionInstanceStatisticsQuery (org.camunda.bpm.engine.history.HistoricDecisionInstanceStatisticsQuery)1 HistoricDecisionInstanceStatisticsDto (org.camunda.bpm.engine.rest.dto.history.HistoricDecisionInstanceStatisticsDto)1