To more flexibly juggle existing code for chunk based batchlet execution, I’d like to chain multiple item processors such that the output of one is the input of the next. The whole chunk step should look like
ItemReader -> ItemProcessor1 -> ItemProcessor2 -> … -> ItemWriter
Knowing that JSR-352 only allows one ItemProcessor per step I am now wondering if it were possible to create a CompoundItemProcessor that manages the chain of other ItemProcessors. And while I try to implement it, the instantiation seems a challenge as I would not know how to define parameters that can efficiently be routed to the single ItemProcessors.
Are parameters strictly Strings? Numbers? Can they be complex objects? As I am trying to nest processors, is there some way to nest parameters? Any idea is welcome.