We have created a List Workflow using SPD and moved the site to another location using Export & Import-SPWeb cmdlets.
Now, we are unable to the workflow on the new site? is that expected behavior? and how to solve this?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
The issue you are seeing is that your lists in your imported site have all new GUIDs as identifiers. However, your workflows still have references to the old previous list GUIDs from the previous site. To update this, perform the following steps:
For each one that is empty, do the following steps
Save the file and CLOSE OUT SPD....this step is important. Reopen SPD and verify your list is now reassociated correctly (Until you reopen SPD, the association is not re-synced)
reopen the workflow via SPD
you may also have broken references in the workflow itself
Yes it's possible but it can be annoying. You can create a good workflow on List A and an empty workflow on List B. Then open Workflow A in a text editor and copy the code. Open Workflow B in a text editor and paste in the code. You may need to do this on two files.
Now the important part. You need to replace all of the list GUID references in the pasted code. They will reference List A until you replace them. I've done this with a global find and replace. It's not an elegant solution but sometimes it's necessary.
You can also use SharePoint Designer. Just open the workflow in text-based designer, press CTRL+A to select everything, copy and paste into a new empty workflow.
Some of your variable references may get damaged on the way, so you may need to edit them, remove and add the variables on all the formulas. Not very convenient I know, I used this with SharePoint online.