0% found this document useful (0 votes)
141 views25 pages

SharePoint Designer 2010 Workflows Preview PDF

Uploaded by

Sathya Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views25 pages

SharePoint Designer 2010 Workflows Preview PDF

Uploaded by

Sathya Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Volume 2

Issue

UNDERSTANDING SHAREPOINT JOURNAL

Bjrn Christoffer Thorsmhlum Furuknap

SharePoint Designer
2010 Workflows

UNDERSTANDING SHAREPOINT JOURNAL

SharePoint Designer 2010 Workflows

I dedicate this issue to my lovely wife, Lena.

USPJA Publishing
USPJA Publishing LLC
831 Beacon Street
Suite 118
Newton Centre, MA 02459
United States
Phone +1 877 90 USPJA
http://www.understandingsharepoint.com/journal
[email protected]

Credits
About the Author
Bjrn Christoffer Thorsmhlum Furuknap is a senior solutions architect,
published author of Building the SharePoint User Experience, speaker, and
passionate SharePointaholic. He has been doing software development
professionally since 1993 for small companies as well as multinational
corporations. He has also been a teacher at a college-level school, teaching
programming and development to aspiring students, a job that inspired him to
begin teaching what he has learned and learns every day.

About Understanding SharePoint Journal


Understanding SharePoint Journal is a periodical published by UnderstandingSharePoint.com. The journal
covers few topics in each issue, focusing to teach a deeper understanding of each topic while showing how
to use SharePoint in real-life scenarios.
You can read more about USP Journal, as well as get other issues and sign up for regular updates,
discounts, and previews of upcoming issues, at http://www.understandingsharepoint.com/journal.

Other Credits
A great big thanks to Kim Wimpsett for doing the copyedit. The quality of work in this issue is greatly
attributed to her skill. Jon Tobey has also been an invaluable help in writing this issue.

Table of Contents
Credits....................................................................................... i
About the Author .............................................................................. i
About Understanding SharePoint Journal ........................................ i
Other Credits.................................................................................... i

Table of Contents ....................................................................... i


Introduction .............................................................................. 4
Workflow in a Nutshell .............................................................. 6
So, What Is a Workflow Anyway? ................................................... 7
Sequential and State Machine Workflows ....................................... 8
Site and List Workflows ................................................................... 9
Workflow Terminology................................................................... 10
Actions .................................................................................................... 10
Branches ................................................................................................. 10
Workflow Step ......................................................................................... 11
Variables ................................................................................................. 11
Initiation Parameters ............................................................................... 11
Workflow Forms ...................................................................................... 11

Mission Statement ........................................................................ 11


What You Will Need ................................................................................ 12
Rules of Engagement ............................................................................. 12

SharePoint Designer Overview .............................................. 14


So, What Are SharePoint Designer Workflows? ........................... 15
List Workflows ......................................................................................... 16
Reusable Workflows ............................................................................... 16
Site Workflows ........................................................................................ 17

Get to Know the SharePoint Designer Workflow Designer ........... 17


Backstage UI........................................................................................... 18
Task and History Lists ............................................................................ 21

Workflow Editing ........................................................................... 22


Steps and Actions ................................................................................... 23
Saving and Publishing ............................................................................ 26

Your First Workflow ................................................................ 29


Notify Administrator ....................................................................... 29
Setting Up the List................................................................................... 30
Play Ball .................................................................................................. 31
Authoring ................................................................................................. 32

Setting Activities...................................................................................... 32
Publish the Workflow .............................................................................. 37

Forms, Parameters, and Variables ......................................... 44


Initiation Form ............................................................................... 44
Parameters ................................................................................... 46
Editing Forms .......................................................................................... 49
Editing Workflow: Add or Change Lookup .............................................. 53

Working with Variables.................................................................. 54


Renaming Variables................................................................................ 58

Collecting Data from Users .................................................... 63


Collecting Data from Users ........................................................... 63
A Short Intermission................................................................................ 71

Workflow Lookup .......................................................................... 76


Secondary Lookup .................................................................................. 78

Publish and Verify ......................................................................... 80

Workflow Logic ....................................................................... 83


Conditional Branching ................................................................... 83
Setting Conditions ................................................................................... 84

