Example #1
0
        public static ActivityStatisticsResultDto fromActivityStatistics(ActivityStatistics statistics)
        {
            ActivityStatisticsResultDto dto = new ActivityStatisticsResultDto();

            dto.id         = statistics.Id;
            dto.instances  = statistics.Instances;
            dto.failedJobs = statistics.FailedJobs;

            dto.incidents = new List <IncidentStatisticsResultDto>();
            foreach (IncidentStatistics incident in statistics.IncidentStatistics)
            {
                IncidentStatisticsResultDto incidentDto = IncidentStatisticsResultDto.fromIncidentStatistics(incident);
                dto.incidents.Add(incidentDto);
            }

            return(dto);
        }
Example #2
0
        public static ProcessDefinitionStatisticsResultDto fromProcessDefinitionStatistics(ProcessDefinitionStatistics statistics)
        {
            ProcessDefinitionStatisticsResultDto dto = new ProcessDefinitionStatisticsResultDto();

            dto.definition = ProcessDefinitionDto.fromProcessDefinition(statistics);
            dto.id         = statistics.Id;
            dto.instances  = statistics.Instances;
            dto.failedJobs = statistics.FailedJobs;

            dto.incidents = new List <IncidentStatisticsResultDto>();
            foreach (IncidentStatistics incident in statistics.IncidentStatistics)
            {
                IncidentStatisticsResultDto incidentDto = IncidentStatisticsResultDto.fromIncidentStatistics(incident);
                dto.incidents.Add(incidentDto);
            }

            return(dto);
        }