Announcement Announcement Module
Collapse
No announcement yet.
[JobOperator] Odd way to retrieve JobParameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [JobOperator] Odd way to retrieve JobParameters

    Hi,

    Well i'll go directly to the thing confusing me.

    Following the database model, the jobParameters are associated to the JobInstanceId, which actually is correct in terms that if a parameter is changed a new instance is created of the named job.

    But on the JobOperator interface things turn on to be complicated, to retrieve jobParameters we must provide the executionId and not the instanceId. Which leads to a retrieval of duplicate params and unnecessary processing...

    Someone can please explain to me why is it not possible to retrieve the parameters directly by the instanceId? since the inner executions of a given instance will always lead to the same list of parameters?

    Cheers,
    Hassane

  • #2
    I'm not 100% clear what you need to do. You can find a JobInstance by id from the JobExplorer, or use JobRepository to locate one by name and parameters (via the last execution). Is that not enough?

    Comment


    • #3
      Yep actually that was enough, i have created my own jobOperator to meet my needs by using the JobRepository, JobExplorer and even the SimpleJobOperator.

      Well my question about retrieving parameters was that in the SimpleJobOperator, the method getParameters receives a jobExecutionId while it's working with the jobInstanceId.
      So if someone needs to access the parameters of a JobInstance they need to lookup for its executions... just so that the getParameters lookup again for the jobInstanceId... and this feels like going down-and-up for no added value :/

      well, im talking on the basis of my needs since i wanted to access the parameters from the instance level.

      But in the end, your suggestion of re-using the JobExplorer and JobOperator was helpfull.

      Thanks

      Comment

      Working...
      X