Q:

In spring batch is there a way to force the execution to a step if the skip limit has been surpassed

I have a simple batch process with a skip limit set.   When the skip limit is surpassed the job fails and it never gets to step two.   I would like the process to go to step 3 if the skip limit has passed. 
<job id="jobA" incrementer="runIdIncrementer" >
    <step id="step1" next="step2">
        <tasklet>
            <chunk commit-interval="10"  reader="dReader" writer="dWriter" skip-limit="100">
                <skippable-exception-classes>
                    <include class="java.lang. Exception"/>
                </skippable-exception-classes>
            </chunk>
            <listeners>
                <listener ref="skipListener"/>
            </listeners>
        </tasklet>
    </step>
    <step id="step2" next="step3">
        <tasklet>
            <chunk commit-interval="10"  reader="sReader" writer="sWriter"/>
        </tasklet>
    </step>     
    <step id="step3">
        <tasklet ref="cleanUpStep"/>
    </step>
</job>

Is there a way to do this?  I have tried setting "next" but an error is thrown stating cant have next attribute and a transition element.  
Any help would be great. 

A:

I have managed to fix it using "next".   I was including next attribute while also having 
next="step2" set in the step declaration.   The fix was to remove this from here and then you can add in the next attribute. 
<step id="step1">
    <tasklet>
        <chunk commit-interval="10"  reader="dReader" writer="dWriter" skip-limit="100">
            <skippable-exception-classes>
                <include class="java.lang. Exception"/>
            </skippable-exception-classes>
        </chunk>
        <listeners>
            <listener ref="skipListener"/>
        </listeners>
    </tasklet>
<next on="*" to="step2" />
</step>

The above code will continue to step2 even if the skip limit has been reached.  <step id="step1" next="step2"> would cause the job to fail if the limit was reached.