SharePoint developers collaborate with business analysts and others who often diagram visual workflows. Learn how Visio facilitates collaboration.
If you have Visio Professional 2013, then you can use it along with SharePoint Designer. And the combination of these two tools together makes it easy, not just for you but for folks you work with like, business analysts or people who are working on process improvement with you, to participate by creating drawings using a tool that they're probably used to using, Visio. And, you can then automatically take those drawings into SharePoint and further customize them. So, here we are in Visio 2013. To create a workflow, you can't just use any template. There are a number of templates available, this is only a few of them. Visio is filled with different templates for you to use, but, if you're going to create a workflow, you have to begin it using the SharePoint Workflow template. If you start it with any other, there's no way to convert it. So, you open Visio, and you choose to use the SharePoint 2013 Workflow, and click create. Now, this is, as is every other Visio template, there are two versions. There's a, a metric version, and a US units or, inches, feet, and so on, version. Make sure you're making the right choice here, based on who your other partners are that you're working with. It's just kind of nice. It doesn't really affect our workflow, but it's still kind of nice. And click create. So the template opens up, and our page or our drawing canvas back here has, already, a stage shape, that's what this is, and two terminators. So we have a start, here, and we have an end, that's what these two items are. So the green triangle is to start, everything else that we put into this workflow is going to fall between that start and that end. What we'll do is, we'll drag the items that we want into this stage, onto this canvas. If we want to rename something like Stage 1 we'll just double-click to change its name here. The workflow that we're going to create is actually an approval workflow. And, it might behoove us to take just a moment and take a look at the list, that already exists, that we're going to be automating with this workflow. Here's the Employees and Hours list, and this is similar to a timesheet list that we saw earlier. When an employee turns in their payroll, they'll enter here, their last name, their first name, their employee number, their week starting date, which is calculated to go back a week for us to make it easy, the number of hours, the rate, and department that they are in. These two items are also fields in the list, they're columns. These last two columns in the list are not going to appear on the form that the employee uses, but I want you to see them, so I left them here for you. The question is, has this payroll been authorized, and if so, by whom? The rule is that as long as the hours that are reported are less than or equal to 40 hours, then we're going to authorize the payroll. Now, we probably also don't want them being able to increase their rate. Oh, it's time for the holidays, I need a little extra money, I make $1,000 an hour this week. No, we'll probably have some rules about that too, but we could validate that in the column. What we want to be able to do is, when an employee enters, for example, that they worked for 42 hours, we need somebody to authorize it, and that's the only way this payroll is going to proceed. And we need to know who authorized it, so we're going to send an email to the person who's responsible for authorization in that department, that's why we need to know what department they're in. It's a pretty straightforward workflow. We've used all the parts and pieces of this. So, what we're going to do is we're going to look for a value in hours, we're going to find out if that value is greater than 40. If it is, we're going to send an email with an encoded absolute URL to get an authorization. If it's not more than 40 hours, we're going to set the value of Authorize to true ourselves. We're just going to have the SharePoint workflow click that off. So, this is where we're going. Let's head back now to Visio. Now, we don't have access, here, to all of those columns.
This isn't tied directly to SharePoint in the way SharePoint Designer is. So, we would need to keep track of all of the different things, the names of the columns, everything else, or at least have a handle on what we're doing with those. So, the first thing that we have is, we have an action. And the action is that we want to go in and create just a quick log in our history list, that says what that value is. So we're going to just take the value out of the current item and say that the number of hours is X. Then, we need to create a condition. And the condition is one of those if any value equals values condition. And, before that even, because remember that, if any value equals value, actually has to be equals, it can't be greater than or less than. So, what we really need first is to have a calculation that is going to let us know whether or not it's going to return a true or a false. So we have to put in a Du calculation, and we'll slide that in ahead of time, notice how that worked. So we're doing a calculation, and then we're finding out if any value equals value. And, if it does, then we can simply set the field in the current item. Now I'm running out of room here, so I'm going to undo that. We're sort of bound by the pages, so this is the physicality of Visio, is that we're still on this page and we're just making this page really, really long, so that's okay.
I'd like this, actually, up, just like that. So, if any value equals value, and we have a couple of different possibilities here. So, if we say, yes, it's greater than 40, well, then our next task is going to be to send an email. But if it's not, we're simply going to set the value of Authorized equal to true. I can take this connector here if I wish, and drag it down here. That's great. The other possibility is, I'm going to send an email. And it's fine for me to connect these, right there. And, if I send the email, then I'm going to set the field in the current item as a result of that email. But before we can set the field, we actually have to wait for that value to change. Now, that’s not waiting for an event, that’s actually wait for the value. Wait for field change. Right there. And I’m going to need to connect these up. So, one, two. This one connected itself, and I really don't want that connection here, so we'll hang on to it for a second. I'm going to grab the pointer tool. Now, if you're not putting conditions in a workflow, this is just like click, click, click, click. But as soon as we have to do two different things, it gets a little more complex. Here we go, we're on our way out the door.
So, this is one long stage, we're doing everything in one stage in this work flow. We could put in more stages. We have these component shapes, as well as the actions and the conditions. Here are our components. So we have stages, we have loops, we have steps, and so on. This is not a parallel process. We have a parallel here, but that's the same as if we are going to do a parallel block, for example. I think we're looking good, I want to save this. And I'm just going to save this on the desktop. And, our workflow is a workflow to authorize over time, but we're doing all of it, so we're going to, actually, authorize, payroll item. And I'm going to save this. Now a couple other things before we leave Vizio. This isn't the only type of diagram that I can create, and all the diagrams are built using stencils. So, these are stencil sets, actions, conditions, components, and then there are this list of, of Quick Shapes, which is all of them together. There are more shapes that are available. There are floor plans, and there are flowchart plans, but if you use any of these that are not part of the SharePoint template itself, then this isn't going to work. So even though there might be compelling visual reasons to say, I'd like to create something that looks a little spiffier using these other icons and these other stencils, remember, that for all of this to work, you have to use the Sharepoint 2013 Workflow template, and you are constrained to the sets of shapes or the stencil libraries that come along with it. But this is looking good, I like this. And I've saved it, so this is how I can create my basic workflow in Visio 2013.
- Automating workflows
- Documenting workflows with Sticky Notes, Excel, and Visio
- Driving workflow interactions with forms
- Using workflow actions
- Making choices and controlling flow with conditions
- Creating a simple form
- Using email notifications
- Pausing and stopping workflows with core actions
- Building a dictionary
- Creating a site workflow
- Deploying workflows
- Creating workflows visually