I had to build a fairly complex workflow not long ago. The workflow was built in SharePoint Designer 2013 and had a lot of moving parts to it. So many, that when I went to publish it I received the following error message: “Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors: Activity “SomeXActivity” has 65 arguments, which exceeds the maximum number of arguments per activity (50).” This error message is actually telling us that our workflow has too many variables within it. Basically, this is happening because when the workflow is running the Workflow Manager has to manage more 58 (in my case) variables. Workflow Manager only allows there to be 50 variables in the workflow… by default.
Back in October I did an overview of the different ways to wait for a change in a SharePoint Workflow. You also have the option to wait for a certain time, there are two options which are waiting for a set duration or waiting until a set date. Either of which are easy to control or set. I am not focusing on these actions in this post, but just a quick note if you want the date to be dynamic when using wait until a date, then you will have to set the date you want in a workflow variable prior to setting the wait value. Otherwise your date is going to have to be static and that’s probably not going to work for you in 99% of your workflows.
Today, however I want to discuss waiting for a value to change on the list your workflow is attached to.
Bit of a disclaimer: Why am I still talking about SharePoint Designer? Why not Microsoft Flow? Don’t worry, I have some Flow blogs planned. However, Designer is still widely used and will be for some time. I encourage others to use flow where they can, but remember that not everyone has access to that yet. Designer is free and anyone with a SharePoint environment can make use of it. Hence, I still see providing insight and knowledge on this product very important.
I have a bit of a TLDR here as you may be just looking for the answer, and not WHY it is occurring. I strongly urge you to read the whole post to understand why things are the way they are and to make you a better person ;-p, but if you are in a hurry or think I talk\write too much, just click here to find out what you need to do.
In my previous post on the different ways to determine the return message from a REST API call in a SPD workflow I covered using a test list and Fiddler to build your web call in a SharePoint Designer workflow. In this post I want to discuss manipulating REST API calls in SharePoint Designer 2013 workflows. Basically I want to show how you can determine what your read string is going to look like based on the values coming back from SharePoint.
Years ago when Microsoft released it’s latest version of SharePoint Designer, it came with a few enhancements that really made building workflows with Designer more robust and efficient. One efficiency enhancement was the ability to copy actions, steps and even entire stages within the same workflow or even between workflows. Microsoft also allowed for the ability to move back and forth between stages instead of continuing down a parallel path (called a state machine workflow). While the addition of state machine workflows to Designer (previously only available in Visual Studio workflows) is great; in my opinion the best (by a very small margin) addition to Designer is the ability to call web services. As your queries get more and more complex however, knowing what is coming back into the workflow can be filled with frustration as you try to determine how to get the data from the response content. While I it isn’t a new concept, I wanted to discuss handling REST responses in SharePoint Designer workflows. Or at least how I do it. The method I use is pretty straight forward and very easy to implement.
All too often when building workflows in SharePoint Designer there is a need to pause the workflow for a duration of time, or while waiting for values to change within SharePoint list\library. Microsoft has provided methods or actions within a workflow to accommodate this for quite some time. The method to accomplish while similar between versions has changed with the latest iteration of SharePoint Designer. For this reason I wanted to discuss waiting in a SharePoint Designer 2013 workflow today. I know that most are now moving to SharePoint 2016 or SharePoint online, but while Microsoft has released newer versions of SharePoint, it hasn’t released a new version of Designer since 2013. So whether you are on SharePoint 2013 or a later version, this post is relevant for the foreseeable future.