public JobExecution getResult(Message<?> message) throws MessagingException {
		JobExecution jobExecution = (JobExecution) message.getPayload();

		String curOrchestrationId = jobExecution.getJobParameters().getString(XD_ORCHESTRATION_ID);

		logger.debug("Received result for {} orchestration {}", this.jobName, curOrchestrationId);

		if (StringUtils.hasText(curOrchestrationId) &&
				curOrchestrationId.equalsIgnoreCase(this.orchestrationId)) {
			if (!jobExecution.isRunning()) {
				return jobExecution;
			}
		}
		return null;
	}
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