javajberet

How to control Java batch exit status


I am trying to improve exit information for some JSR-352 batch job. So far I use Wildfly (and the included JBeret implementation), and my last batch step returns

However, when looking from 'outside' at the job, I see

How can I change the job's exit status to "WARNING"?


Solution

  • You can set the job's exit status programmatically in one of your batch artifact classes, via JobContext.setExitStatus method.