Unable to create 2013-platform workflows through SharePoint Designer 2013

I recently hit another “flavor” of this problem when trying to create a 2013-platform workflow using SharePoint Designer 2013.  Whenever I choose to create a workflow using 2013-platform, the dialog box will vanish just as though it’s about to create the workflow designer for me and then the “Downloading data” dialog shows up for a second, then the dialog stating that SharePoint Designer 2013 is creating a local cache of the items it needs (web information, DLL proxy etc.,) comes up and vanished without giving any clue as to what happened.  Needless to mention, I did not see the workflow designer.

The create workflow dialog.

image

The downloading data dialog.

image

Then the cache building dialog comes up.

image

Then… nothing happens!

Now we know that SharePoint Designer 2013 issues web calls to the server it’s connecting to pull all the information it needs.  With this knowledge, I pulled up our good friend Fiddler and looked at what’s happening behind the scenes.  There was this following request:

<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="15.0.0.0" ApplicationName=".NET Library" xmlns="https://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="GetActivitySignatures" Id="934" ObjectPathId="916"><Parameters><Parameter Type="DateTime">0001-01-01T00:00:00.0000000</Parameter></Parameters></Method></Actions><ObjectPaths><Method Id="916" ParentId="912" Name="GetWorkflowDeploymentService" /><Constructor Id="912" TypeId="{4ccc7f0e-bf7e-4477-999c-6458a73d0039}"><Parameters><Parameter ObjectPathId="3" /></Parameters></Constructor><Identity Id="3" Name="740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:12ea7af2-a10f-4eb8-a0bd-b600a085a2b8:web:0feddf5a-d707-4811-b1b1-3e46ba3eb9cd" /></ObjectPaths></Request>

Which resulted in the following response:

[
{
"SchemaVersion":"15.0.0.0","LibraryVersion":"15.0.4667.1000","ErrorInfo":{
"ErrorMessage":"File Not Found.","ErrorValue":null,"TraceCorrelationId":"1871ef9c-f2ff-e017-728a-ae7eecfba3fc","ErrorCode":-2147024893,"ErrorTypeName":"System.IO.DirectoryNotFoundException"
},"TraceCorrelationId":"1871ef9c-f2ff-e017-728a-ae7eecfba3fc"
}
]

Now the System.IO.DirectoryNotFoundException was familiar to me from the previous post, so it was a quick guess.  But the point is that when workflow deployment service is called (specifically the call GetActivitySignatures) ends up in Microsoft.SharePoint.WorkflowServices.Activities.dll.  Now this was a new environment I provisioned and I was careful to first get workflow manager registered with SharePoint Server 2013 and then install Office Developer Tools for VS 2013.  However, I did not recall to create the WorkflowActivities folder and drop Microsoft.SharePoint.WorkflowServices.Activities.dll into it as explained in my previous post linked.  Apparently, SharePoint Designer 2013 wasn’t able to communicate with the workflow manager because of the above error.

After implementing the fix in my previous post, SharePoint Designer 2013 was good and I was able to create workflows using 2013-platform.

As an aside, if we implement the fix and then delete the WorkflowActivities folder, we can still create 2013 workflows without problems.  This is because once the activities are cached, SharePoint Designer 2013 picks it up from cached location.  However, I think we should not do that (i.e., deleting WorkflowActivities folder) because when WFM/SharePoint is upgraded and if there’s a newer version of Microsoft.SharePoint.WorkflowServices.Activities.dll, we’ll run into the same problem.

Hope this post was informative and useful…!