• Post Reply Bookmark Topic Watch Topic
  • New Topic

Logging all errors of Paryoll file upload at once  RSS feed

 
changu mani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I've a problem and I need your help. Our Bank's customers don't want to use payroll file upload functionality just because it doesn't show all the errors at once. For eg : the below mentioned record is a credit record in payroll upload file. In our current application, if the user enters a wrong account , the app throws 'wrong credit account' to the customer. Once the customer corrects it and then try to upload again, the next error will be shown if there are any. So the customer is not happy with this, since he has to try many times to get rid of all the errors.( we have shared the format of the payroll file but still bank customers are facing difficulty to get adjusted with the format.They make a lot of mistakes in the file upload.Bank wants something more sophisticated for customers.)

|1|012001759|150|abc|Credit|mail@googo.com|0445927374721|;

I've been asked to improve this functionality by throwing all the errors at once. For eg : Process all records at once (even if there are 100-500) and show all the errors to customer at once. How do I go about doing this?

I'm validating each and every record. I'm not getting idea how to store and where to store all these errors. What is the best solution? I've even told the client that we may show only the first 10 errors and when the customers correct the first 10 and upload again, we can show the next ten errors if there are any.

Please let me know the best way to handle this requirement keeping in mind that this is a banking application. Please revert if you haven't got any details.

Thanks in advance.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Process a record.
-- If an error occurs, record it
-- If the error doesn't prevent you from validating other field in the same record continue validating other fields on the same record
-- Collect all errors into a collection
2) Read the next record.
3) Rinse, repeat.
4) When done, send all errors at once back to client.
 
changu mani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Steve Thanks for the reply. What if I'll have to record some 100 errors at once? Is storing in a collection recommended? Will it not hog the memory?

Can there be any other better solution in case if I've to show more than 50-100 errors?
 
changu mani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding,

My plan is to process the file completely and add it to collection and then show only 10-20 errors to customers since it will be difficult to show all errors on screen at once. I'm thinking if storing in collection may create some problem with the performance.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way for me to know if it will hog too much memory. What is too much memory? What has to be stored? How much memory do you have, can you use? How are they 'sent to the client'? There is no way for me to tell. But my suggestion is to come up with an implementation. Measure it. If there is a problem fix it. Trying to analyze the problems before you have a concrete implementation will lead to overly complex code for possibly no gain, and may keep you from getting anything started at all.
 
changu mani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Steve..Ok. I got your point. I just go ahead with storing in collection. Thanks for your inputs.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!