imageRecently I went through a multi-month ordeal with Microsoft support in trying to resolve a tough issue with workflows, so I definitely want to share the simplistic resolution with others.  I’m not exactly sure when it happened, or why it happened.  As of this writing I haven’t seen this issue with SharePoint 2013, but it’s possible I just can’t speak to it.  For now, this issue happened on SharePoint 2010.  If you have ADD like me or just need the resolution and don’t need to know all the steps I tried to resolve the problem, feel free to skip to the fix. 

Step 1 – Admitting You Have a Problem

Before I dive into the issue, let’s talk workflow for a moment.  If you’re reading this, then you likely already know there are different workflow types:

  • List based workflow
  • Reusable workflow
  • site workflow

By default in SharePoint 2010 (and SharePoint 2013) there are predefined workflow templates that you can start using by just adding an instance of them to your library.  Mostly these are reusable workflows (meaning the same workflow template can be used on different libraries), and deal with document approval, disposition, or collecting feedback or signatures on said documents.  You can review all of the default available workflow templates on Microsoft Office Support.  Reusable workflow templates are generally available to any library in the given web, or to any other web if you publish that template globally, smartly called “Globally Reusable Workflows”.  The aforementioned default templates are globally published by default, allowing them to be customized using SharePoint Designer on any subsite in the site collection.

As I said, I hadn’t noticed when the problem started.  Site owners had been able to add the default approval workflow templates to libraries on subsites just fine.  It wasn’t until I got a request from the Finance department who wanted to run some approval on some purchase order forms that I discovered the issue.  I wanted to customize the default global reusable workflow “Approval – SharePoint 2010”, so I blissfully opened SharePoint Designer, clicked on Workflows, and much to my utter horror, nothing.  Bumpkis, zip, zilch, zero, nada.  They should be there on every subsite in a site collection, so what gives?  There was no obvious error, the Workflows section in Designer was just blank. 

Some Troubleshooting

imageAfter I calmed my frazzled nerves, muscle memory kicked in and I began some troubleshooting.  I was able to create a new reusable workflow, no problem.  I could then publish said workflow globally, but it wouldn’t show up either in a subsite.  So the defaults nor a non-custom global reusable workflow showed up.  However, if I opened the root web of the site collection, I saw the workflows there just fine.  Something was up for sure.  There was nothing in the ULS logs, and if I checked the wfpub directory in the root of the site collection and I could see the 3 templates there no problem, everything seemed ok. 

Those 3 default workflow templates are deployed to the site collection by a site collection feature called “Workflows”:

image

I deactivated the feature and verified in Designer (root of site collection) that the templates were gone.  I activated the feature again, and they re-deployed, but still didn’t show up in a subsite.  It’s got to be throwing an error somewhere.  After running a Fiddler trace while clicking on Workflows via SharePoint Designer, I could only see one error that looked relevant:

The web application was created as classic then converted to claims, and I noticed that the last Modified user of the workflow templates was a classic user.  So I thought maybe the owner was a classic user no longer there, and that’s the problem.  I opened the original templates and just clicked publish then checked a subsite.  No change. 

The Easy Fix

After going back and forth with Microsoft support and different teams, we found a resolution that worked for me.  Here’s what we did that fixed the issue:

  1. We ran this PowerShell to completely disable the workflow infrastructure: 
    Disable-SPFeature –Url <root site collection URL> -Identity Workflows 
    Disable-SPFeature -Url <root site collection URL> -Identity OffWFCommon 
  2. With SharePoint Designer, open the root web of the site collection.  Go to All Files –> _catalogs and deleted the entire wfpub folder  
    image 

  3. We ran this PowerShell to recreate the wfpub: 
    Enable-SPFeature –Url <root site collection URL> -Identity OffWFCommon 
    Enable-SPFeature -Url <root site collection URL> -Identity Workflows 

  4. In Site collection features, deactivate then activate the Workflows feature

After doing that, we opened a subsite, and like magic, they showed up!  I checked a few other subsites, and they all seemed fine now.  I could then proceed with what I needed to do.  I hope this helps someone else some long hours of frustration and grief!

If you have any questions about SharePoint Designer workflows or any blog on this site or C5 Insight, Contact Us!