.includeFailedJobs()
.list();
Assert.assertEquals(2, statistics.size());
ProcessDefinitionStatistics callExampleSubProcessStaticstics = null;
ProcessDefinitionStatistics exampleSubProcessStaticstics = null;
for (ProcessDefinitionStatistics current : statistics) {
if (current.getKey().equals("callExampleSubProcess")) {
callExampleSubProcessStaticstics = current;
} else if (current.getKey().equals("ExampleProcess")) {
exampleSubProcessStaticstics = current;
} else {
fail(current.getKey() + " was not expected.");
}
}
assertNotNull(callExampleSubProcessStaticstics);
assertNotNull(exampleSubProcessStaticstics);
// "super" process definition
assertEquals(1, callExampleSubProcessStaticstics.getInstances());
assertEquals(0, callExampleSubProcessStaticstics.getFailedJobs());
assertFalse(callExampleSubProcessStaticstics.getIncidentStatistics().isEmpty());
assertEquals(1, callExampleSubProcessStaticstics.getIncidentStatistics().size());
IncidentStatistics incidentStatistics = callExampleSubProcessStaticstics.getIncidentStatistics().get(0);
assertEquals(FailedJobIncidentHandler.INCIDENT_HANDLER_TYPE, incidentStatistics.getIncidentType());
assertEquals(1, incidentStatistics.getIncidentCount());
// "called" process definition
assertEquals(1, exampleSubProcessStaticstics.getInstances());
assertEquals(1, exampleSubProcessStaticstics.getFailedJobs());
assertFalse(exampleSubProcessStaticstics.getIncidentStatistics().isEmpty());
assertEquals(1, exampleSubProcessStaticstics.getIncidentStatistics().size());
incidentStatistics = exampleSubProcessStaticstics.getIncidentStatistics().get(0);
assertEquals(FailedJobIncidentHandler.INCIDENT_HANDLER_TYPE, incidentStatistics.getIncidentType());
assertEquals(1, incidentStatistics.getIncidentCount());
}