Approach to upgrading custom SharePoint workflows

本文介绍了在生产环境中升级自定义SharePoint工作流的步骤,包括更改工作流组件版本号、更新Solution Id和部署新的工作流组件包,以避免在运行的工作流实例中出现序列化和反序列化问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Approach to upgrading custom SharePoint workflows   

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:

  1. Change the workflow assembly’s version number
  2. 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
  3. Change the SolutionId in your manifest.xml file
  4. Change the name of the .wsp solution package (i.e. CorpSite.Workflow.ITRequest.wsp to CorpSite.Workflow.ITRequest.v1.1.wsp)
  5. Deploy the new .wsp solution package
  6. Run IISReset
  7. 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
  8. Create a new workflow association using the new workflow that was just deployed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值