Description
Expected Behavior
When calling SimpleJobExplorer.getLastJobExecution(JobInstance jobInstance)
, a JobExecution
with all its StepExecution
s is returned.
Current Behavior
The stepExecutions
variable of the returned JobExecution
is empty. Calling SimpleJobExplorer.getJobExecutions(JobInstance jobInstance)
and taking the last element from there behaves differently; the StepExecution
s are there.
Context
The workaround is described in the section above (just take the last element of the getJobExecutions
return value). However, I lost some time until I found out about these different implementations. The documentation does not mention anything about missing StepExecution
s. I guess there are good reasons behind this, but they are not clear to me and I didn't see them in the documentation.
As I guess this method is most often used in the process of recovering state from an unfinished job, I would expect the StepExecution
to be important here. But maybe there are good reasons which I'm unaware of. In this case I would still at least update the Javadoc.