private String getJobParameters(ChunkContext chunkContext) throws JsonProcessingException {

		StepExecution stepExecution = chunkContext.getStepContext().getStepExecution();
		JobParameters originalJobParameters = stepExecution.getJobParameters();

		Properties currentJobParameters = originalJobParameters.toProperties();

		currentJobParameters.remove(ExpandedJobParametersConverter.UNIQUE_JOB_PARAMETER_KEY);

		String random = null;

		//This is a restart
		Map<String, Object> stepExecutionContext = chunkContext.getStepContext().getStepExecutionContext();
		if(stepExecutionContext.containsKey(ExpandedJobParametersConverter.UNIQUE_JOB_PARAMETER_KEY)) {
			random = (String) stepExecutionContext.get(ExpandedJobParametersConverter.UNIQUE_JOB_PARAMETER_KEY);
		}

		currentJobParameters.put(XD_ORCHESTRATION_ID, this.orchestrationId);
		currentJobParameters.put("-" + XD_PARENT_JOB_EXECUTION_ID, stepExecution.getJobExecutionId());

		if(random != null) {
			currentJobParameters.put(ExpandedJobParametersConverter.IS_RESTART_JOB_PARAMETER_KEY, true);
			currentJobParameters.put(ExpandedJobParametersConverter.UNIQUE_JOB_PARAMETER_KEY, random);
		}

		return new ObjectMapper().writeValueAsString(currentJobParameters);
	}
Uses the {@link MessageBus} to execute a job deployed in a Spring XD cluster.

@param contribution The contribution to the step's metrics.  Not used in this case
@param chunkContext Used to get a handle on the JobExecution and JobInstance
@return RepeatStatus.FINISHED
@throws Exception
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/batch/tasklet/JobLaunchingTasklet.java