I wanted to skip some record on process.
what i have tried is, i have created custom exception and throw the exception when i want to skip the record and its calling
when we return null in the process() method, it will filter the record and increase the filter count.
@Transactional(propagation = Propagation.REQUIRED)
@Override
public SomeObject process(SomeObject someObject) throws Exception {
if (some condition) {
return null;
}
}
If We want to skip the record , throw an exception. This will skip the record and increase processSkipCount as well.
@Transactional(propagation = Propagation.REQUIRED)
@Override
public SomeObject process(SomeObject someObject) throws Exception {
if (some condition) {
throw new Exception("invalid record");
}
}
Add this Exception to context file as well.