Results 1 to 3 of 3

Thread: Loop Step with partitioning

  1. #1
    Join Date
    Oct 2009
    Location
    Minneapolis, MN
    Posts
    137

    Question Loop Step with partitioning

    Hello

    My use case is somewhat like this. We need to process 10 different items using the same step. Each time the step is executed, we need to partition say 2 items so they can run parallelly. Once 2 partitions are completed the step should repeat itself to process the next 2 items.
    Code:
    <step id="loopStep" next="loopDecision">
    			<partition step="batchValidate" partitioner="partitioner">
    				<handler  task-executor="taskExecutor"/>
    			</partition>
    		</step>
    1) But what im noticising is, the second run of loopStep , the partition happens but it is not executing batchValidate again?

    2) Also i need to repeat the loopStep only when the individual partitions have executed.

    Please let me know if you need more code or what am i doing wrong?

    Thanks
    Srinivas

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    1) You might need to add allow-start-if-complete="true" to batchValidate. Although I think if you use the latest versions of Spring Batch they try to detect a duplicate step name in the same JobExecution and allow it to start unconditionally, so you might not need to.
    2) Should work fine. Is there a problem?

  3. #3
    Join Date
    Oct 2009
    Location
    Minneapolis, MN
    Posts
    137

    Default

    1. Yes i tried that and worked fine but not if i have flow inside the batchvalidate. i have posted another question on this
    2. IT looks like the loop is repeated only after partitions have completed. but not sure how to validate it?

    Thanks for looking

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •