Page 1 of 1

Reject Handling

Posted: Mon Feb 04, 2013 10:49 am
by synsog
Hi All,

I have a requirement to reject entire file even if a single row is not matching the defined business condition.Also, Job should complete as successful without any failure.

Please let me know if it is practically feasible.

Thanks,
synsog.

Posted: Mon Feb 04, 2013 10:57 am
by Nagaraj
Use a Transformer to split the valid and invalid outputs to two seperate files. or one to a seperate reject file and the other to a target db or whatever target you have.

PS: Should use the business condition at your discretion.

Posted: Mon Feb 04, 2013 11:14 am
by synsog
No - Actually, My requirement is not to process any records even if "a recored" is rejected on some conditions.

Posted: Mon Feb 04, 2013 12:34 pm
by Nagaraj
Okay, Add a column X using column generator(with Y value) and append it to the stream and add a TFm to split into two links one which says if the condition is not met and the other one just through put and do the fork join between them to see if there is any row coming from the reject link and try to add a condition =
the logic shd be if X = X(Through put X) then send it to reject file, otherwise process the whole file.

Logic is if there are rejects coming thru then it will match with every row coming from throughput link and it will be sent to reject file and job finishes successfully. hope this clears

Posted: Mon Feb 04, 2013 12:44 pm
by Nagaraj
One more way to do is with two jobs and use it in Sequence jobs.

1. Process the file and write it to a reject file if there are any rejects.
2. Send to the concerned person thru command notification stage if there is even one reject.
3. Use command stage to check if the reject file is empty and process the source file fully.