interupting a save?

Posts   
 
    
nyronian
User
Posts: 8
Joined: 27-Jul-2006
# Posted on: 27-Jul-2006 18:17:52   

Ok....I have an architectural challenge.......

My client has the need for a Data QA module to be built into our product. What this means is if a user is logged in under certain roles, any changes made to data has to be saved off, sent to the QA department (via task within the system) and approved before applying the changes to the data.

This is a huge statement with ALL kinds of issues around it but....I have been thinking from the DAL standpoint if,

1) if the user is a particular role and the user saves changes to data, it could be interupted, transforming the Data Object into XML and the XML saved into another table. (Stopping the Save of the DataObject)

2) To approve the changes, I create 2 copies of the Data Object, one filled in from the DB (current data) and one from the XML captured in step 1, (requested changes). If the change is approved, save the DataObject filled out with the XML, all business rules will be applied again at that time and hopefully it would work.

I am new to LLBL Gen and don't even know if this is possible. Is there a way to XMLize the data object and fill it back out with the XML?

any thoughts??

Thanks in advance....any thoughts/help would be appreciated.....

Jim

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 27-Jul-2006 20:23:50   

LLBLGen entities support various kind of serialization, amongst them XML serialization, which persists the complete state of the entities including whether they have been changed or not.

Futhermore, that serialization process works with collections, and related entities, which means you can serialize many related item in a single operation.

Fo instance if you can relate all the table involved by the changes to a single table on the pk side, then you may perform a single entity fetch using prefetchpaths, which wil fill all the collection with entities to be changed, then perform the changes on the entities, and use the function "WriteXML" from the parent entity to serialize all the changes to a single string.

The Procedure "ReadXML" on the moderators client side can restore all the entities with their changes. If the moderator validates the changes, you only have to save the parent entity so that all the changes get updated in the database through a series of insert/update queries automatically generated.

Delete operation should be treated individually.

Using a UnitOfWork can help grouping several operations into a single db access.

nyronian
User
Posts: 8
Joined: 27-Jul-2006
# Posted on: 28-Jul-2006 00:09:46   

Thank you so much for your speedy response. sunglasses ...we are exploring these options...

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 28-Jul-2006 17:23:25   

nyronian wrote:

My client has the need for a Data QA module to be built into our product. What this means is if a user is logged in under certain roles, any changes made to data has to be saved off, sent to the QA department (via task within the system) and approved before applying the changes to the data.

WOW! sounds like a job for Windows Workflow Foundation.

BOb

nyronian
User
Posts: 8
Joined: 27-Jul-2006
# Posted on: 28-Jul-2006 18:48:03   

WOW! sounds like a job for Windows Workflow Foundation.

Maybe it is....I looked into this somewhat but I understand it is still in Beta. Have you used it with success?

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 28-Jul-2006 19:13:08   

nyronian wrote:

WOW! sounds like a job for Windows Workflow Foundation.

Maybe it is....I looked into this somewhat but I understand it is still in Beta. Have you used it with success?

Nothing released, but I am working with it on a ASP.Net app for flow control of web pages during data entry that are based on some fairly complicated business rules.

BOb