Other Conditions ........................................................................... 91


Parallel Blocks .............................................................................. 95
Adding a Parallel Block ........................................................................... 95
Test ......................................................................................................... 97

Solution Overview ................................................................ 101


Preparation ................................................................................. 101
Create SP Group, Add Members .......................................................... 102

Create Student Reports Library .................................................. 102


Create Basic Content Type ................................................................... 102

Solution Outline ........................................................................... 103


Site Workflow .............................................................................. 104
Collect Student Name, Class Name, Facilitator, and Auditor ............... 105
Content Type Revisited ........................................................................ 108

Create the Second Workflow ...................................................... 111


Build the Steps First .............................................................................. 112
Linking Workflows ................................................................................. 113

Update List Item to Set Multiple Values at a Time ...................... 114


Define User ........................................................................................... 115
Getting Approval ................................................................................... 117

More Content Type Updates ....................................................... 119


Set Workflow List Item Properties ............................................... 119

Adding Feedback and Grades .............................................................. 120

Creating the Report Document ................................................... 122


Preparations .......................................................................................... 123
Building the Name String ...................................................................... 126
Now, Lets Get That Report Created .................................................... 128

Connecting Workflows in SharePoint .......................................... 129


Testing ........................................................................................ 131

Final Thoughts and Additional Resources ............................ 137


Previous USP Journal Issues ............................................... 138
Volume 1 (SharePoint 2007) ....................................................... 139
Volume 2 (SharePoint 2010) ....................................................... 139

Introduction
Asking the right question at the right time to the right people can trigger a landslide.
Welcome to the wonderful world of SharePoint Designer workflow. Through this
issue, youll learn much of what you need to become productive as a workflow
developer using Microsofts latest version of SharePoint Designer.
If you are a new reader of USP Journal, then a second welcome is in order. For
previous readers, however, you may notice some changes to this issue, and Id like to
point them out before we go on to the learning. First, this issue has taken a long time
to write. The reason is that in the past few months, I have been very busy starting the
worlds first SharePoint university, called USPJ Academy. Were still in the Early
Access period where only a select few students have been enrolled to help us evaluate
the platform and content, but there is still so much work to do that finding time to sit
down and write is difficult.
Second, for this issue, I have elicited some outside help in the writing. Jon Tobey
generously offered to help out to speed things up and has provided invaluable advice
and content for this issue.
Third, the entire USP Journal is now part of USPJA Publishing, the publishing arm of
USPJ Academy. That wont necessarily affect the journal directly beyond the address
change on the second page, but it does mean that the future of the journal is looking
brighter than ever.
I hope you enjoy this issue and that youll get everything you need from it. As always,
I value your feedback, so please send that to [email protected] if
you have any questions, comments, or suggestions.
.b

Chapter

Workflow in a Nutshell
Understanding the path you walk
Welcome to one of the most powerful features of SharePoint: workflows. Inside
that small word lies a world of opportunity and perhaps the single most valuable
piece of technology currently available. Workflows bear the promise of business
process optimization beyond the wildest dreams of anyone.

I C O N

K E Y

Valuable information
Exercise

Caution

OK, Ill stop the marketing talk. Were not here to blindly buy into what Microsoft
says; we are here to understand SharePoint and increase our knowledge of
workflows in SharePoint Designer. By virtue of that alone, we will become all the
marketing SharePoint requires by showing how great this tool and platform can be.
Before we can commence any investigation into SharePoint Designer, we need to
understand some key concepts in workflows.
Workflows saw a rise in popularity after Microsoft started marketing Windows
Workflow Foundation as part of the .NET Framework. Released as part of .NET 3.0
in 2006, workflows quickly became an important part of business applications even
for smaller businesses and projects. These days, it seems you cant walk down the
street without stepping into one or more workflows.

Note

Although initially marketed as WWF, the marketing guys and gals in


Redmond got a visit from some really huge and scary men wearing
funny clothes and masks and sporting names like Hulk Hogan and The
Undertaker and decided that they might as well use the acronym WF.
Either that or they realized they didnt need the connection to pandas
and other threatened species. In any case, I will be using the official
acronym WF throughout this journal.

So, What Is a Workflow Anyway?


