views:

46

answers:

2

Hi,

I am Gerhard and I just thinking around a problem, without getting a fine solution uptil now.

Scenario: Users type in complex data (WPF frontend) and persist the data with some OR-mapper into SQLServer. I use OpenAccess by Telerik, my favorit.

But now think about following situation: One nearly finished the work on some use case, but now, some information is missing. because the data he typed in don't fullfill all business rules (required fields may be still empty) he can't save his work.

But unfortunately, he can't get the missing information too. So what' can he do. Discarding the whole work, bad idea, just do nothing than waiting, no good idea.

Now my idea came up. It would be helpful, if the user can 'park' his unsolved problem and just start working on some different use case. And, after he has parked his work, he is able to shut down the system and try to solve it on an other day. ((And by the way, he can continue on an other system)))

But, where starting to serialize? The business object isnt serializable, because it contains some identity info from the ORM. Introducing some intermediat object lets explode assignment statements. UI?

Maybe, someone knows a existing solution, or did have some nice ideas.

Thanks

Gerhard

+1  A: 

use a status field to track if it meets all rules or not. allow it to save with no regard to rules, but flag it as such. when it it valid change the flag. only let the rest of the users see/work with valid items.

KM
A: 

How about the Memento pattern? Take all of the serializable data and place it into another class, then serialize that and save it to the database. When needed again, deserialize into the memento class, then populate the original object.

Michael Todd