Sharepoint Desinger 2010 - Transfer Reusable Workflow from Stage to Prod

5.5k Views Asked by At

I need to transfer a reusable Workflow from the stage env. to the prod.

The workflow is associate to a list, so the list id is stored in the workflow.

Is it possible to transfer the workflow and change the list id to the list name with Visual Studio? (We have no SharePoint Designer access to the prod. env.)

3

There are 3 best solutions below

3
On BEST ANSWER

Short answer: No

I tried several hours to fix a reusable workflow, which same as yours was associated with a specific list - I switched systems and the GUID changed --> Workflow was broken.

You can give it a try and rename the MyWorkflow.wsp to MyWorkflow.cab and extract that somewhere. The workflow files are XML based hence you can edit the associated list GUID with your favorite editor. Now you need to package your edited file back into a cab file, rename it to wsp and you can give it a shot. I tried exactly that and resented to just "re-clicking" (as it's SPD) my workflow (two screens come in handy here).

That's what I call "reusable" workflow... Next time do not associate your reusable workflow with anything to keep it reusable.

5
On

I would recommend creating an Content Type in a Feature and then base your list and your Reusable Workflow association on that Content Type. We had a project in December where we successfully used this method. I saved a Reusable Workflow as a template. I then deployed the Content Type solution package and the Workflow solution package to another environment. Worked like a charm.

1
On

There are tow alternatives for deploying workflow regardless the assigned content types It is very simple just do the following:

Alternative One

  1. Save the workflow as template
  2. Go to the following path in your site http://your_server_Address/SiteAssets/Forms/AllItems.aspx
  3. Download the file as WSP
  4. Go to the following URL http://your_Target_server_Address/_catalogs/solutions/Forms/AllItems.aspx
  5. Upload the WSP, and activate the solution
  6. Go to the site settings, then Site Actions, then Manage site features
  7. Activate the feature that is related to the workflow
  8. If you click workflows under site administration you would be able to see your custom reusable workflow

Alternative Two

  1. Save the workflow as template
  2. Go to the following path in your site http://your_server_Address/SiteAssets/Forms/AllItems.aspx
  3. Download the file as WSP
  4. Open your visual studio
  5. Click add new project
  6. Under SharePoint choose 2010
  7. Choose Import reusable work flow
  8. Follow the wizard
  9. Project will be created and can be deployed

Note : Make sure your workflow is reusable and that it has no errors