Please use the ExecutionStateListener in order to get more advanced signals.
public interface ExecutionContextListener
Interface that can be implemented by objects stored as step execution context attributes to get notified about the
lifecycle of the step execution context.