If you ever had to work with SharePoint 2010 workflow I’m pretty sure you’re excited about the new version and ready to turn the page on Workflow Foundation 3. In this article, I want to share with your my developer point of view when working with the new SharePoint 2013 Workflows that, believe it or not, are not installed by default.
Get started with SharePoint 2013 Workflows
First we need to get things running, you'll need SharePoint 2013 and make sure NOT to install SharePoint 2013 Foundation since the SharePoint 2013 Workflow Platform requires SharePoint Standard as a bare minimum.
Then we need to install Workflow 1.0 (Windows Azure Workflow). Azure Workflow CANNOT be installed on a domain controller. Make sure to have at least two servers available and download Azure Workflow Manager 1.0. Bare in mind that the name Azure in this case does not mean you need to run it in the cloud.
First things first, why should you use SharePoint 2013 Windows Azure Workflows, what’s in it for you?
Windows Azure Workflow brings a new class of workflow to SharePoint Server 2013 Preview. Workflows built by using Windows Azure Workflow can take advantage of several new capabilities. These include enterprise features such as:
High Density and Multi-Tenancy
Activity / Workflow Artifact Management
Tracking and Monitoring
Fully Declarative Authoring
REST and Service Bus Messaging
Managed Service Reliability
During the installation of Windows Azure Workflow choose Custom setting as below.
Make sure to add the domain extension wherever you are prompted for a user or you might run in an access denied exception.
We also need to check the “Allow Workflow management over HTTP on this computer”
Once the installation is completed you need to register your SharePoint Farm with your Windows Azure Workflow Farm. To do so you need to execute the fallowing command in SharePoint Management Shell as Administrator.
“Register-SPWorkflowService -SPSite "http://YourServer/YourSiteCollection" -WorkflowHostUri "http://WFServer.domain.com:12291" -AllowOAuthHttp”
Now we are ready to create SharePoint 2013 Workflows, you can either go with SharePoint Designer
or Visual Studio, which will require us to install the “Microsoft Office Developer Tools for Visual Studio”. To do so you just lunch Web Platform Installer 4.0 and search for SharePoint.
Finally we are there, Visual Studio Workflow for SharePoint 2013. It’s a brand new platform that enables a lot of new features. For example we can make use of the new .NET 4.5 Framework and a lot more when building these complex Workflows.
But I soon realized that with these new features came a HUGE limitation… No more code. As we can see in this MSDN page http://msdn.microsoft.com/en-us/library/jj163199(v=office.15).aspx 2013 Workflows are now using a declarative style and all properties are set through a small window that only accept C# expression.
I personally don’t like this kind of “Programming” I find it way too restrictive, on the other hand they offer us a lot of new tools and actions to easily manipulate list items, documents or any other kind of information in SharePoint. Note that I have tested this in its early release and a lot may have changed since.
Migration of SharePoint Workflows
If you’re wondering about migration of a SharePoint 2013 Workflow, it will be very easy since SharePoint 2013 support the 2010 format. On the other hand trying to convert from SharePoint 2010 Workflow to SharePoint 2013 Workflow seems impossible since the new Workflow platform doesn’t allow writing custom code.
Needless to say, if you're thinking of migration SharePoint Workflows, it'll often be from 2007 or 2010 to SharePoint 2013. And as mentioned, the default Workflow engine there is the one from SharePoint 2010. So migrations as they are should be relatively seamless and with little to no effort. If you're looking to convert them to 2013 Workflows, there will definitely be a challenge there since you may need to rewrite or rethink them from scratch in some cases.
Thoughts on SharePoint 2013 Workflows
It should be interesting to see where everything is going to be headed in the coming months. Right now, there is a lot of advantages to use Azure to host your workflows; Scalability, monitoring, reliability and more. Don’t get me wrong there are a lot of available actions, a lot more. However, it’s very restrictive as you don’t have access to the code anymore and for me it’s tougher to do workflows now. What do you think? Have you had experience with SharePoint 2013 Workflows yet?