Workflows are just what their name implies, flows of work. Think of any process
where some set of actions is performed, such as buying an item in a store, taking a
shower, filing a letter, or even dating someone special. All of these tasks are
composed of tasks or states where some action or event is expected.
Lets take a look at one of them, buying an item in a store.
When you buy an item, you need to do the following:

Find the correct item.

Take the item to the counter.

Receive the price from the attendant.

Decide between using cash and using a credit card.


o If using cash:

Give the appropriate amount to the attendant.

Receive any change.

Verify the change.

Pocket the change.

o If using a credit card:

Give the credit card to the attendant.

Receive the receipt for a signature.

Verify the amount.

Sign the receipt.

Return the receipt to the attendant.

Put pen in pocket.

Retrieve the item, and run before the attendant notices the missing pen.

Dont be fooled. This task may seem simple, but thats only because we do it so
often it has become routine. Several of these steps require a number of substeps, and
any failure will need to be handled according to some set of rules.
A workflow structures such processes into manageable chunks called activities.
Each activity performs one or more small operations, such as verifying an amount
or stealing a pen, and the workflow makes sure that everything is done in order and
handles exceptions to the regular flow.

Sequential and State Machine Workflows


Workflows come in two varieties, sequential workflows and state machine
workflows. Although theyre two different terms, the two forms are closely
connected.
The simplest form is the sequential workflow in which a series of actions occur in a
predefined sequence. You can use conditions to branch the workflow, but in the
end, it is just a matter of going from one end to the other in order. SharePoint
Designer workflows are sequential workflows.
A state machine workflow is a bit more complex, but if you think of state machine
workflows as collections of sequential workflows, you may find them easier to
understand. Each state in a state machine is really just a separate sequential
workflow. Either during or at the end of each such subworkflow, you can enter
another state and thus trigger a second sequential workflow.
Another difference is that although a sequential workflow always ends, a state
machine workflow may keep going indefinitely, at least in theory. Think of the
workflow to have someone exchange the calendars in an office at the end of the
yearunless time itself stops or we stop using calendars, that workflow will keep
going forever.
State machine workflows are particularly well-suited for workflows that require
human interaction. The reason is that humans rarely behave in a strictly sequential
manner and often jump in another direction than the designer of the workflow
anticipated.

State machine workflows can cope with this situation much better than sequential
workflows because state machines by design encourage jumping between different
states depending on the outcome of other states.
Note

This issue of the journal will deal only with sequential workflows,
because SharePoint Designer sadly supports only sequential
workflows.
That said, you can simulate a state machine workflow in SharePoint
Designer by using a repeating workflow and what are known as
secondary workflows. Explaining the details of how to do this is
beyond the scope of this issue, and frankly, theyre not recommended
in a production environment.

Site and List Workflows


Another concept you need to understand is the difference between site and list
workflows.
Prior to SharePoint 2010, your only option was to create list workflows. List
workflows run in the context of one list item or library document. For example, you
may have a document containing an application for a loan, and you would run the
workflow to approve or reject the load in the context of that single document.
In contrast, a site workflow does not run in the context of any list item or library
document. With a site workflow, you are not limited to working with a single item
or document anymore, but you also lose the document or item context.
You would use a site workflow when you want to work on multiple items or
documents, for example, or when you want to work with tasks that do not concern
any specific item such as creating a new site. Because site workflows are not
associated with an particular document or list item, you must manually start them.

Note

In theory, you can design a site workflow to find a specific document


and work with that. In some cases, that may be what you want.
Sadly, though, although the SharePoint 2010 platform now has rich support for site
workflows, SharePoint Designer does not. There are no activities to create a new
site, for example. Also, since there are no built-in loops, you wouldnt be able to
create a workflow to work on all items in a list or library, which would have been
great.
Oh, youre confused about the terms activities and loops? Let me give you a quick
overview of the terminology used in workflows.

Workflow Terminology
If you are new to workflows, the terminology can be confusing at best. To help with
this confusion, I have compiled the following sections, which explain the various
terms and phrases that comprise the workflow lingo.
Actions
Actions are the individual tasks that a workflow performs during its execution. An
action can be sending an email, assigning a task to someone, creating a new list
item, or performing many other tasks.
Actions or Activities?

