title: Spring Batch accessing job parameter inside step
body: <p>I have a following Spring Batch Job config:</p>
  
  <pre><code>@Configuration
  @EnableBatchProcessing
  public class JobConfig {
  
      @Autowired
      private JobBuilderFactory jobBuilderFactory;
  
      @Autowired
      private StepBuilderFactory stepBuilderFactory;
  
      @Bean
      public Job job() {
          return jobBuilderFactory.get("job")
                  .flow(stepA()).on("FAILED").to(stepC())
                  .from(stepA()).on("*").to(stepB()).next(stepC())
                  .end().build();
      }
  
      @Bean
      public Step stepA() {
          return stepBuilderFactory.get("stepA").tasklet(new RandomFailTasket("stepA")).build();
      }
  
      @Bean
      public Step stepB() {
          return stepBuilderFactory.get("stepB").tasklet(new PrintTextTasklet("stepB")).build();
      }
  
      @Bean
      public Step stepC() {
          return stepBuilderFactory.get("stepC").tasklet(new PrintTextTasklet("stepC")).build();
      }
  
  }
  </code></pre>
  
  <p>I'm starting the job with a following code:</p>
  
  <pre><code>    try {
                      Map&lt;String,JobParameter&gt; parameters = new HashMap&lt;&gt;();
                      JobParameter ccReportIdParameter = new JobParameter("03061980");
                      parameters.put("ccReportId", ccReportIdParameter);
  
                      jobLauncher.run(job, new JobParameters(parameters));
                  } catch (JobExecutionAlreadyRunningException | JobRestartException | JobInstanceAlreadyCompleteException
                          | JobParametersInvalidException e) {
                      e.printStackTrace();
                  }
  </code></pre>
  
  <p>How to access <code>ccReportId</code> parameter from job steps ?</p>