Announcement Announcement Module
Collapse
No announcement yet.
How to configure a step for NON item oriented processing? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to configure a step for NON item oriented processing?

    Is it true that a step has to be item oriented?

  • #2
    Spring Batch is item oriented because it is a good practise in batch designing and easier to process data.

    Of course, you also can return a List of items from a ItemReader, but it is tedious to iterate lists in the ItemProcessor and the source code is not clear.

    Hope to help you.

    Comment


    • #3
      Thanks for the reply.
      I understand the item oriented processing nature, but often there are requirements to pre-process all batch items, for example validating the total count, before starting each item processing. Just want to configure this pre-processing as part of the batch job within spring batch, otherwise I would have to create a totally different job to do that step, then trigger the spring batch job afterwards.

      Comment


      • #4
        I think you can define in the same job two jobs: the first step do all the validations and the, if and only if this step ends ok (COMPLETED), go to the next step to process irem by item.

        Regards,

        Comment


        • #5
          I don't get what you mean. Are you saying you can configure a spring batch job to do the validation that I wanted? Doesn't it imply I can create non-item oriented processing?

          Comment


          • #6
            Not all steps are required to be item based. The Tasklet interface is intended for you to implement non item based processing. http://static.springsource.org/sprin...ml#taskletStep

            Comment


            • #7
              Originally posted by mminella View Post
              Not all steps are required to be item based. The Tasklet interface is intended for you to implement non item based processing. http://static.springsource.org/sprin...ml#taskletStep
              Yes, that it was I would want to explain

              Comment

              Working...
              X