The terms actions and activities refer to the same thingthe individual
tasks performed in a workflow. Throughout this issue, I am using the
term action, but you may encounter the term activity in other
situations.
We will examine many of the available actions throughout this issue.
Branches
A branch in a SharePoint Designer workflow is an action or set of actions that the
workflow performs if a condition is met. A branch can also have no conditions and
is then called a default branch.
The default branch will execute if none of the conditions on other branches is met or
if there are no branches with conditions at all.
If multiple conditions are met, the branch defined first in the step will execute.

10

Branching will be covered in Chapter 5.


Workflow Step
A workflow step is just that, a step of a workflow. Each step comprises at least one
branch that again comprises one or more actions. Each step will perform only one
branch and thus only one set of actions.
You can have as many steps as you like or, rather, as many steps as you need. Im
sure there is a limit to the number of steps, but you will need to seriously reconsider
your design if you ever need a lot of steps.
Variables
A variable is a named value, for example the price of an item, the number of days
until Christmas, the name of the manager of a department, and so on. Developers
(yes, that means you, because you will be a workflow developer in about 80 pages)
can use the name of the variables without knowing the underlying value.
Variables are based on one of five variable types, and the values entered into the
variables must conform to those types. For example, for a date variable, you need to
enter a date and not a number.
Initiation Parameters
Initiation parameters are values that the user starting the workflow enters before the
workflow starts. The initiation parameters are stored in variables so you can access
the values during the workflow execution.
We will look more at variables as well as initiation variables in Chapter 2.
Workflow Forms
During the execution of a workflow, you might find it necessary to interact with a
user, for example to collect data, ask the user to perform a task, or just start the
workflow. The pages that the users see while interacting are called workflow forms.

Mission Statement
Throughout this journal, we will learn about SharePoint Designer workflows. We
will do so by creating a solution that mimics the grade process at the USPJ
Academy.

11

What You Will Need


This issue is based on the RTM version of SharePoint 2010, specifically the free
version of SharePoint called SharePoint Foundation 2010.

SharePoint Designer:

First, you need an up-to-date SharePoint installation. You should make sure you get
the most recent updates as well, because fixes and updates may alter your
experience.

http://www.microsoft.com/spd

SharePoint Foundation
2010:
http://www.understandingsharepoi
nt.com/url/10103

Second, you will of course need SharePoint Designer (SPD). SharePoint Designer
was released free of charge on April 2, 2009, so all you need to do now is download
and install it. You will find the link to SharePoint Designer 2010 in the sidebar to
the left.
Note

You must use SharePoint Designer 2010 to work with SharePoint


2010based sites. You cannot use SharePoint Designer 2007.
Likewise, you cannot use SPD 2010 with SharePoint 2007 sites,
although you can have both SPD 2007 and 2010 on your computer if
you are running the same bit version (32 bits). Note that 2010 installs
in its own directory, while 2007 installs in the Office directory.
Third, you should set up a basic Team Site if you want to get the exact results in the
exercises in this issue. If you do not know how to set up a Team Site, ask your
SharePoint administrator to give you a site where you can play around. The
workflows here rely on only a few lists, however, so anywhere you can create new
lists should suffice.
Rules of Engagement
To make sure that we work in a manner that is supportable and that we learn how to
use SharePoint Designer in an efficient manner, we need to define a set of rules for
what we will do:

We will use only supportable methods and not harm a single Microsoftprovided file.
If you modify any file that ships with SharePoint, you will not be able to get
support for your solution from Microsoft.

We will use the least amount of effort possible.


We are going to learn how to utilize SharePoint Designer, not necessarily
using the best practice for any given scenario. Expect to add or improve
error handling and modify text, for instance.

12

We will use SharePoint native techniques whenever possible.


We might end up taking a step or two back to solve a problem. That is OK;
we want to learn to use SharePoint workflows.

13

Chapter

SharePoint Designer
Overview
Might as well get going, eh?
Now that we have a good understanding of what a workflow is, we can move on to
exploring how a workflow is implemented in SharePoint Designer.
In this chapter, Ill give you a brief overview of what SharePoint Designer
workflows are, and Ill also introduce you to the SharePoint Designer interface so
you know where to find all the buttons and options you need.
Perhaps a good starting point is to explain what SPD workflows are not:

