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.
Yesterday I copied and pasted one of my 2013 SPD workflows to a new one. All passed well, but my workflow failed on the start with the following error:
RequestorId: 1a9862c8-3314-4e2a-a3e8-85d79f2cd7c9. Details: System.ArgumentException: ContentTypeId
at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
The words about ContentTypeId helped me to identify the cause of the issue quickly. In my new workflow task list defered from the one in the old. Hence, it didn’t have my custom task content types and WF failed when tried to create a task.
So, the solution is pretty simple: Make sure whether your task list contains your custom task content types. If you remeber that you have added them, check whether your WF uses that list (maybe your WF uses another one).
Hope it saves somebody some time.
Several hours ago, Microsoft released Visual Studio 2012 Update 2. This update includes several improvements for SharePoint 2013 development.
Some points from the description to this update:
- Support is now provided for web and load testing for SharePoint applications.
- Support is now provided for record and playback through Coded UI to perform UI validations on SharePoint 2013 applications.
- IntelliTrace support is the same as that provided in SharePoint 2010.
It is almost installed on my development environment and I hope, today, I will try these new features
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:
Several months ago I stumbled into an issue. I had OData data source with events and had to connect it to Outlook. Usually, it is a very simple task to map a content type to Office Item Type using SPD. However, for a while, SPD can’t work with OData at all. So, it was impossible to use common tool for that.
After three days of unsuccessful googling and asking how to achieve it everywhere I tried to investigate it myself and found a way to do it!
Today, I stumbled into an issue. I copy-pasted some part of SPD 2013 workflow to another one. Both WFs are located on the same site and both uses lists which contain the same fields. After pasting I had to fix only step transition parts (on the bottom of every step), but after that the check WF for errors passed well. However, the new WF always failed with the following error message:
In this post I want to collect typical questions, which have high chances to appear if you implement custom SharePoint 2013 ASP.NET task form. I am planning to update this post as soon as I find new information which could be usefull for others. If you have some ideas, what questions and solutions should be included in this post, don’t hesitate to write a comment. Also, if you have a better solution for questions here, please, let me know. It could help us a lot!
Table of contents.
Q1: How to get a reference to a related item from SharePoint 2013 task form?
Q2: Why can’t I update my workflow which was created in Visual Studio?
Q3: Is it possible to use InfoPath task forms in SharePoint 2013 workflows?
This is the second post of the series related to SPD 2013 Workflows. In this post I will show you how to implement custom ASP.Net task form and embed it into your workflow. Some parts of this task are straightforward; However, there are several pitfalls and changes from SP2010.
This is the first post of the series related to SPD 2013 Workflows. During this series we will create and improve a solution based on SPD 2013 Workflows.
As you most likely know, SP2013 has possibility to use new workflow system (based on Workflow Manager). However, it is impossible to use InfoPath task forms with it. In addition, API which we could use for communication with 2010 Workflows doesn’t work for 2013 ones. In this series of posts I want to show you how to create SP2013 workflow, customize its task forms and implement some typical features like reassigning of the task or Request Changes/Task another person with supplying additional information behaviors.