if (!Boolean.parseBoolean(step.getAllowStartIfComplete())) { logger.fine("Step: " + step.getId() + " already has batch status of COMPLETED, so won't be run again since it does not allow start if complete."); return false;
if (!Boolean.parseBoolean(step.getAllowStartIfComplete())) { logger.fine("Step: " + step.getId() + " already has batch status of COMPLETED, so won't be run again since it does not allow start if complete."); return false;
public static boolean equals(Step step1, Step step2) { if(step1 == null && step2 == null) return true; if(step1 == null || step2 == null) return false; //TODO: finish with remaining fields return equals(step1.getChunk(), step2.getChunk()) && equals(step1.getListeners(), step2.getListeners()) && equals(step1.getProperties(), step2.getProperties()) && nullSafeEquals(step1.getAllowStartIfComplete(), step2.getAllowStartIfComplete()) && nullSafeEquals(step1.getNextFromAttribute(), step2.getNextFromAttribute()); }
public static boolean equals(Step step1, Step step2) { if(step1 == null && step2 == null) return true; if(step1 == null || step2 == null) return false; //TODO: finish with remaining fields return equals(step1.getChunk(), step2.getChunk()) && equals(step1.getListeners(), step2.getListeners()) && equals(step1.getProperties(), step2.getProperties()) && nullSafeEquals(step1.getAllowStartIfComplete(), step2.getAllowStartIfComplete()) && nullSafeEquals(step1.getNextFromAttribute(), step2.getNextFromAttribute()); }
public static boolean equals(Step step1, Step step2) { if(step1 == null && step2 == null) return true; if(step1 == null || step2 == null) return false; //TODO: finish with remaining fields return equals(step1.getChunk(), step2.getChunk()) && equals(step1.getListeners(), step2.getListeners()) && equals(step1.getProperties(), step2.getProperties()) && nullSafeEquals(step1.getAllowStartIfComplete(), step2.getAllowStartIfComplete()) && nullSafeEquals(step1.getNextFromAttribute(), step2.getNextFromAttribute()); }
@Override public StepThreadExecutionEntity setupStepThreadExecutionForRestartIfNecessary(boolean isRemoteDispatch) throws DoNotRestartStepThreadException { TopLevelStepInstanceEntity topLevelStepInstance = (TopLevelStepInstanceEntity) stepThreadInstance; boolean restartAfterCompletion = false; BatchStatus stepBatchStatus = topLevelStepInstance.getLatestStepThreadExecution().getBatchStatus(); if (stepBatchStatus.equals(BatchStatus.COMPLETED)) { // A bit of parsing involved since the model gives us a String not a // boolean, but it should default to 'false', which is the spec'd default. if (!Boolean.parseBoolean(getStep().getAllowStartIfComplete())) { logger.fine("Step: " + getStepName() + " already has batch status of COMPLETED, so won't be run again since it does not allow start if complete."); throw new DoNotRestartStepThreadException(); } else { logger.fine("Step: " + getStepName() + " already has batch status of COMPLETED, and allow-start-if-complete is set to 'true'"); // Save the fact that the step has already completed, but we'll see if we've reached the start-limit before actually restarting. restartAfterCompletion = true; } } validateStartLimitNotExceeded(); if (restartAfterCompletion) { markRestartAfterCompletion(); return getPersistenceManagerService().createTopLevelStepExecutionOnRestartAndCleanStepInstance(getJobExecutionId(), topLevelStepInstance); } else { return getPersistenceManagerService().createTopLevelStepExecutionOnRestartFromPreviousStepInstance(getJobExecutionId(), topLevelStepInstance); } }
newStep.setAllowStartIfComplete(step.getAllowStartIfComplete());
newStep.setAllowStartIfComplete(step.getAllowStartIfComplete());
step.setAllowStartIfComplete(this.replaceAllProperties(step.getAllowStartIfComplete(), submittedProps, parentProps)); step.setNextFromAttribute(this.replaceAllProperties(step.getNextFromAttribute(), submittedProps, parentProps)); step.setStartLimit(this.replaceAllProperties(step.getStartLimit(), submittedProps, parentProps));
step.setAllowStartIfComplete(this.replaceAllProperties(step.getAllowStartIfComplete(), submittedProps, parentProps)); step.setNextFromAttribute(this.replaceAllProperties(step.getNextFromAttribute(), submittedProps, parentProps)); step.setStartLimit(this.replaceAllProperties(step.getStartLimit(), submittedProps, parentProps));
step.setAllowStartIfComplete(this.replaceAllProperties(step.getAllowStartIfComplete(), submittedProps, parentProps)); step.setNextFromAttribute(this.replaceAllProperties(step.getNextFromAttribute(), submittedProps, parentProps)); step.setStartLimit(this.replaceAllProperties(step.getStartLimit(), submittedProps, parentProps));