SPD workflows cannot do loops, at least not by default. By loops, I mean an


iterative task performed repeatedly, such as modifying all items in a list or
sending an email to remind people about a task every day.

SPD workflows have a limited set of activities. It is quite possible to use


these activities to achieve impressive results, but you are still limited more
in what you can do than you are in other workflow scenarios, such as Visual
Studio workflows. For example, you cannot create state machine workflows
without getting very creative.

Although you can create new activities to use in SharePoint Designer, this
requires programming skills or the addition of third-party tools.

In previous versions of both SharePoint and SharePoint Designer 2007, this list
included the fact that SharePoint Designer workflows were not reusable. In practice,
this meant that you could not move your workflow from a development
environment to a production environment.
However, this has now changed. Not only can you reuse your workflow in multiple
sites and farms, but you can even export your workflow into other tools for further
refinement.

14

None of this may mean much to you, but Ill explain everything throughout this
issue.
Lets see what SharePoint Designer workflows are all about.

So, What Are SharePoint Designer Workflows?


An SPD workflow is an easy, cheap, and somewhat limited entry point to workflow
development.
Theyre easy, because most end users and administrators can become workflow
developers without too much training.
Theyre cheap, because both SPD and SharePoint are now free. Well, at least
theyre included in your Windows Server license.
Theyre also somewhat limited, because of the reasons explained earlier in this
chapter.
The main advantage to SPD workflows, however, is the speed with which you can
create simple and custom business processes. Creating a workflow in SPD should
not take too long, because if it does, you are likely making a more complex
workflow than SharePoint Designer is designed to accommodate.
That speed means youll get a high return on investment. Doing simple tasks in
SPD can reap huge benefits to a company. For example, as were doing in this
issue, creating a simple workflow to follow up an order from a customer may lead
to an increase in customer satisfaction.
SharePoint Designer workflows are not just limited to SharePoint Designer,
however, because you can export your workflows from SharePoint Designer to
Visio or even Visual Studio. You can even import Visio workflows back into
SharePoint Designer, regardless of whether you started by exporting a SharePoint
Designer workflow to Visio.
Note

You can export SPD workflows to Visual Studio to further refine or


expand your workflow, but once you do, you cannot import the
workflow back into SPD.
With the new version of SharePoint Designer, you have multiple types of
workflows. We should take a few moments to talk a bit about each type.

15

List Workflows
A list workflow in SPD 2010 is the same type of workflow that was available in
SPD 2007.
A list workflow is forever tied to a single list and cannot be reused later. Once
youve attached a workflow to a list, theres no supported way to change that list
affiliation. However, you can still change the workflow process.
This also applies to the same list in a different site. You cannot export the workflow
from one site to another site, effectively killing the reuse of list workflows. Another
consequence of this is that you have to create all your production workflows in your
production environment.
This may or may not pose a problem for you. If what you want is a quick way for
business users to solve a problem, designing your workflow in your production
environment may be just the right thing, although it has implications for testing
mission-critical workflows.
Reusable Workflows
The reusable workflow addresses the problem of list affiliation. This type of
workflow, introduced in SharePoint 2010, solves list affiliation by simply not being
tied to a list at all.
This seems at least initially like a great solution, and it does offer some more really
useful options for workflow creation.
However, SharePoint Designer workflows are declarative in nature. That means
you declare, during design, what the workflow should do. The problem is that,
because the workflow has no idea on what kind of list it will run in, it also cannot
use any of the columns in any of those lists.
A-ha! thought the SharePoint Designer development team. Well make the
workflow affiliate with a content type instead! This is a brilliant idea that allows
you to connect a workflow to a type of content rather than where that content is
stored.
The brilliance of this approach becomes apparent when your site has structured
content and you utilize content types for your taxonomy.
Well cover reusable workflows in the solution in Chapter 8.

16

