I have two step where, step 2 should be skipped if the step 1 processor doesn't returned any item after filtration.
I see ItemListenerSupport
can be extended and after process can be utilized.
@Override
public void afterProcess(NumberInfo item, Integer result) {
super.afterProcess(item, result);
if (item.isPositive()) {
stepExecution.setExitStatus(new ExitStatus(NOTIFY));
}
}
My processing is chunk based, I want to set the exit status after all chunks are processed and if any item left unfiltered. I am current adding items left unfiltered to ExecutionContext
and utilizing in next step.
How would i prevent next step if all the items of all chunks are filtered out