You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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 anItemReader
, anItemProcessor
and aItemWriter
that have subverted the purpose of the type of step:ItemReader
we have the classExtractReader
which is reading a PDF file and providing the raw data.ItemProcessor
we have the classFormatVerifierProcessor
which is only checking if the data is valid.ItemWriter
we have the classAlertOnFailureWriter
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).The text was updated successfully, but these errors were encountered: