How to Use Out-of-the-Box Workflows in SharePoint 2010

show more Using out-of-the-box workflows provides you with in-depth training on IT. Taught by Simon Allardice as part of the SharePoint 2010 Essential Training show less
please wait ...

Using out-of-the-box workflows

Workflows are automated business processes. It's a way of finding the repeatable things that are done in your organization. Things like when an expense report comes in, check the amount. If it's less than $500, send to accounts payable. If it's more, send for a manager approval, or things like checking that new website content needs both style guides and legal requirements. Now you are not going to write workflows for something that happens once. This is for repeatable events, things that could happen once a month, maybe ten times a day.

How do you make sure that all the questions that need to be asked are asked? How do you make sure that all the tasks required are done in the right order at the right time? Now you'll see the phrase workflow used all over the place. If I am looking at a typical document library, I'll see Workflow Settings. If I'm looking at a tasks list, I can see Workflow Settings, because in SharePoint the workflow capability is built into every site, even when you use the free foundation version of SharePoint. Now, the idea of a workflow is that these are the kind of things you'd otherwise keep track of in your head or on paper and you might think well, why would I have SharePoint generate an email, when I can just write it myself or I can walk next door into the other office? Well, because we can formalize things with workflow.

We can automate them, we can make sure nothing gets missed, and very importantly we have a history of everything that occurred. Now workflows are commonly attached to a list or to a library because they're usually triggered by a document being edited or a list item being created. Although in SharePoint 2010, you can create something called a site workflow, where you can create workflows that are about a single list or library item. Now although the workflow capability is built into every single site in SharePoint, even in the free version of SharePoint, if you have SharePoint Server, you'll also have a few predefined example workflows that you can use for common situations like collecting feedback on a document or requesting approval of a document.

So let's see how to use one. Well, I'm in a fairly regular team site here. I've created a document library called HR Policies and that's got three documents in it right now. Things on the recruitment process, the retirement plan, and stock vesting, all fairly sensitive documents. You can imagine that these will go through several drafts before they get approved. We want to formalize these documents before they get loosed on the general populace. So what am I going to do? Well, I am going to attach a workflow to this library so it can then be initiated for each of the documents in the library.

So by selecting the Library setting on my Ribbon, I'm going to go over to this section called Workflow Settings and click in the little arrow drop-down, I see a few options here. We've got Workflow Settings > Add a Workflow, and then a couple of options here for creating a workflow in SharePoint Designer or a reusable workflow in SharePoint Designer, and we'll talk about those later. I am going to select the Workflow Settings option. You can also get to this through the Library Settings of your document library. And it's telling me there are no workflows currently associated with this list, And that makes sense. It's a new library.

There are no workflows on by default. So I'm going to click the link that says Add a workflow and what I'm doing here is I am describing the process that I want to occur. I'm not kicking it off yet. I am just describing it. Now up at the top, we have the option to select a workflow template. We've got Disposition Approval, Three -state, Collect Signatures, Collect Feedback, and Approval. Just quickly kind of going through the idea of those, Disposition Approval is really about the end of life of a document, and whether things should be deleted or kept.

The Three-state workflow is the only workflow that you'd get if you just had SharePoint Foundation. That can be attached to any list that has a status field with three choices in it, such as a draft and approved or rejected or open, in progress, and closed. It's a fairly simple workflow. The ones I am more interested in are the following three. Collect Signatures, Collect Feedback, and Approval. These are fairly significant well- defined workflows in SharePoint Server that you can choose to attach to your library and just use them.

They may not be perfect for what you are after, but they are certainly worth exploring if you need this general process. So I am selecting this workflow template called Approval and I have got to give it a name. So when people are kicking this off, what did they call it? I am going to call it Request Approval. The next thing is the workflow is actually saying well, I am going to do two things. As part of the workflow, I'm going to be generating tasks for people to do. So it's given me a drop-down options that says well, do you have a task list on the site? And I do. It's a normal team site, so I have a task list called Tasks.

I am just going to use that one. The workflow then looks for a place to put its history. This is one of the big deals with workflow. Not just that we can automate the process, but we have an entire history of that process. Now, it hasn't found a suitable place to put history. So it's saying "well, I'm going to make you a new list called Workflow History." At the bottom here, we have the options of how this workflow is started. The default option here is to allow this workflow to be manually started by an authenticated user with Edit Item permissions, which really means if you're in the Contributor group, you can start a workflow.

