In case of step failure in a multi-step batch , the step fail message is shown on console.
Also the BATCH_STATUS is COMPLETED and EXIT_STATUS is FAILED.
Q.1 How to change the EXIT_STATUS to COMPLETED?
Q.2 Is it anyway possible not to show failure message in console
Sample Code
<job id="someJob" xmlns="http://www.springframework.org/schema/batch"
restartable="true" parent="baseJob">
<step id="aStep">
<job ref="aJob" />
<next on="*" to="bStep"/>
</step>
<step id="bStep" parent="aStep" next="cStep">
<job ref="bJob"/>
</step>
<step id="cStep" parent="bStep">
<job ref="cJob"/>
</step>
</job>
<job id="aJob" xmlns="http://www.springframework.org/schema/batch"
restartable="true" parent="baseJob">
<step id="aJobStep">
<tasklet ref="aJobTasklet" />
</step>
</job>
<job id="bJob" xmlns="http://www.springframework.org/schema/batch"
restartable="true" parent="baseJob">
<step id="bJobStep">
<tasklet ref="bJobTasklet" />
</step>
</job>
<job id="cJob" xmlns="http://www.springframework.org/schema/batch"
restartable="true" parent="baseJob">
<step id="cJobStep">
<tasklet ref="cJobTasklet" />
</step>
</job>
if Step aStep fails for job someJob (aStep has thrown some SQLException).
Then someJob is continued to execute. But after successful completion of cStep, BATCH_STATUS for someJob is COMPLETED but EXIT_STATUS = FAILED.
Also BATCH_STATUS and EXIT_STATUS of other steps are as follows.
Step Name BATCH_STATUS EXIT_STATUS
aStep FAILED FAILED
bStep COMPLETED COMPLETED
cStep COMPLETED COMPLETED