Friday, June 27, 2014

Update Workflow Definition in Production Environment

When you develop workflows in your developing environment you simply re-deploy your SharePoint-project to dev-server, and Visual Studio deletes workflow definitions and associations:

 3> Deleted file 'http://portal-dev/wfsvc/de109848e7d84f2bb90713227d48d9fe/Workflow.xaml' from server.  
 3> Deleted file 'http://portal-dev/wfsvc/de109848e7d84f2bb90713227d48d9fe/WorkflowStartAssociation' from server.  

But when you have developed workflows and publish them to the production environment, you will meet an issue that workflows are not updating.


To update workflow definition in production environment you need to edit workflow Elements.xml and edit
  • <File Url="Workflow.xaml" ...
  • <File Url="WorkflowStartAssociation"...
 Add the following attributes to these nodes:
  • IgnoreIfAlreadyExists="FALSE"
  • ReplaceContent="TRUE"

Then update your wsp-solution in production environment and re-activate workflow features. That's all!

1 comment:

  1. Will this solution retains the previous versions running?

    ReplyDelete