.includeIncidents()
.list();
Assert.assertEquals(1, statistics.size());
ActivityStatistics result = statistics.get(0);
Assert.assertEquals(1, result.getInstances());
Assert.assertEquals(0, result.getFailedJobs());
assertTrue(result.getIncidentStatistics().isEmpty());
ProcessDefinition callSubProcessDefinition = repositoryService
.createProcessDefinitionQuery()
.processDefinitionKey("callExampleSubProcess")
.singleResult();
List<ActivityStatistics> callSubProcessStatistics =
managementService
.createActivityStatisticsQuery(callSubProcessDefinition.getId())
.includeFailedJobs()
.includeIncidents()
.list();
Assert.assertEquals(1, callSubProcessStatistics.size());
result = callSubProcessStatistics.get(0);
Assert.assertEquals(1, result.getInstances());
Assert.assertEquals(0, result.getFailedJobs());
assertTrue(result.getIncidentStatistics().isEmpty());
}