Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ISELTimetableJob from Chunk-based to Tasklet steps #235

Open
rjcanto opened this issue May 29, 2021 · 0 comments
Open

Change ISELTimetableJob from Chunk-based to Tasklet steps #235

rjcanto opened this issue May 29, 2021 · 0 comments
Labels
enhancement New feature or request invalid This doesn't seem right

Comments

@rjcanto
Copy link
Contributor

rjcanto commented May 29, 2021

Chunk based approach is relevant when groups of records/items are being processed. Is not the case for the Timetable job since we job consists in reading one pdf file and transform the data into a DTO.

Moving away from chunk-based steps will also to remove layers of abstraction that are not providing separation of concerns.

If we see from the current code there's a formatVerifierStep() as a chunk-based step. The name doesn't say much. In a closer look we see that the step has an ItemReader, an ItemProcessor and a ItemWriter that have subverted the purpose of the type of step:

  • as an ItemReader we have the class ExtractReader which is reading a PDF file and providing the raw data.
  • as an ItemProcessor we have the class FormatVerifierProcessor which is only checking if the data is valid.
  • as an ItemWriter we have the class AlertOnFailureWriter which the only activity is sending an email with the result of the step (this can well be in the end of the job as a separate Tasklet).
@rjcanto rjcanto added enhancement New feature or request invalid This doesn't seem right labels May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant