For many enterprises, the
ability to model and automate business processes, and to include these
automated processes as part of SharePoint collaboration, is an
important goal. To meet this need, Microsoft introduced workflow
capability into SharePoint 2007 using the then new Workflow Foundation
(WF). WF was introduced with the release of .NET 3.0, and its
capability was updated in WF 3.5 and WF 3.5 SP1. As one of the first
Microsoft products to utilize WF, SharePoint 2007 provided native
workflows, but custom workflows could also be created using SharePoint
Designer and Visual Studio. Many users, however, judged this capability
to be lacking in ease of use, capability, and performance. The
following sections provide a brief history of how the workflow
capability has evolved between SharePoint 2010 and SharePoint 2013.
First, let’s briefly review the workflow capability in SharePoint 2010
for those who may not be familiar, and to provide a reference for the
improvements in SharePoint 2013.
Workflow in SharePoint 2010
While workflow in SharePoint 2010 was
similar architecturally to SharePoint 2007, it did introduce several
significant, new capabilities, including the following:
- Creating site-based workflows that did not need to be associated with a list or document library
- A new workflow event model that enabled developers to override events
- Modifying the out-of-the-box workflow templates by importing them into SharePoint Designer 2010
- Modeling workflows in Visio 2010 and then importing the design into SharePoint Designer 2010
- Creating reusable workflows, and using Visio Services to visualize the status of the workflow
- Importing SharePoint Designer workflows into Visual Studio 2010
Although these features were a great step forward
from SharePoint 2007, users still encountered challenges during the
SharePoint 2010 workflow life cycle:
- Workflows weren’t scalable because they were stored inside content
databases; therefore, they were tightly coupled with SharePoint 2010.
- Workflows were designed primarily for on-premise deployments.
- Workflows could not call external systems, such as web services.
- Advanced features such as looping were not supported out of the box
(although many partner solutions provided this capability). Nor could
you call external web services unless you used Visual Studio 2010 to
create your workflow.
- State machine workflows could only be created using Visual Studio 2010.
- Extending workflows usually required deploying customizations as a farm administrator via Central Administration.
Although most users agreed that SharePoint 2010
introduced huge improvements versus the workflow capability in
SharePoint 2007, performance and scalability remained key challenges.
To address these, Microsoft made numerous architectural changes, which
were introduced in WF 4.0 and WF 4.5, which serve as the foundation for
SharePoint 2013.
Workflow in SharePoint 2013
SharePoint 2013 workflow has a major
architectural change, and introduces a new kind of workflow engine.
These workflows, which are built using WF 4.5, run out of process from
SharePoint 2013; therefore, they are not governed by constraints
SharePoint might introduce. The fact that workflow is no longer a part
of the SharePoint core infrastructure, but instead a separate server
product, is a huge change from previous versions! This separate product
is called Windows Azure Workflow. Even though the name includes Azure, this capability runs on-premises.
SharePoint 2013 workflows execute in an Azure service called Workflow Manager 1.0.
The Workflow Manager server application should be installed on a
separate set of servers, which can be part of the SharePoint 2013 farm
or separate. The SharePoint web front end (WFE) includes Workflow Client
software that handles the integration between the manager and the
SharePoint farm. Communication between the manager and the client
occurs using the REST API, and it is secured using OAuth. The net
result is a workflow platform with improved performance and
scalability. There are also improvements to custom workflow development
using SharePoint Designer 2013 and Visual Studio 2012.
NOTE The
SharePoint 2013 workflow platform is available only to SharePoint
Server 2013; it is not supported on SharePoint Foundation 2013.
New Workflow Architecture in SharePoint 2013
Workflow now executes within Windows
Azure Workflow, which is the new workflow host that exists outside of
SharePoint 2013. Windows Azure Workflow 1.0 is a new service that
introduces new capabilities for authoring, hosting, and managing
workflows. The service builds on the successful programming model,
runtime, and activity library that was introduced with WF 4.0.
SharePoint 2013 workflows are also now fully
declarative — another big change from previous versions. This means
that workflows are no longer compiled into .NET assemblies; instead,
XAML files define your workflows and their execution. Azure Workflow
capability is also multi-tenant, which means it is available in
SharePoint online as part of Office 365. Figures 1 and 2 illustrate the high-level architectural differences between SharePoint 2010 workflow and SharePoint 2013 workflow.
Windows Azure Workflow brings a new class of
workflow to SharePoint Server 2013. Workflows built by using Windows
Azure Workflow can take advantage of several new capabilities:
- Multi-tenancy
- Elastic scaling
- Activity/workflow artifact management
- Tracking and monitoring
- Instance management
- Fully declarative authoring
- REST and service bus messaging
- Managed service reliability
NOTE The
SharePoint 2010 workflow platform has been carried forward to
SharePoint Server 2013 for backward compatibility. This means that all
your workflows built using SharePoint 2010 will continue to work in
SharePoint 2013; but because SharePoint 2010 workflows are very
different from SharePoint 2013 workflows, the 2010 workflows will not
be upgraded to 2013, so you need to do the manual upgrade yourself,
which means rewriting them on the new platform.
Windows Azure Workflow is available in two flavors:
- Windows Azure Workflow Server — Provides a scalable, robust, workflow capability for on-premises deployments
- Windows Azure Workflow Services —Provides a scalable, robust workflow platform in Office 365 and cloud-based solutions
SharePoint Designer Enhancements
SharePoint Designer 2013 is now a
first-class tool for creating workflows. It includes new functionality
designed specifically for Windows Azure Workflow:
- A visual workflow development experience that uses a Visio 2013 add-in
- A new action that enables no-code web service calls from within a workflow
- New actions for creating a task and starting a task
- New coordination actions that enable you to start a workflow built
on the SharePoint 2010 Workflow platform from a workflow built on the
SharePoint 2013 Workflow platform
- A new Dictionary data type for working with complex data types
- New workflow building blocks such as Stage, Loop, and App Step
Improved Workflow Design Features
Although previous versions of
SharePoint Designer gave workflow authors a lot of power, the design
tools still lacked ease of use. SharePoint Designer 2013 includes
several design features to make workflow authors even more productive:
- Visual Workflow Designer — With
SharePoint 2010 workflows, you could use the Visual Designer included
with Visio 2010 to visually create workflows. SharePoint Designer 2013
now includes both a text-based designer and a visual designer, and
switching between design views is accomplished with a mouse click.
- Copy and paste — SharePoint 2013
enables users to copy and paste logic and actions within the text
designer. This feature will definitely save workflow designers a lot of
time.
- Better packaging — In previous
editions of SharePoint, you had to create a reusable workflow if you
wanted to package and use that workflow in another site. Unfortunately,
list workflows did not support this feature, which made it very
difficult to share and reuse list workflows across sites. In SharePoint
Designer 2013, you can now save your list workflow as a template and
reuse it in other sites.
Improved Workflow Logic and Control
Previously, workflow designers had to
rely on custom actions or Visual Studio to achieve complex logic and
flow. SharePoint Designer 2013 contains several improvements that
provide greater flexibility and control:
- Stages — Previous versions of
SharePoint workflow required using Visual Studio to create state
machine workflows. A state machine workflow enables you to structure
your workflow logic in a nonlinear manner, providing movement in and
out of logical stages. For example, a document could move in and out of
Draft, Approved, and Rejected states, with conditions dictating the flow. This is accomplished by using the new Stage shape in SharePoint Designer 2013.
- Loops — Loops enable you to repeat
one or more actions a specified number of times. In prior versions of
SharePoint workflow, you had to rely on hacks or third-party extensions
to achieve looping.
- SharePoint 2010 Workflow Re-use —
SharePoint Designer 2013 now enables starting an existing SharePoint
2010 workflow, including passing workflow initiation parameters. This
enables you to assemble and reuse workflows built on SharePoint 2010.
In addition, you can still create and modify SharePoint 2010 workflows
using SharePoint Designer 2013.
New and Improved Workflow Actions
SharePoint 2013 includes several key improvements to workflow actions available in SharePoint 2010, including the following:
- Web Services — SharePoint 2013 now
includes the capability to call web services. This capability results
primarily from the new scalable workflow architecture of Azure Workflow
Server.
- Dictionary Data Type — The Dictionary
data type enables the creation and use of complex data structures,
which is important for web service input and output. SharePoint 2013
workflow contains new actions for working with these complex types.
- Project Server — SharePoint Designer 2013 enables you to create workflows that integrate with Project Server 2013.
- Task Actions — In previous versions
of SharePoint, workflow tasks could be a bit difficult to utilize.
Simple behavior such as determining the outcome (Approved, Rejected,
etc.) of a task was confusing. This has been dramatically improved, as
discussed later in this chapter.
- Document Translation —
SharePoint Designer 2013 includes a new action for translating
documents via the Machine Translation Service, a new service
application.