Question

I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) used to manage the database application. There are three levels of validation going on; client, server-side, and database before the client data is saved to the database.

However, there are cases where pieces of the data set are currently valid but could become invalid at some point in the future. In these cases rather than abort the entire (lengthy) data input process, we just place the process for the data set on hold until the data either becomes valid, or is updated to a valid value. The error might be something like, "Hey, you scheduled the copy process of data Foo to location X, and then grant access to user Bob. The Bob user account you originally selected is no longer valid, what would you like to do? 'Cancel the Copy Request' 'Change the User' or 'Wait'".

Is there a best practice for storing and reporting error conditions (fixable by the user) and exceptions (not fatal and not fixable by the user) back to the client from the database?

For example:
- Database starts process A
- Database selects data set Foo
- During process an error or exception is encountered
- Database stores the error or exception
- Database handles the abort for process A with data set Foo
- Database continues process A with next data set until all data sets are processed
- Database completes process A

Then some time later:
- User logs in to client application at a later time (after the weekend?)
- User receives notification that an error or exception occurred

My first thought is some sort of db table storing various fields (event_ time_stamp, process, event, object_type, object_pk, event_code, additional_details, status, last_updated). Then setting up client-side templates (i.e. hard coded with parameters) for each error code and presenting those to the user...but there has to be a better way?

Ideally I am looking for a solution that will allow the client to provide helpful UI options that will aid the user in possibly resolving the errors.

What solutions have you found to this problem? Would something like NServiceBus or MassTransit work?

EDIT: There are two different requirements here. The first to store the exceptions, and the second to report (and possibly take action on) them.

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top