Site Workflows
The final type of workflow you can create in SharePoint Designer 2010 is a site
workflow. Again, this is a very good idea that may seem utterly useless at first. I
mean, why would you want to run workflow on something other than list items and
documents? After all, isnt the whole purpose of a workflow to have some sort of
data that behaves in a certain manner?
Well, you may be right, but there are many situations in which you dont want to
work directly with a specific piece of data. For example, if you dont have that data
yet but require someone to upload or add that data, youd want to run a workflow
outside the context of a specific item or list.
In this journal issue, well do just that, and well create a new grade report requested
by someone. That grade report will be a Word document that doesnt exist when the
workflow starts.
Well also cover site workflows in the solution in Chapter 8.
Note

The video SharePoint Designer Workflow Types explains more about


the various types of workflow as well as some guides on when to use
which type.
Lets get down to business and learn by exploring.

Get to Know the SharePoint Designer Workflow


Designer
Before we get into the exercises of the following chapters, I want to show you some
of the Workflow Designer options that are available for you. (The Workflow
Designer is your main tool for creating workflows in SPD.) We will explore these
options in greater detail in the following chapters, so consider this just a tour of
what is to come.
Lets start with an overview of SharePoint Designer 2010. As you probably know,
SharePoint Designer has been free since April 2009, and this also applies to the new
version, SharePoint Designer 2010. You can just download it, and you will be able
to run it.
Well, there are some technical requirements, and you also need a site with
SharePoint 2010, but basically, if you have a computer that meets the minimum
specs and that site, youre good to go without needing to purchase anything extra.

17

SPD 2010 comes in two flavors, a 32-bit edition and a 64-bit edition. You may be
tempted to get the 64-bit edition because, well, higher is better, right? Before you
do, consider the following.
If you plan on using both SPD 2007 and SPD 2010 on the same machine, you need
the same edition of both software packages. Because SharePoint Designer 2007 is
available only in 32-bit edition, that means you must have the 32-bit edition of SPD
2010 as well.
Also, your SharePoint Designer 2010 flavor must match the Office version you
have installed, if you have one. Thus, if you have a 32-bit Office edition installed,
you also need the 32-bit edition of SPD 2010.
Regardless which version you choose, install it by following the installation guide
that comes with the package (its really easy; even Spouse mode doesnt apply
here), and fire up the program once it is installed.
Backstage UI
If youve worked with SharePoint Designer 2007, you will see that this is actually a
vastly different interface than you are used to using. One of the things you will
notice is the backstage view that the Office 2010 suite of applications has
implemented to replace the Office Button from Office 2007, as you can see in
Figure 1.You will also notice the Ribbon, which is new for Designer 2010.

FIGURE 1. BACKSTAGE VIEW


In SharePoint Designer 2010, you will always need to open some kind of site. So,
just click Open Site, and then enter the URL for your site, which is http://splab/ in
my case. When you hit Open, SharePoint Designer will connect to the site.
Although were sort of jumping ahead, there are a couple of things to notice in the
backstage view. You will recognize some of the options from the Office Button if
you have ever used the Office 2007 suite of products.

18

You will also see some options that are unique to SharePoint Designer 2010. Most
of this is for creating new lists, pages, and workflows, which is what were
interested in. You can also see the various sites, and you will have access to all the
options you had in SPD 2007.
Right now, though, just reopen the tab that holds the site to which we connected. In
Figure 2, notice that you now have the Ribbon, which creates what Microsoft calls a
fluid interface. In other words, whatever task youre doing, the available options in
the Ribbon will change. You have icons to make it easy to see whats going on. It
might take a bit of time to get used to if youve never worked with the Ribbon, but
its a nice improvement if you ask me.

FIGURE 2. SHAREPOINT DESIGNER START SCREEN


On the left side is navigation listing the various items in your site: lists, libraries, site
pages, assets, content types, and so on. This is also a huge improvement from SPD
2007 where you only navigated content and not types of items.
Right now, however, we will focus on the Workflows tab. Click the tab, and youll
be told that there arent any workflow items yet. In addition, the Ribbon will change
so that we have options for creating new workflows, as shown in Figure 3.

19

FIGURE 3. WORKFLOW RIBBON


