need a way to rollback sharepoint documents from web service
I need a way to rollback sharepoint which is called my web service which is called by web application.
Here's a scenario,
1. Insert data in backend(here the rollback works fine)
2. Create sharepoint document using webservice
2. Mail details
3. If either #1 or #3 fails rollback sharepoint documents made in #2.
It can either declarative or programmatic Tx.
Your scenario has entered an area of transaction management known generally as 'compensating transactions' (see http://en.wikipedia.org/wiki/Compensating_transaction) and are usually applied to what are considered 'business' or 'logical' transactions rather than 'technical' transactions (as in database transactions, etc.). When you take an action within a 'logical' transaction that cannot intrinsically be 'rolled back' per se (such as creating a SharePoint document) you cannot just 'rollback' the action. Instead you need instead to perform a 'compensating transaction' to logically 'undo' the act that happened earlier. In your case, you (probably) need a web service call that can permit you to DELETE the SharePoint document added in your Step #2.
Hope this helps,
Tags for this Thread