Approach to upgrading custom SharePoint workflows

來源:互聯網
上載者:User

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:

  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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.