使用MCF创建配置文件过程中的事务 [英] transaction in the create profile process using MCF

查看:88
本文介绍了使用MCF创建配置文件过程中的事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有办法处理创建用户进程?


我们正在使用MCF插入新的用户以及他的地址和其他相关字典项目(信用卡等)。如果由于某种原因,用户没有插入数据库,我们希望
所有其他相关字典项将从数据库中删除

We are using the MCF to insert new user along with his address and other related dictionary items (credit card etc.). If for some reason , the user is not insert into the database , we want that all other related dictionary items will be erase from the DB as well.


我无法找到将创建操作标记为事务的属性。


谢谢


 

推荐答案

你好Arik,

Hello Arik,

我更重要的是,调查为什么用户未插入到数据库更为重要。它可能是一个Web应用程序代码问题,它提供的数据不足或数据无效。

I think it is more important to investigate why the user is not inserted to the DB. It can be a web app code problem, which provides insufficient data, or invalid data.

但是,如果要使用户数据完整性,可以编写计时器作业并在Sharepoint中安排它,它将检查UserObject表中的所有UserID并检查其他配置文件实体,如信用卡,地址,...
等,如果存在任何"孤儿"等记录您可以使用预定作业删除它们。

However if you want to make the User Data integrity, you can write a timer job and schedule it in Sharepoint, that will check all the UserIDs in the UserObject table and check other Profile Entities, such as credit cards, addresses, ... etc if there exists any "orphan" record you can delete them using scheduled job.

您也可以在UserObject配置文件实体创建的最后一步创建一个operationSequence 并检查其中的数据完整性好。有关示例序列,请查看channelConfiguration.config文件。
$


Also you can create an operationSequence at the last step of the UserObject profile entity creation and check the data integrity there as well. For a sample sequence please have a look at channelConfiguration.config file.


<MessageHandler name="CommerceCreateOperation_UserProfile" responseType="Microsoft.Commerce.Contracts.Messages.CommerceCreateOperationResponse, Microsoft.Commerce.Contracts, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
    <OperationSequence>
     <Component name="User Profile Loader" type="Microsoft.Commerce.Providers.Components.UserProfileLoader, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile Addresses Processor" type="Microsoft.Commerce.Providers.Components.UserProfileAddressesProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile Credit Cards Processor" type="Microsoft.Commerce.Providers.Components.UserProfileCreditCardsProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile ShippingMethods Processor" type="Microsoft.Commerce.Providers.Components.UserProfileShippingMethodsProcessor, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile Committer" type="Microsoft.Commerce.Providers.Components.UserProfileCommitter, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile Response Builder" type="Microsoft.Commerce.Providers.Components.UserProfileResponseBuilder, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile Addresses Response Builder" type="Microsoft.Commerce.Providers.Components.UserProfileAddressesResponseBuilder, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile CreditCards Response Builder" type="Microsoft.Commerce.Providers.Components.UserProfileCreditCardsResponseBuilder, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
     <Component name="User Profile ShippingMethods Response Builder" type="Microsoft.Commerce.Providers.Components.UserProfileShippingMethodsResponseBuilder, Microsoft.Commerce.Providers, Version=1.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />


这篇关于使用MCF创建配置文件过程中的事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