Click here to Skip to main content
15,867,991 members
Articles / Productivity Apps and Services / Sharepoint
Tip/Trick

Create a Workflow using SharePoint Designer

Rate me:
Please Sign up or sign in to vote.
4.00/5 (6 votes)
3 Jul 2012CPOL3 min read 91.3K   5   3
In this article, we will experiment with creating a Workflow using SharePoint Designer 2010.

Introduction

There are two ways of creating a Workflow:

  1. Using SharePoint Designer
  2. Using Visual Studio

In this article, we will experiment with creating a Workflow using SharePoint Designer 2010.

Types of Workflows in SharePoint Designer

We can create three Types of Workflows using SharePoint Designer. They are following:

  1. List Workflow
  2. Reusable Workflow
  3. Site Workflow

Image 1

List Workflow can be associated with a list. Reusable Workflow can be associated in more general ways like a Content Type. Site Workflow is associated with site items.

Inbuilt Workflow

Inside the Designer, we can see the Globally Reusable Workflows which can be globally used inside the site collection. We can copy and modify them instead of modifying directly.

Image 2

Creating a Workflow

Now we can experiment with creating a Workflow using SharePoint Designer. Following are the steps involved.

Step 1: Create Team Site

Open SharePoint Designer from the Start menu. Click on the Team Site button and enter the name of the new web site (mynewsite), as shown below.

Image 3

This step will create a new site with a Tasks list.

Step 2: Create Workflow

Select the Workflows item from the left side Navigation pane.

Image 4

Click on the List Workflow button from the ribbon and click the Tasks item.

Image 5

In the appearing dialog, enter the name of the new Workflow as shown below.

Image 6

Step 3: Create Condition and Action

Now we need to specify the Condition and Action of the item. Each Condition will have one or more Action items associated with it.

The Condition will be evaluated and the corresponding Actions will be executed. The Condition could be checking a field property of the list or library, checking the user name, etc.

The Action is the actual performing item. The Action could be updating a field of the current item, moving the list item to another list, emailing a user, adding a comment, checking out a document, invoking another workflow, etc.

You can create Condition and Action using the ribbon items.

Image 7

For creating the condition, use Insert > Condition > If current item field equals value. Your Workflow will look like below. The links field and value has to be specified.

Image 8

Click on the links above and set the links as shown below:

Image 9

Now click the Insert > Actions > Set field in current item. Modify the comment as Good Job Dude! as shown below.

Image 10

Click on the Save button and we are ready with the Condition and Action. The condition and Action checks the item of the Task and if the Status is Completed, the Description column is set to a message.

Step 4: Change Workflow Settings

Go to the Navigation > Workflows list and use the Workflow Settings menu item.

Image 11

In the Start Options section on the right, do the following:

  1. Uncheck the Allow this workflow to be manually started item
  2. Check the other two items for ensuring automatic execution of the Workflow

This ensures that our workflow will be automatically executed on insert/update of the Task item in the Task List.

Click on the Save button and then click on the Publish button.

Image 12

Now our workflow is ready and deployed to the SharePoint site named mynewsite.

Step 4: Test the Workflow

We can test the workflow by opening the above site in browser.

Image 13

Click on the Tasks list and create a new item. Set the Status of the Task to completed. Leave the Description field as empty as shown below. Click on the Save button.

Image 14

You can see that a new column for the Workflow appeared for the above task item. Workflows will be adding their own columns to the context list. Refresh the page and wait until the Workflow status is Completed.

Image 15

Now try viewing the item again and you can see that the Description has changed to our message. 

Image 16

Congratulations! You are done with your first workflow.

Summary

In this article we have experimented with creating a workflow with SharePoint Designer 2010. In the upcoming article we can create a workflow using Visual Studio.

References

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Jean Paul is a Microsoft MVP and Architect with 12+ years of experience. He is very much passionate in programming and his core skills are SharePoint, ASP.NET & C#.

In the academic side he do hold a BS in Computer Science & MBA. In the certification side he holds MCPD & MCTS spanning from .Net Fundamentals to SQL Server.

Most of the free time he will be doing technical activities like researching solutions, writing articles, resolving forum problems etc. He believes quality & satisfaction goes hand in hand.

You can find some of his work over here. He blogs at http://jeanpaulva.com

Comments and Discussions

 
QuestionDeploy List workflow in Staging/Production environment Pin
Kausar Parveen18-Jun-14 9:28
Kausar Parveen18-Jun-14 9:28 
Any thoughts?

Regards,
Khushi
AnswerRe: Deploy List workflow in Staging/Production environment Pin
Jean Paul V.A18-Jun-14 9:54
Jean Paul V.A18-Jun-14 9:54 
GeneralMy vote of 1 Pin
Manish Srivastav19-Nov-12 20:59
Manish Srivastav19-Nov-12 20:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.