title: Spring-Batch: how do I return a custom Job exit STATUS from a StepListener to decide next step
body: <p>The issue is this: I have a Spring Batch job with multiple step. Based on step one i have to decide the next steps. Can i set status in <strong>STEP1- passTasklet</strong> based on a job parameter so that i can set the Exit status to a custom status and define it in the job definition file to go to which next step.</p>
  
  <pre><code>Example
  &lt;job id="conditionalStepLogicJob"&gt;
  &lt;step id="step1"&gt;
  &lt;tasklet ref="passTasklet"/&gt;
  &lt;next on="BABY" to="step2a"/&gt;
  &lt;stop on="KID" to="step2b"/&gt;
  &lt;next on="*" to="step3"/&gt;
  &lt;/step&gt;
  &lt;step id="step2b"&gt;
  &lt;tasklet ref="kidTasklet"/&gt;
  &lt;/step&gt;
  &lt;step id="step2a"&gt;
  &lt;tasklet ref="babyTasklet"/&gt;
  &lt;/step&gt;
  &lt;step id="step3"&gt;
  &lt;tasklet ref="babykidTasklet"/&gt;
  &lt;/step&gt;
  &lt;/job&gt;
  </code></pre>
  
  <p>i ideally want my own EXIT STATUS to be used between steps. Can i do that? will it not break any OOTB flow? is it valid to do</p>