Bug 5432

Summary: Add getException method to StepExecution interface
Product: jbatch Reporter: cf126330
Component: SPECAssignee: ScottKurz
Status: NEW ---    
Severity: enhancement CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: future

Description cf126330 2013-10-02 15:15:54 UTC
StepContext has a getException method:
http://docs.oracle.com/javaee/7/api/javax/batch/runtime/context/StepContext.html

But StepExecution does not:
http://docs.oracle.com/javaee/7/api/javax/batch/runtime/StepExecution.html

Any exception that occurred during a step execution is vital data for a batch client, which can only get hold of StepExecution.  StepContext is intended more for the code running inside batch container, not the client.  So how about adding getException method to StepExecution interface?

A common use is, a batch job monitoring tool shows step execution data in a table:
id, name, batch status, exit status, exception, metrics