private void validateStartLimitNotExceeded() { // The spec default is '0', which we get by initializing to '0' in the next line int startLimit = 0; String startLimitString = step.getStartLimit(); if (startLimitString != null) { try { startLimit = Integer.parseInt(startLimitString); } catch (NumberFormatException e) { // We want to fail the job since the (substituted) JSL is invalid throw new IllegalArgumentException("Could not parse start limit value. Received NumberFormatException for start-limit value: " + startLimitString + " for stepId: " + getStepName() + ", with start-limit=" + step.getStartLimit()); } } if (startLimit < 0) { throw new IllegalArgumentException("Found negative start-limit of " + startLimit + "for stepId: " + getStepName()); } if (startLimit > 0) { int newStepStartCount = ((TopLevelStepInstanceEntity) stepThreadInstance).getStartCount() + 1; if (newStepStartCount > startLimit) { // Per the spec, we want this to fail the job, so don't merely throw DoNotRestartStepThreadException throw new IllegalStateException("For stepId: " + getStepName() + ", tried to start step for the " + newStepStartCount + " time, but startLimit = " + startLimit); } else { logger.fine("Starting (possibly restarting) step: " + getStepName() + ", since newStepStartCount = " + newStepStartCount + " and startLimit=" + startLimit); } } }
String startLimitString = step.getStartLimit(); if (startLimitString != null) { try { } catch (NumberFormatException e) { throw new IllegalArgumentException("Could not parse start limit value. Received NumberFormatException for start-limit value: " + startLimitString + " for stepId: " + step.getId() + ", with start-limit=" + step.getStartLimit());
String startLimitString = step.getStartLimit(); if (startLimitString != null) { try { } catch (NumberFormatException e) { throw new IllegalArgumentException("Could not parse start limit value. Received NumberFormatException for start-limit value: " + startLimitString + " for stepId: " + step.getId() + ", with start-limit=" + step.getStartLimit());
newStep.setStartLimit(step.getStartLimit()); JSLProperties newProperties = CloneUtility.cloneJSLProperties(step.getProperties());
newStep.setStartLimit(step.getStartLimit()); newStep.setProperties(CloneUtility.cloneJSLProperties(step.getProperties()));
step.setStartLimit(this.replaceAllProperties(step.getStartLimit(), submittedProps, parentProps));
step.setStartLimit(this.replaceAllProperties(step.getStartLimit(), submittedProps, parentProps));
step.setStartLimit(this.replaceAllProperties(step.getStartLimit(), submittedProps, parentProps));