Announcement Announcement Module
Collapse
No announcement yet.
How to check that step execution is interrupted? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to check that step execution is interrupted?

    Dear Batch developers,

    I have an item processor, which internally makes a lot of computations (up to one hour) to calculate one item. However when the Job is marked a "STOPPING" I would like to process this condition ASAP. I have found out that this condition can be checked after the StepExecution is updated (see SimpleJobRepository#update(StepExecution)), but updating the StepExecution from item processor is a bit odd (I think).

    Is it possible to extend the JobRepository API, so that the item processor can check that execution is interrupted (and return null or throw exception)?
Working...
X