Forcing the step to finish when JobOperator.stop is called on the job
I'm wondering if there's a way to force the step execution to finish when I call the JobOperator's stop method. From the tests that I ran, the StepExecution only finds out about the JobInterruptedException after the step has finished executing.
Another issue is the current step that is being executed when the stop method is called, gets run again when the job is restarted even if it has actually finished running as a consequence of the first issue I raised above. Is there a way of telling spring batch not to rerun the last step that has finished running?