Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

If I have a Site Workflow on my development machine, what's the best way to deploy it onto the production system which is hosted on Microsoft SharePoint Online?

I have found a way of doing it which involves loading up SharePoint Designer, then going to All Files > Workflows, going into the particular workflow folder and then exporting each file individually. They can then be imported in a similar fashion, using Import Files to drop all the exported files into a folder under All Files > Workflows. I have noticed I have to load up the workflows and reassociate the list IDs to the ones in the production site, and sometimes I have to load up and republish the InfoPath forms.

I notice that you can export the whole site by saving it as a template. If I import this into Visual Studio I can select to only import the Workflow modules and Workflow associations. Upon packaging the solution as a WSP, activating this on my production system and then activating the 3 features I have (Module, Workflow Association and Element) I do not get the Site Workflows appearing in All Site Content > Site Workflows. I can see the files in SharePoint Designer under All Files > Workflows, but it gets an error when opening the xoml in order to publish it.

I can't seem to find anything on the web about exporting/importing site level workflows. Is it possible to do without exporting each file individually? Any advice appreciated, thanks.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I have found a way of doing it which involves loading up SharePoint Designer, then going to All Files > Workflows, going into the particular workflow folder and then exporting each file individually. They can then be imported in a similar fashion, using Import Files to drop all the exported files into a folder under All Files > Workflows. I have noticed I have to load up the workflows and reassociate the list IDs to the ones in the production site, and sometimes I have to load up and republish the InfoPath forms.

After a bit more investigation, this is the only way I have found of accomplishing this. Also note that the Workflows folder in All Files must already exist beforehand. If it doesn't, SharePoint doesn't recognise it as a Workflows folder and will create it's own upon one being created in the site (e.g. named Workflows1). If Workflows does not exist, you can create an empty Workflow in order to establish the folder, and then import the exported files into a subfolder as detailed above. The subfolder has to be named exactly the same as it did on the source server. Once the files have been imported, the workflow needs to be opened from Workflows in the left hand pane (or All Files > Workflows), any IDs re-associated to the current site, and any customised InfoPath forms have to be opened and republished.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.