Sharepoint solutions

May 13, 2008

Transactions in Sharepoint 2007

Filed under: main — admin @ 12:59 am

During the development the application in  sharepoint we made some operations  with the list items that must be proccessed as “all-or-nothing”,  such moving the item in the list and then change it field, or update multiple items simultaneously. Object model of the Sharepoint services does not contain methods that deal with transaction. So, I begin my researches and find some forum post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2873895&SiteID=1. Moderator refers to
http://support.microsoft.com/kb/883316 and said that Sharepoint object model does not support transaction. I have read early some other posts that suggested to use Service Without Components http://weblogs.asp.net/paolopia/archive/2005/01/30/363312.aspx or http://msmvps.com/blogs/anguslogan/archive/2005/07/19/58191.aspx

and also to use new TransactionScope class http://www.eggheadcafe.com/software/aspnet/31533974/sharepoint-om–transacti.aspx. I try to use  Service Without Components or TransactionScope class but they did not work for me. So, the reference to Microsoft KB and argument that distributed transaction are based on com+ technology seems to be convincing and it is no way to use transaction simply in Sharepoint OM.

 But moderators that object to use transation in OM suggest to use WF in Sharepoint instead. It seems to me strange and I continue my reasearches.  I found interesting post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1993200&SiteID=1 that refers to http://msdn2.microsoft.com/en-us/library/ms442249.aspx.  msdn said that Windows SharePoint Services-specific workflow activities are  batched and not committed until a commit point is reached but code activities are committed as they occur. But most of the SharePoint Services-specific workflow activities can not be  developed with Visual Studio,  only With Sarepoint Designer. So, I search again and  find another interested article http://blogs.msdn.com/sharepointdesigner/archive/2007/07/06/porting-sharepoint-designer-workflows-to-visual-studio.aspx  that teaches to use SD workflow in VS.

Powered by WordPress