You do also have a couple of options for starting a workflow when a new item is created or when an item is changed, and these can be very useful, say for automatically starting a workflow when an expense report is created or a requisition order. However, in this situation, I'm talking about documents that could have been edited 20 times before we want to ask for approval. So I am going to allow the workflow to be manually started. Now, if I click Next, I'm going to get the option to select some default values.

Okay, we're requesting approval. Who's going to be the person that says yes or no? That could be a group of people. It could be an individual. Let's say in my case I know that it's going to be Hedda. I can do a little check to make sure that know she exists. Yup, there we go. You can have multiple people in there and if you have multiple people, you can choose to either send the tasks to them one at a time or all at once. I've only got one person, so I'll leave that. After that, we can put in some default text for the request.

Again, right now, this is not going to send anything. We're simply describing this workflow and then later, we'll kick it off, and these are default values so they can be changed. We do have some option such as a Due Date or a Duration Per Task. So, I could say that for example people have two days to do this approval or two weeks or even two months. There is an option to CC anybody. What's the difference between sending it as a To and a CC? Well, whoever is requested as the approval will actually get a task generated for them.

Whoever's in CC will not and there is a few options at the end. What happens if it's rejected by any of the participants, do we end the workflow, etcetera? So I am just going to accept all those as the defaults and click Save. That workflow is now defined and attached to this library, but there are no workflows actually occurring right now. Well, the deal is, what happens now? Well, nothing right now. The idea is that possibly days or weeks later, could be minutes later, someone is going to edit one of these files in Word the way they normally would, and then they are going to say, "well, maybe I think I'm finished with the Recruitment Process document." There is a couple of things I can do with this.

By selecting the document, I'll get my Library Tools up here. We'll actually have an option for Workflows and that will be now highlighted because it knows there is a workflow available, or I could also select from the drop-down box and go to Workflows. Both of these would do the same thing. I'm going to use the Ribbon. Click Workflows. It's going to tell me there's one workflow available called Request Approval. Below this, it will say there are no running workflows on this item. There are no completed workflows on this item, because of course you could have the same workflow being initiated several times through the lifetime of the document.

So I am going to select this one, Request Approval. It takes me to the data it's looking for to stop the workflow. These are the default values that I just added a while ago. I am going to leave them all as they are and finally click Start. It thinks about it for a second and then the workflow has begun. Now, one of the things that creating a workflow will do is to this document library we'll now have a new column in the document library itself about this workflow. You notice over here on the right-hand side, we have a section that says Request Approval and right now, it's saying that on this document the Request Approval workflow is In Progress.

Well, what does that mean? Well actually, right now, Hedda will have just been sent an automatic email. She will have also been given a task in the tasks list I could take a look at this here. Please approve Recruitment Process has been assigned to Hedda. That's not complete at all, and it's related to the document called Recruitment Process. If I click in that and take a look, we can see a bit more of the details. It's saying that this is based on the approval started by me a few minutes ago, and there is a comment. Now, I am going to leave this alone, because Hedda after all has to see this.

So let's imagine that right now Hedda has received that email, she has taken a look at the task, she has taken a look at the document. I'm going to go back into my HR Policies library. I am going to notice that actually over here.=, I have it marked now as Approved because in the background Hedda has approved to that. I would've also been sent an email, though that might take a few minutes to arrive. Now, if I want to look at more details about it, this is actually a link, not just a status. So if I click it, we'll go to the Workflow Status and depending on how your server is configured, you may even see the Visio visualization of this.

Now the workflow started. It got sent to Hedda Conway, she's approved it, we are now finished. We can even see a breakdown of the history here. The workflow is initiated, a task was created, a task was completed with the comments, it looks good, we'll go with it, and approval was completed. And this is the real benefit of workflows, not just that we can formalize the process but that we have a history of it. We can track what happened, how long people took to do the tasks that they were meant to do. Now, you will find that the built- in workflows like Approval, Collects Signatures, Collect Feedback, won't always do what you want and perhaps, for example, we want a different email generated after a document was approved.

Well, in that case, we can either edit these built-in workflows using SharePoint Designer, or using SharePoint Designer or Visual Studio you can even define your own workflows from scratch.

Using out-of-the-box workflows
Video duration: 11m 1s 6h 58m Beginner


Using out-of-the-box workflows provides you with in-depth training on IT. Taught by Simon Allardice as part of the SharePoint 2010 Essential Training

please wait ...