Follow Us:
Welcome to part 2 of our introductory blog series on SharePoint workflows. In our initial foray into the depths of workflows in Part 1, I introduced you to the concepts of SharePoint workflow. We laughed, we cried, then we talked about all the core basics with types, what they are and what they can do.
Now that we have gotten all that out of the way, we can venture deeper into the depths of your workflow adventures. We’ll cover how to use the default workflows, more details on workflow structure and we’ll wrap up with working with workflows. In the next post, we’ll crack open Designer to see how we can create some workflows.
Part 1: Intro and Core Concepts
Part 2: Templates and Using Workflows (this post)
Part 3: SharePoint Designer and Creating Workflows
Part 4: Best Practices and Extending Workflows
When you create a workflow, you’re really doing two things:
If you are using a List workflow, #2 happens automatically when you publish it. If you are publishing a Reusable workflow (remember part 1?), then after you publish it, you have to manually associate it to the list yourself. This is what you do to use the out-of-the-box workflow templates I discussed in part 1, and I’ll show you how to use shortly.
Once a workflow template is associated to a list or library, it can be used. It runs on a specific single item (list) or file (library), so each time it runs, you are running an instance of that workflow template on that item.
I had to explain templates so we could discuss another component of the workflow – forms. There are two types of forms that are outside of the workflow itself:
Let’s go through what these are.
This is more relevant for the 2010 workflow platform, not 2013. The initiation form is what you might see when you manually start a workflow (or “initiate”) the workflow on an item. When you start a 2010 workflow, you will get a form that you have to confirm to start.
This can be a pain or a blessing depending on what you want to do. You will see this if you built a custom list workflow or reusable workflow, but if you are using one of the default approval workflow templates, you will see a much more built out form.
The purpose of the initiation form is that you can provide ad-hoc inputs into the workflow at runtime. So you can code your workflow to read these values, and use those instead of hard-coding the workflow. So for approvals, it would be very common for the approvers, due date or other values to change from time to time. The default values here can be supplied from within the workflow.
I also want to mention these are InfoPath forms, and can be customized. To change text on this form, with the workflow open in Designer, click on the form name under Forms, make your edits and publish.
To add fields to your initiation form, in the workflow editor, in the upper right, click the Initiation fields button. Don’t worry, we will get to SharePoint Designer very soon.
In the workflow editor, you can access the values entered by the user on this form:
You only see Association forms when using reusable workflows (remember its just a template, and you have to add it where you want to use it). When you add a reusable workflow to a list or library, you will see this form from which you will pick the template. Notice the form type now says association and not initiation:
When you add the workflow and fill out the association form, the workflow will use these values as defaults when you manually run an instance of the workflow (which then you can adjust if needed).
Now let’s work with some workflow. I’ll show you how to use the default workflows, see their status and start them manually.
Remember, the built-in workflow templates are reusable workflow templates and we need to add them first before we can use them. For these steps, we’ll add the most common template, the Approval workflow.
.
You’ve added the workflow! Ok now what?
Now that the workflow is associated, we can start it. Upload a document to your library and do the following:
That’s it. The workflow will start either immediately or after a minute depending on your environment, and you should be returned to your library view. You will see a new column named “Purchasing Approval”, and it should say “In Progress”.
As I mentioned before, this new column represents the current status of the workflow.
To see what’s going on with any workflow, just click on the column value (in my case it’s currently In Progress. We are taken to the workflow history page, where we can see an overview of what’s happened with this workflow. We see who started it, when, on what document, any task status, and related entries from the workflow history (log). As a workflow runs, you can tell it to write information out to the workflow history. This is very very handy to keep track of where it is, what it’s doing, and what it thinks certain values are. In my case, I see that it assigned me a to do approval task, but it failed to send some email with an error.
NOTE: From this page (and this page alone), you can also stop a running workflow. At the very top of the page, click the link that says “End this workflow”. All open tasks will be cancelled, and the workflow will be stopped.
The status of the workflow will be set to Canceled.
Lastly, I showed you how to ADD a workflow, but how do you REMOVE one? Easy:
This can be a little confusing. Over time, you will make a lot to changes to a workflow and re-published it. Let's say you make 20 updates and re-publish 20 times: you will have 19 copies of the workflow that all say “Previous Version: <date>” on its name. Every time you publish a change to your workflow template:
Remember, workflow status is tied to the workflow instance. So yes, for cleanness, you can remove all previous versions and just keep the primary current one. BUT, just know when you remove a workflow instance, you also remove all statuses for that instance. So if a workflow had Approved for its status, it will get blanked out.
One final note. The workflow is NOT DELETED when you remove it from the library. You are only breaking the association between the two.
We’re just getting to the good stuff! Hang with me, and next time we’ll dive into SharePoint Designer and look at all we can do with workflows.
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.