jobRepository = factory.getObject();
step.setJobRepository(jobRepository);
JobExecution jobExecution = jobRepository.createJobExecution("job", new JobParameters());
stepExecution = jobExecution.createStepExecution("step");
jobRepository.add(stepExecution);
SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
jobLauncher.setJobRepository(jobRepository);
jobLauncher.afterPropertiesSet();
step.setJobLauncher(jobLauncher);
}