the setup i tried
Code:
<job id="fahrzeugImportJob">
<step id="checkJobParameters">
<tasklet ref="checkJobParametersTasklet" />
</step>
<step id="step1">
<tasklet ref="ftpLoadAndExtractTasklet" />
</step>
<listeners>
<listener ref="testListener" />
</listeners>
</job>
- the first step-tasklet implements StepExecutionListener
- the first step-tasklet returns a custom ExitStatus("FOO") in afterStep()
if i do nothing in the testListener than the Job returns with
- JobExecution.BatchStatus - COMPLETED
- JobExecution.ExitStatus - COMPLETED
if i promote the ExitStatus from Step to Jobexecution (in testListener), the Job returns with
- JobExecution.BatchStatus - COMPLETED
- JobExecution.ExitStatus - FOO
is there a better way than the custom JobExecutionListener to promote Step-ExitStatus ?