class StepState extends AbstractState implements StepLocator, StepHolder {

	private final Step step;

	/**
	 * @param step the step that will be executed
	 */
	public StepState(Step step) {
		super(step.getName());
		this.step = step;
	}

	/**
	 * @param name for the step that will be executed
	 * @param step the step that will be executed
	 */
	public StepState(String name, Step step) {
		super(name);
		this.step = step;
	}

	@Override
	public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {<FILL_FUNCTION_BODY>}

	@Override
	public Step getStep() {
		return step;
	}

	@Override
	public boolean isEndState() {
		return false;
	}

	@Override
	public Collection<String> getStepNames() {
		List<String> names = new ArrayList<>();

		names.add(step.getName());

		if (step instanceof StepLocator) {
			names.addAll(((StepLocator) step).getStepNames());
		}

		return names;
	}

	@Override
	public Step getStep(String stepName) throws NoSuchStepException {
		Step result = null;

		if (step.getName().equals(stepName)) {
			result = step;
		}
		else if (step instanceof StepLocator) {
			result = ((StepLocator) step).getStep(stepName);
		}

		return result;
	}

}

		/*
		 * On starting a new step, possibly upgrade the last execution to make sure it is
		 * abandoned on restart if it failed.
		 */
		executor.abandonStepExecution();
		return new FlowExecutionStatus(executor.executeStep(step));
	
<methods>public void <init>(java.lang.String) ,public java.lang.String getName() ,public abstract org.springframework.batch.core.job.flow.FlowExecutionStatus handle(org.springframework.batch.core.job.flow.FlowExecutor) throws java.lang.Exception,public java.lang.String toString() <variables>private final non-sealed java.lang.String name