Skip Ribbon Commands
Skip to main content

Laura Rogers @WonderLaura

:

Quick Launch

Laura Rogers @WonderLaura > Posts > SharePoint Designer - Restore Previous Workflow Version
Hi everyone,
My blog now has a new URL!
You can now find me at http://www.wonderlaura.com
May 02
SharePoint Designer - Restore Previous Workflow Version

Have you ever published changes in a workflow in SharePoint Designer and wish you hadn't? There is a little known way to go in and restore a previous version of your workflow. This uses the same versioning capability that lists and libraries have. By default, every time you publish changes to a workflow, they are saved as a new version.

This solution applies to all versions of SharePoint 2010, 2007, and SharePoint Online with Office 365.

Here's how to revert to a previous version:

  1. In the left pane of SharePoint Designer, click the little pin icon next to All Files.

  2. Once All Files is expanded, scroll down and expand out your folder called Workflows. Note that if you have not actually created any workflows yet, you will not have this folder. Each workflow will be a "subfolder" under workflows. One weird little thing to point out also is that if you changed the name of any workflow after you created it, that new name will not show here, only the original name of each workflow will show in this list.

  3. The workflow that I want to restore a previous version of is called "Check Audit Month", so I'll expand out that folder. Now I can see all of the files that my workflow is comprised of.

  4. Each of these files has a set of versions. Right click on the XOML file, and choose Version History. I want to get rid of all the changes I made today, and revert back to the 4/12 version which I know worked correctly. I scroll down and click on the most recent 4/12 version. (I've blurred out the domain name I'm working in)

  5. Click Restore.
  6. Right click on the next file, the XOML.rules. Go find that exact same date/time of the file as the one in the previous step, and restore it. Note that the version number may NOT be the same.
  7. Right click the next file, which is xoml.wfconfig.xml. Do the same thing by finding that same date/time that matches the one you restored at step 4. Restore it.
  8. In this case, I don't need to change anything about my InfoPath XSN file, which is the task form as part of tasks that are assigned in the workflow. I'm skipping that one.
  9. Important step after you've restored the old versions… EXIT SharePoint Designer. This is because of a cached version of your workflow needing to be refreshed.
  10. Re-open your site in SharePoint Designer. When you open your workflow in the normal way now (as opposed to the funky way we did in step 2), you will see that good old version that you just restored.
  11. Click Publish. Now your restored workflow is live and in use on the site.

Comments

Sushrut

Thanks for sharing this way! This will be helpful.
 on 5/3/2012 12:01 AM

Tunde

Thank you. Very helpful post. What's the best practice to backup/restore my sharepoint designer workflows, incase of a system crash?
 on 5/3/2012 12:52 AM

Jasper Oosterveld

This is a great article and really helpful! Thanks for this, I learned something new today :-)
 on 5/3/2012 8:25 AM

Erich O'Donnell

I'm assuming you wouldn't want to do this if your previous workflow version still has running workflow instances, correct?
 on 5/3/2012 1:29 PM

Brad Saide

@Erich - This only allows NEW workflows to use the workflow that was republished, and does not affect existing workflows.
 on 5/3/2012 7:19 PM

nfatima

Thanks for sharing a wonderful update. To restore previous  workflow versions must visit dshift.com/sponline
 on 5/7/2012 5:31 AM

Laura

Tunde,
You'd rely on your SharePoint server-level or database level backups for that type of situation.

Erich,
Brad's right.
lauraNo presence information on 5/25/2012 12:55 PM

meena

hi laura,

can you please tell how to restore the infopath forms the same way ? I got an orphaned field in my infopath. because before removing the field from content type i deleted teh site column. now am unable to add any new fields.

thanks,
mee
 on 6/19/2012 8:16 AM

Laura

Meena,
For that, there's a free tool on Codeplex.com called SharePoint Manager.  You'd have to run that on the server, and dig in to (carefully) find those orphaned fields.  Either that, or get someone who knows PowerShell to get rid of them that way.
lauraNo presence information on 6/27/2012 10:10 PM

Shivaji

very Helpful !! Thanks Laura !!
 on 7/6/2012 7:43 AM
​I have disabled any new comments on this, because my blog has moved to a new site.  Please go here: http://www.wonderlaura.com
RSS FeedFacebookYouTube
 

 Our Books for End Users