Approach to upgrading custom SharePoint workflows
2012-12-13 11:25
204 查看
Approach to upgrading custom SharePoint workflows
27 Aug
2009
By
Tommy Lum Filed in
Technical in Nature5
Comments
Maintainability is important when you are developing custom software solutions. It is almost inevitable that there will be minor bugs or new feature requests from users that will require you to make changes to your custom software solution after it is deployed
in production.
Upgrading custom SharePoint workflows can be quite time-consuming. The main reason why upgrading custom SharePoint workflows is difficult comes from the fact that each running workflow instance is serialized and de-serialized to and from the database many
times during the lifetime of its execution. Any changes to the workflow’s member variables will break SharePoint’s ability to perform the serialization and deserialization on the running workflow instances. This means you can’t simply make changes to the workflow
assembly and overwrite the existing assembly in production unless the change is trivial enough that it will not affect the serialization/deserialization of the workflow.
Instead of upgrading a custom SharePoint workflow, the recommended approach is actually to create an entirely new workflow to replace the existing workflow. To handle the workflows that are in progress, leave the old version of the workflow in production
and disable new instances of the old workflow from being instantiated.
Here are the steps to “upgrade” a custom SharePoint workflow:
Change the workflow assembly’s version number
Update the workflow assembly version number in the attribute of the Workflow element in Workflow.xml file and the name attribute so that you can distinguish the new workflow from the old workflow
Change the SolutionId in your manifest.xml file
Change the name of the .wsp solution package (i.e. CorpSite.Workflow.ITRequest.wsp to CorpSite.Workflow.ITRequest.v1.1.wsp)
Deploy the new .wsp solution package
Run IISReset
Configure the old version of the workflow to disallow new instances of it from being created by disabling all the start options in the old workflow association
Create a new workflow association using the new workflow that was just deployed
27 Aug
2009
By
Tommy Lum Filed in
Technical in Nature5
Comments
Maintainability is important when you are developing custom software solutions. It is almost inevitable that there will be minor bugs or new feature requests from users that will require you to make changes to your custom software solution after it is deployed
in production.
Upgrading custom SharePoint workflows can be quite time-consuming. The main reason why upgrading custom SharePoint workflows is difficult comes from the fact that each running workflow instance is serialized and de-serialized to and from the database many
times during the lifetime of its execution. Any changes to the workflow’s member variables will break SharePoint’s ability to perform the serialization and deserialization on the running workflow instances. This means you can’t simply make changes to the workflow
assembly and overwrite the existing assembly in production unless the change is trivial enough that it will not affect the serialization/deserialization of the workflow.
Instead of upgrading a custom SharePoint workflow, the recommended approach is actually to create an entirely new workflow to replace the existing workflow. To handle the workflows that are in progress, leave the old version of the workflow in production
and disable new instances of the old workflow from being instantiated.
Here are the steps to “upgrade” a custom SharePoint workflow:
Change the workflow assembly’s version number
Update the workflow assembly version number in the attribute of the Workflow element in Workflow.xml file and the name attribute so that you can distinguish the new workflow from the old workflow
Change the SolutionId in your manifest.xml file
Change the name of the .wsp solution package (i.e. CorpSite.Workflow.ITRequest.wsp to CorpSite.Workflow.ITRequest.v1.1.wsp)
Deploy the new .wsp solution package
Run IISReset
Configure the old version of the workflow to disallow new instances of it from being created by disabling all the start options in the old workflow association
Create a new workflow association using the new workflow that was just deployed
相关文章推荐
- Developer Introduction to Workflows for Windows SharePoint Services 3.0 and SharePoint Server 2007
- How to create your own custom 404 error page and handle redirect in SharePoint
- add a custom action to a SharePoint list actions menu for a specific list or content type
- Custom Ribbon in SharePoint 2010 & which not wrok when migrate from 2010 to 2013
- How to custom search results in SharePoint Server 2013
- Upgrading or Redeploying SharePoint 2010 Workflows
- How to create custom navigation menu in SharePoint with XML data source 使用XML数据源在SharePoint创建自定义导航菜单
- How to create custom navigation menu in SharePoint with XML data source 使用XML数据源在SharePoint创建自定义导航菜单
- 转:How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- 【转载】Adding Validation to a Custom List Control in Sharepoint
- SPJS Upload for SharePoint: Custom upload page for uploading documents to various document libraries in a site collection
- How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- Adding Custom Actions to the List Item Menu in SharePoint 2010 Using SharePoint Designer 2010[Sharepoint中添加自定义菜单]
- How to Custom Ribbon UI(SharePoint Designer)
- How to redirect to a Custom Page for Event Receiver in SharePoint 2010
- [转]Writing Custom Entries to the Audit Log in Windows SharePoint Services 3.0(如何记录自定义审核日志)
- sharepoint ECMA using a custom contentType to creating a list in SubSite
- How to Integrate SAP Business Data Into SharePoint 2010 Using Business Connectivity Services and LINQ to SAP
- Sharepoint Custom Timer Job (Sharepoint 自定义定时器,定时工作,定时启动)
- How to show a Power View report at the SharePoint page (Silverlight Web Part)