MOSS 2007 CMS Project Technical Issues: Permission / Workflow deployment

本文讨论了Microsoft Office SharePoint Server (MOSS) 2007中自定义工作流的开发经验与挑战,包括使用SPSecurity.RunWithElevatedPrivileges提升权限的方法、OnTaskCreated活动的问题、部署复杂性和BreakInheritance功能的异常情况。

In my project, there are several workflow developed by ourselves. MOSS 2007 workflow is based on the WF (.net framework 3.0).Because of the point mentiond, developing workflow on MOSS 2007 mostly originates from WF. You'd better know more details about it, it's very helpful later. Moreover, you can find the samples from MOSS workflow start kits, that will take you into the door.

Now let me disucss the issues I have met, also they make me lost much of time and are overwhelming disaster to me. Now I can spread the world.

1) Even everybody know using "SPSecurity.RunWithElevatedPrivileges(secureCode)" can run the code with the access of "system account". But some of them don't know this, for instance me, you should using all the variables declared in the big bracket. Another thing you may need to use the below lins in some situation, at least in my case it works:

_web.AllowUnsafeUpdates = true;

SPWebApplication webApp = _web.Site.WebApplication;
webApp.FormDigestSettings.Enabled = false;

...

2) Workflow: onTaskCreated. In workflow, there is an activity named "onTaskCreated", it will not be activated randomly without sp1. I'm not sure if it's solved with sp1 of MOSS. Because of this point, we should avoid to use this within the loop of "Replicator". In my case, it cost me much time to figure out it.

3) Workflow: Deployment. So far about the deployment of MOSS workflow, I can not find effective related documents. Even the official document can not cover all the situations.The complexity lies in the following aspects:

  • a) In MOSS 2007, the workflow can be attached with Content type, List, and policy.
  • b) In a CMS application, there are many lists, content types that increase the complexity of deployment.
  • c) Becase MOSS 2007 is base b/s architecture, frequently the action of deployment is always time out.

In my case, the workflow is deployed like below:

  • a) Remove all the workflows attached in the lists or content types.
  • b) Run uninstall.bat to uninstall the feature totally.
  • c) Check if it's clearly clean, without any old ones. Here you may need to develop a tool.
  • d) Run install. bat to reinstall it.
  • e) Attach the workflow to your lists or content types accordingly.

The latest information is that the deployment will be convenient in VS2008.

4) Workflow: "BreakInheritance..". In my case, if you call this function to remove the permissions, there always is some exceptions occured in the logs of MOSS. Finally, I find there is hotfix in SP1 which have solved this issue. So far in my case, it's not upgraed, so I can make sure of this.

转载于:https://www.cnblogs.com/hanfey/archive/2007/12/24/1012914.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值