I have experienced this issue several times on different farms. After some manipulations with the workflow using SharePoint Designer or a web browser, occasionally, it started to be impossible to open published workflow. The others workflows continued to work as expected, whereas when I tried to open the one that started to misbehave it showed the following error message “Failed to load the workflow definition for the workflow”.
Sometimes when you work on workflows in SharePoint Designer you can not publish it, because the Check for Errors fails with the following mesage: “The workflow contains errors, but they are not visible in the current view”
Usually in this case you really can’t see the place where the error is and it seems like everything is OK.
I spent some time to understand where the error is when I saw this error the first time. Most likely it is an issue in SPD; however, it is rather simple to overcome it and force SPD to show the place the error is.
The solution: you just have to save your workflow (by pressing Save button in the ribbon), close it and open it again (by selecting it in the Navigation\Workflows and pressing the “Edit workflow” link).
After that you should be able to see what fields are set incorrectly:
You can press Check for Errors button to highlight all the errors with the red color:
I stumbled into this moment several times after copying-pasting my workflow. It seems like this new feature works well in the most parts of the workflow, except the Transition to stage part. At least, in my cases after pasting I had to repair fields in the Transition to stage part only.
Today I stumbled into the following error message while was publishing SPD 2013 workflow:
Errors were found when compiling the workflow. The workflow files were saved but cannot be run.
Microsoft.Workflow.Client.WorkflowCommunicationException: The request was aborted: The request was canceled. Client ActivityId : 7a290e9c-0917-7088-afc4-e65fd25c5c0b. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.ServiceModel.ServiceActivationException: The requested service, 'net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc' could not be activated. See the server's diagnostic trace logs for more information.
Server stack trace:
Another symptom is that workflow cancels on start with the following error message:
Several days ago I stumbled into an issue. I could not publish even simple 2013 workflow which contained the only “Start a task process” activity (WF with the only “Log” activity worked well). The check for errors passed well, but I could not publish it. I got the following error message: