If that works then great. If you want to reject the file you'll likely have to run the file twice. The first for validation and the second for processing. Remember if you're streaming these and processing them and then get a bad record like the one with the missing field, you've already processed a good number of records and won't be able to reject the file. Either that or you'll have to get into some sort of transaction and rollback.
Brad On Wed, Aug 31, 2016 at 1:50 PM, spurcell <scott_purc...@mastercard.com> wrote: > Hello Brad, > > Here is an expected file (simplified down for discussion) > "FHDR","1","t","20160" > "LFHDR","p","4","2016" > "TRNSFRREQ","p","2","A","4","U","a" > "LFTRLR","p","1","4" > "FTRLR","5","4" > > > When a user sends in a bad file (2 FHDR files) I want to reject the file. > "FHDR","1","t","20160" > "FHDR","1","t","20160" > "LFHDR","p","4","2016" > "TRNSFRREQ","p","2","A","4","U","a" > "LFTRLR","p","1","4" > "FTRLR","5","4" > > If a user sends in a record with a missing field (LFHDR missing the "4" > column) I would like to capture that in the reader and reject the file. > > "FHDR","1","t","20160" > "LFHDR","p","2016" > "TRNSFRREQ","p","2","A","4","U","a" > "LFTRLR","p","1","4" > "FTRLR","5","4" > > I did figure out that using 2.18.0-SNAPSHOT works and one can now insert a > Handler so I am debugging that right now. > > Thanks > > > > -- > View this message in context: http://camel.465427.n5.nabble. > com/Camel-BeanIODataFormat-Configure-ErrorHandler-for-BeanIO-Reader- > tp5787005p5787071.html > Sent from the Camel - Users mailing list archive at Nabble.com. >