As mentioned earlier, we now have three kinds of workflows available: List,
Reusable, and Site. In addition, we can import workflows from Visio if you have
that. Were not going to cover that in this issue, because its an Office product that
you have to pay for. Well focus on the free stuff here.
Lets create a Site workflow for giving you an overview of the SharePoint Designer
workflow capabilities; just hit Site Workflow, and Designer prompts us for the
name and description of the workflow. Lets just call this a Test Site workflow. We
can also add a description.
These interfaces are more or less the same regardless what type of workflow youre
creating. In the case of a List workflow, youre asked to connect to the list where
you want to create the workflow. If youre creating a Reusable workflow, youre
asked what kind of content type, if any, you want to connect this workflow to.
Note

If you have worked with SharePoint Designer 2007, you know that its
wizard was actually a pop-up modal dialog box that ran on top of the
rest of SharePoint Designer. In 2010, the entire SharePoint Workflow
Designer is integrated into the same interface that you use for
everything else.
Also note that the various tabs have a breadcrumb underneath. It works like a lot of
other breadcrumbs, but you can also click the sidebar, side or right arrows, buttons,
or whatever you want to call them to get quick access to all the other stuff available
here. Another new thing is that you can actually have multiple workflows open at
the same time.

20

When you add a new workflow, you enter directly into the editor for the workflow,
but theres a profile page, or a settings page, for the workflow where we change all
the settings for this workflow. You can access the settings page by clicking the
name of the workflow in the breadcrumb. We can change the names and description
here, as well as investigate or configure the task and history lists, change start
options, and manage forms.
Note that the settings page looks slightly different between the various types of
workflows, mainly in the start options.
You have the common settings that youre used to if youve ever worked with
SharePoint Designer workflows, and if not, youll see what all of this means as we
go along.
Task and History Lists
All workflows have a task list, which is where you store the tasks you create for
users. Well be doing that a lot in the workflow that well be building throughout
this issue. This list is just a normal SharePoint task list, and this knowledge allows
you to control where you want tasks to appear for your workflows.
You can, for example, create multiple task lists, and you can have different task lists
for each of the various workflows that youre creating. You can have one task list
that is specific to one workflow; you can group them, for example, to put HR tasks
in a separate task list; or you can do any kind of combination that you actually want.
The same thing applies to the History List, which is where you log all the stuff
thats going on whenever a workflow changes state for debugging or approval.
Again, you can select that per workflow, you can have one list for all your
workflows (which is the default), or you can group them.
Well go into details on what these lists actually do and how you work with them
when we look at collecting data from users in Chapter 6. There are some quirks
there of which you should be aware, but Ill brief you on them when we get to the
details later in this issue.
The Start options are on the right side. These options change slightly between the
various types of workflow. There are two major categories here: an item-based
workflow, which are the Reusable and List workflows, or the Site workflows,
which are not based on any list or content types.
You can start site workflows either manually or automatically as part of some other
process. If youre using the item-based workflows, however, you have more
options. You can start the item automatically whenever a new item is created or is
changed; you can, as for the Site workflow, start it manually if you want; and you
can combine them in whatever way you like.

21

All workflows have various forms used for initiating workflow, getting data from
users, modifying the workflow, and so on. These forms are basically just plain
ASP.NET pages.
That may scare you because ASP.NET is programming thing, and you dont want
to be a programmer, right? You dont need to worry about any of that, though,
because, by default, SharePoint Designer will create all these forms for you.
You will just say I want to initiate this workflow, and SharePoint Designer will
create an initiation form for you. The same things happen when you create activities
for collecting data; SharePoint Designer will build a form where users will enter the
data, and you dont need to know a word of ASP.NET.
Simple, eh?

Workflow Editing
When you want to edit a workflow, click the Edit Workflow link on the settings
page (its located in the Customization section). This will launch the Workflow
Designer canvas and give you a single step from which you will build your
workflow empire. You will also see a blinking yellow-orange cursor bar that
indicates where SharePoint Designer will add actions and steps as you build.
You can rename the steps if you want, which makes sense because when the steps
are called Step 1, Step 2, and so on, there is no context to tell you whats going on.
To rename them, simply click the title, type whatever you want, and then hit Enter.
That has nothing to do with how the workflow actually runs. Its simply so you
recognize the steps by name. In Figure 4, Ive renamed a step to Initiation Step.

FIGURE 4. RENAMING STEPS

22

You might also like