@RequestMapping(value = { "/{executionId}" }, method = RequestMethod.PUT, params = "restart=true")
	@ResponseStatus(HttpStatus.OK)
	public void restartJobExecution(@PathVariable("executionId") long jobExecutionId) {

		final JobExecution jobExecution;
		try {
			jobExecution = jobService.getJobExecution(jobExecutionId);
		}
		catch (org.springframework.batch.core.launch.NoSuchJobExecutionException e) {
			throw new NoSuchJobExecutionException(jobExecutionId);
		}

		if (jobExecution.isRunning()) {
			throw new org.springframework.xd.dirt.job.JobExecutionAlreadyRunningException(
					"Job Execution for this job is already running: " + jobExecution.getJobInstance());
		}

		final JobInstance lastInstance = jobExecution.getJobInstance();
		final ExpandedJobParametersConverter expandedJobParametersConverter = new ExpandedJobParametersConverter();
		final JobParameters jobParameters = jobExecution.getJobParameters();

		final Job job;
		try {
			job = jobLocator.getJob(lastInstance.getJobName());
		}
		catch (NoSuchJobException e1) {
			throw new org.springframework.xd.dirt.job.NoSuchBatchJobException("The job '" + lastInstance.getJobName()
					+ "' does not exist.");
		}
		try {
			job.getJobParametersValidator().validate(jobParameters);
		}
		catch (JobParametersInvalidException e) {
			throw new org.springframework.xd.dirt.job.JobParametersInvalidException(
					"The Job Parameters for Job Execution " + jobExecution.getId()
							+ " are invalid.");
		}

		final BatchStatus status = jobExecution.getStatus();

		if (status == BatchStatus.COMPLETED || status == BatchStatus.ABANDONED) {
			throw new org.springframework.xd.dirt.job.JobInstanceAlreadyCompleteException(
					"Job Execution " + jobExecution.getId() + " is already complete.");
		}

		if (!job.isRestartable()) {
			throw new org.springframework.xd.dirt.job.JobRestartException(
					"The job '" + lastInstance.getJobName() + "' is not restartable.");
		}

		final String jobParametersAsString = expandedJobParametersConverter.getJobParametersAsString(jobParameters,
				true);
		jobDeployer.launch(lastInstance.getJobName(), jobParametersAsString);
	}
Restart the Job Execution with the given executionId.

@param jobExecutionId the executionId of the job execution to restart
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/BatchJobExecutionsController.java