if (foundExecution == null) {
throw new IllegalStateException("Execution not found in execution list");
}
JobState state = foundExecution.getState();
switch (state) {
case FAILED:
case SUCCESS:
System.out.println("Job completed; state=" + state);
return found;