title: Dynamic step creationin Spring Batch using custom parameter for decision making
body: <p>Perfect solution for dynamic step creationin Spring Batch.
  Just that I am not able to get parameters into this , which will decide what step need to be executed or how can pass steps Array ?</p>
  <pre><code>&lt;pre&gt;@Bean
  public Job job() {
      Step[] stepsArray = // create your steps array or pass it as a parameter
      SimpleJobBuilder jobBuilder = jobBuilderFactory.get(&quot;mainCalculationJob&quot;)
              .incrementer(new RunIdIncrementer())
              .start(truncTableTaskletStep());
      for (Step step : stepsArray) {
          jobBuilder.next(step);
      }
      return jobBuilder.build();
  }&lt;/pre&gt;
  </code></pre>
  <p>Thanks</p>