List deleted and recreated - workflows lost forever?


Badge +16

Hi All

We have an application in development at the moment.  We are using powershell scripts to create the lists as this application may be deployed in multiple places.  A change was needed to a list so we deleted and recreated the list with the script, but I forgot (doh!) that I had developed two quite meaty workflows on the list before it was deleted.

Does anyone know if there is a way to get them back?  where do they go?  are they gone forever?  Do I need to start all over again? cry.pngcry.png

Thanks in advance, a very hopeful Cassy confused.png


11 replies

Userlevel 7
Badge +17

Is this on-prem?

Badge +16

yup!

Userlevel 7
Badge +17

Sorry i'm not able to pre-test this suggestion before-hand, but it looks promising.

  1. Create a new list exactly like the deleted one. Once created, in SPDesigner go to Lists and Libraries > your new list > make note of the List ID.
  2. In SharePoint Designer, go to All Files > Workflows and find the orphan workflow. Edit in advanced mode the .xoml.wfconfig.xml file.
  3. Find the attribute <Association ListID= and replace the current GUID with the GUID of the newly created List.
  4. Close SPDesigner, then reopen it. Go to the list and your workflow should be there
Userlevel 5
Badge +12

The deleted list isn't in the Recycling Bin by chance is it?  If it is you might be able to restore it.   The other alt is maybe you have a nightly backup that you could restore from (roll back).

Badge +16

unfortunately not on the recycle bin Mike Msad.png  I will try Andrew Glasser​ suggestion tonight and see how I get on with that - not a fan of asking for restores (they never go well!).

Thanks happy.png

Badge +16

I am excited to try this and so super hopeful it might work, thanks Andrew Glasser​!  I will most definitely keep you posted.  I will try and sort it tonight when I get some quiet time to concentrate on it.

Badge +16

ah sorry Mike M​ I was being daft, I was in the wrong non-admin account when I looked in the recycle bin.  Lo and behold it was there, restored and there are my workflows grin.png

Thank you so much!

Badge +16

Hi Andrew Glasser

Before I realised I was in with the wrong account to find the list in the recycle bin, we tried what you suggested.  it was all going well until we saved the update of the list in the workflow:

SPDError.png

the web file properties box popped up to which we clicked OK, then we had very unhelpful alert!  that's as far as we got.  I know I don't need this anymore as I was able to restore from the recycle bin, but thought you might like to see what happened from your suggestion.

Anyway, thanks again for taking the time to help me out, I was really panicking last night!

Userlevel 5
Badge +12

Awesome, glad to hear!

Userlevel 7
Badge +17

Great idea Mike!

Interesting result with the earlier try, it still should be possible to reassociate the workflow as it is still in the database but orphaned. I may attempt to test that out.

Userlevel 6
Badge +13

Appreciate this is an old one, but I'm curious as to whether you ever got this solution to work @andrewg . We have a similar situation and I can see the orphaned workflow in SP Designer, but editing the xml doesn't make a difference. The thing here is that our list has been restored so already shares the same GUID as the original list but none of the workflows exist in the restored list.

Reply