Access JobParameters via JobInstance #5086
Replies: 1 comment
-
That's correct. All job executions of a given job instance have the same identifying job parameters, but can have different non-identifying parameters. That's why there is no job parameters attached to a given instance, you need to get at least one of the executions and extract identifying job parameters for it.
It is not possible to restart a job execution in an "UNKNOWN" status, even with Spring Batch 6 (see Does that answer your questions? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, I am trying to implement some logic that tries to find out which
JobInstancesshould be restarted and which not.This is how I do it at the moment:
The first TODO already summarizes my problem/questions: Why can't I access the
JobParamatersof someJobInstance?As far as I know, a
JobInstanceis defined via a combination ofJob+JobParamters.Currently, to get the
JobParametersof someJobInstance, I have to get at least oneJobExecutionof thatJobInstance.But all the
JobExecutionsshould have exactly the sameJobParametersright? At least if they are identifying.And is there a better way to access
JobParametersof someJobInstancethat I don't see yet?Thanks for any help! :)
Beta Was this translation helpful? Give feedback.
All reactions