I have a situation where I have 2 steps which run in series. Now I also have partitioning in place on top of it. So each partition runs 2 steps in sequence. Now I have 2 basic questions:
- How can I achieve such setup? I have added partitioner to 1st step and added the 2nd step as next step. Would below config work?
<batch:step id="partitioned_steps">
<batch:partition step="first_step" partitioner="xyzPartitioner">
</batch:partition>
</batch:step>
<batch:step id="first_step" next="second_step">
<batch:tasklet ref="first_tasklet" />
</batch:step>
<batch:step id="second_step">
<batch:tasklet ref="second_tasklet" />
</batch:step>
- Now I want to send some data from first step to second. For this, I want to use JobExecutionContext. But the problem I see here is that with partitioning how would 2nd step identify the data respective to its partition's first step? Can i use some partitionkey to correlate steps in a partition?