I need to store Job ExecutionId as one of the fields of Entity. (I am using JpaItemWriter) One of topic here explains from StepExcecution, I can get StepContext -> JobExecution.
You have to add the following:
@Value("#{stepExecution.jobExecution}") private JobExecution jobExecution;
in your reader Writer or processor. It will certainly work.