navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

SharePoint Designer 2010: Building Custom Workflows

SharePoint Designer 2010: Building Custom Workflows

with Gini Courter

 


See how to boost your productivity and efficiency using self-monitoring document workflows in SharePoint. Author Gini Courter explains how to design streamlined workflows, from analyzing inefficiencies in manual processes to leveraging automation to avoid performing tedious, repetitive tasks. The course also covers setting up forms and email notifications, collecting and working with user data, performing calculations, and making workflows reusable.
Topics include:
  • Understanding workflows
  • Documenting workflows with Excel, Visio, and the Office Drawing Tools
  • Running the built-in workflows in SharePoint
  • Understanding actions and conditions
  • Working with if-then and if-then-else conditions
  • Managing workflow messages with Outlook rules
  • Pausing and stopping workflows with core actions
  • Maintaining workflows with email aliases, workflow logs, and error traps
  • Creating custom content types
  • Creating a site workflow
  • Exporting and publishing workflows

show more

author
Gini Courter
subject
Business, Collaboration, Office Suites
software
SharePoint 2010, Visio 2010
level
Intermediate
duration
4h 44m
released
Aug 09, 2012

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Welcome
Welcome
00:04Hi, I am Gini Courter. Welcome to SharePoint Designer 2010: Building Custom Workflows.
00:10In this course, I'll be showing you how to create and document workflows.
00:15I'll show you how to use the built-in workflows, how to build simple workflow
00:20steps, and how to set up workflows to behave the way you want them to behave.
00:25I'll show you how to create conditions within workflows so that the workflows
00:29themselves do what's necessary without your intervention.
00:33I'll show you how to create and include forms, send email notifications, and
00:38incorporate core actions such as performing calculations and creating, updating,
00:44and deleting list items.
00:46You'll also see how to update data and create reusable and site workflows, two
00:52types of workflows that are new to SharePoint 2010.
00:57Let's get started with SharePoint Designer 2010: Building Custom Workflows.
Collapse this transcript
What you need to know
00:00Before we jump into SharePoint workflows, I'd like to talk to you for just a few
00:05minutes about what you'll need for this course and what you might not need to
00:09make sure that you know what your environment looks like.
00:11I'll be using SharePoint Foundation 2010, and this was an intentional choice.
00:15SharePoint Foundation is the most broadly distributed version of SharePoint,
00:19because it's packaged with Windows server.
00:21So many organizations that bought Windows server have this already, and may
00:25be using it, may not be, but the chances are that in your organization
00:29there's a group of people who are already spending some time looking at SharePoint Foundation 2010.
00:35This platform allows us to collaborate, it lets users share documents and lists,
00:40set alerts, create calendars, share contacts.
00:44For you and I, it's a platform to launch and serve workflows.
00:49You'll also need to have SharePoint Designer 2010.
00:52This is going to be our development environment.
00:54It's a really safe space for us to learn how to build workflows, but you can
00:58also use it to customize SharePoint.
01:00There are other courses in the lynda.com online training library that use
01:05SharePoint Designer to brand sites or to create forms or for other purposes.
01:09So it's a multi-use development environment, but we'll be using it looking specifically at workflows.
01:15If you have SharePoint Designer 2007, by the way, that won't work.
01:20SharePoint Designer 2007 only works with SharePoint 2007 sites, and 2010 only
01:26works with 2010 sites.
01:28If you need to have both SharePoint Designer 2010 and 2007 on one machine, for
01:35example, because you have sites in both like I do, pay attention to the
01:39installation instructions for SharePoint Designer 2010 on the Microsoft site,
01:43because there's information on how you can have both on one machine, and a very
01:47specific sequence of installation.
01:50Now, these two programs, this is all you need to have, but you might have some
01:54more things, and they're worth pointing out.
01:56For example, if you have InfoPath 2007 or 2010, then you can use that to create
02:01forms and use them in your workflows.
02:03The forms you create can be filled out by users who are using InfoPath 2007
02:08or the InfoPath 2010 Filler. Either of those client applications will work to complete forms.
02:15It may be that your organization uses SharePoint Server 2010, which is the
02:20larger, more impressive, and therefore more expensive version of SharePoint.
02:25Actually, there are two flavors of SharePoint Server, one called Standard, and one called Enterprise.
02:30And if your organization has the enterprise version, one of the things that it
02:35does is it provides what are called services, the ability to serve, for example,
02:40Excel workbooks, or to be able to serve particular kinds of diagrams or access
02:46services for Microsoft Access.
02:48From our point of view, what we care about is that it can serve web-based forms.
02:53So there is an InfoPath form service that runs on SharePoint Enterprise Server
02:582010, and if this is your environment, then the forms that you would create in
03:03InfoPath 2010 could then be viewed and completed in a browser by your users.
03:09You might also have some version of Visio and really any version of Visio
03:13is great to be able to create diagrams of the workflows that you and I will be building.
03:18That's the kind of documentation then that more easily allows users to see what
03:24it is you're going to be creating, and to provide you with better feedback.
03:27Or you might have Visio 2010 Premium, which is a new version of Visio.
03:32And if you do, you can use that to document workflows.
03:35You can also use it to export back and forth between Visio and SharePoint Designer.
03:41So, I can take a workflow I created in SharePoint Designer, export it to
03:45Visio, and then play with it there to create a presentation that will be even more meaningful.
03:50But more importantly, if I have users in the business who can use Visio, they
03:54can use Visio Premium to begin to design a workflow that I can then take into SharePoint Designer.
04:00Developers in your organization--and you may be one of them--may have
04:04Visual Studio, which is a complete programming environment.
04:07It allows you to create forms, workflows, web pages, entire applications that you
04:11can create in Visual Studio.
04:13At some point, if you're creating very complex workflows, you'll get to the
04:17point where you want to do something in a workflow that you can no longer do
04:22using SharePoint Designer, and at that point, the answer might be to do it in Visual Studio.
04:28In earlier versions of SharePoint, I'd hit that wall pretty early.
04:32Now, there's so much that I can do in SharePoint Designer that I rarely have a
04:36need for Visual Studio.
04:38But when I do, I can simply do as much of the workflow as I can in SharePoint
04:42Designer, export that workflow, and then it can be imported into Visual Studio.
04:46Remember though, that despite all of those tools existing, and you may have a
04:50number of them, the only thing you absolutely need in this course is SharePoint
04:54Foundation 2010 and SharePoint Designer 2010.
04:57You have those two things, and you're going to create some amazing workflows.
05:01And there's one more thing you need, you need to have been given the appropriate
05:05permissions to be able to develop workflows in SharePoint.
05:09So, you'll need administrative permissions to the lists or libraries where
05:12you're going to be developing.
05:14This is because SharePoint is designed to protect our data.
05:17We're not going to let just anybody develop workflows.
05:20So, this is a great time to go talk to the folks in your information technology
05:24or info services department, and have them set you up a site where you have
05:28administrative permissions so that you can try these tools and see how these
05:31workflows work out for you. I think that's it! Time to get to work!
Collapse this transcript
The workflows used in this course
00:00Many courses in the lynda.com online training library have exercise files
00:05that go along with them. This is not one of those courses.
00:08There isn't a way for us to import and export workflows out of SharePoint
00:13Designer unless you're using Visual Studio.
00:16So, we'll be creating full workflows and parts of workflows together.
00:19There are four major workflows that we're using in this course, and then five
00:23minor ones, and I just like to give you a brief overview of them.
00:27First, there's a workflow called Employee Onboarding.
00:29The Employee Onboarding workflow is a series of tasks that are done by different
00:34departments for each new employee in an organization.
00:38The second major workflow is called Order Business Cards.
00:41An Order Business Cards flows out of the Employee Onboarding.
00:45The initial business card order for an employee is placed by the facilities
00:48department, but subsequent business card orders are a real hassle for them to deal with.
00:53People call and say, "I want new business cards, but..." or "and..."
00:56So, the facilities department has put together a request to make this an
01:00employee self-service workflow.
01:03Our third major workflow is called Request New Position, and I want to highlight
01:07this because it's an approval workflow, and many of the workflows that take
01:11place in business are nothing but approval steps.
01:14For example, if you're going on vacation, who needs to approve that?
01:17Perhaps your supervisor and your supervisor's supervisor. Or you need to
01:21purchase new software for your computer, who can approve?
01:24You want to take some training.
01:26You need to turn in your expenses for reimbursement.
01:28All of these kinds of workflows are approvals, one step, two steps, three steps,
01:33often with some conditions.
01:34So, this is a workflow that we'll return to over and over again so that we can
01:38really understand how we can do approvals.
01:40The fourth and final major workflow is a very simple workflow.
01:44All it does is emails a submitter to say, hey!
01:47We got your document, and we'll be creating that as a reusable workflow because
01:51we can use it in many different lists and libraries in our site.
01:55These are the major workflows. Now, the minor workflows!
01:58First, a workflow that creates an item in one list based on values in the current list.
02:04In this case, when you create a new calendar appointment, you can have a
02:07workflow create an announcement for you.
02:09Second, a workflow that emails a submitter similar to our reusable workflow, but
02:16then takes a look at the file type of the item that was submitted and take some
02:19further action based on that file type.
02:22Third, a workflow that allows us to extract data out of a file name, so
02:27we're taking a substring--in this case an ending date--and putting that somewhere else.
02:32Fourth, a direct email that says, based on a value, we're going to trigger a
02:37workflow that sends an email to a group of people who are monitoring a group of libraries.
02:43And finally, a workflow that is manually triggered whenever someone goes and then says, ah!
02:49We're done with this document, it's obsolete, and needs to be moved to the archives.
02:53These are the workflows that we'll be using together in this course.
02:56I encourage you to work along with me as we create these workflows.
03:00If we're in the middle of a workflow, and we put it aside, simply save it.
03:04You don't need to publish it, put it away. We'll come back to it later on.
03:07I also want to encourage you to create some of your own workflows using your own
03:12business processes that would be similar, whether they're approval processes,
03:15email processes, announcements, whatever business process you have.
03:19Feel free to try it out as we learn about No Code SharePoint workflows together.
Collapse this transcript
1. Understanding Workflows
What's a workflow?
00:00A workflow is an organizational process, a work process that is either at the
00:05core of a business like an order entry process or that serves more of a
00:09supporting role like a process for Employee Onboarding, or a process to complete
00:14and route a purchase order.
00:15You can think of a workflow as a flowchart of actions that has a clear
00:19beginning, some sequential steps, and then an end.
00:23For example, this workflow is a small workflow designed to allow an employee to
00:27apply to be part of a management training program.
00:30First, the employee has an idea, they fill out a form, and then they submit that
00:34form to their immediate supervisor.
00:36It could be they carry it over to their boss' desk or put it in an email, or
00:40that it's something that's completed totally electronically.
00:43After their supervisor decides whether they should accept or reject this
00:48request, they forward the form on to the HR department, and the HR department
00:52then sends a letter back to the employee, letting them know that they've
00:56either been accepted or rejected, and when the program will start if they've been accepted.
01:00It might be that there's another step as well. For example here, for some
01:04employees or for some specific management training programs,
01:07after the immediate supervisor approves this person, they then send this request
01:12on to management--move it up the chain, so to speak.
01:15And after the manager approves, then it would be sent on to HR, and finally, the
01:19employee would receive notification.
01:21Workflows can also incorporate parallel branches. This one is a little more complex.
01:26Here we have an employee creating a presentation that will be used at the company's annual meeting.
01:31So, here they are working away creating the presentation.
01:34They send it to the marketing department where it goes through a buff up.
01:37It's all nice and clean now.
01:39But three different people need to sign off on it after the marketing
01:42department has worked with it.
01:43We have the Chief Financial Officer, the CEO, and the Chief Operations Officer,
01:48all of them need to sign off on it.
01:50And they don't need to do it in any particular order, as a matter of fact,
01:54putting them in order might create a slowdown.
01:56For example, if the CEO is out of town, but the CFO could be looking at it, it
02:01makes more sense to allow the CFO to simply work with it.
02:04So, we have these steps in parallel, three signatures necessary, but they can happen in any order.
02:10Finally, after all of these folks have signed off on it, they will send it to
02:15the IT department, and the IT department will post it on the web page where it's available for the meeting.
02:20Whether or not there is parallel branches in a workflow, the workflow still
02:23proceeds from the start through the series of steps to the final action here at the end.
02:28Regardless of the number of steps in your workflow or the type of workflow you
02:32have, all workflows have one thing in common.
02:35Every time you want to interact with users, you'll need to present them with a
02:39form to allow them to give you information or for you to provide information to them.
02:44So, the final way you can think of workflows is a workflow is an outline of a
02:48business process that contains forms for user interaction and logic to drive the steps in between.
02:54We'll spend this course learning to develop workflows.
Collapse this transcript
Using manual vs. automated workflows
00:00Every organization of any size has some simple workflows and some complex
00:05workflows, and when you automate these workflows in SharePoint, your SharePoint
00:09Workflows can be as simple or as complex as your processes themselves are.
00:13You can create workflows that users launch themselves, you can also
00:16create workflows that start automatically when an item in a list or a
00:21library is created or changed.
00:23In general, when you create a workflow for SharePoint you follow the same series of steps.
00:28First, you will choose the type of workflow you want to create.
00:31Second, you will you SharePoint Designer or some other workflow tool to
00:35construct the conditions and actions that define all the steps of the workflow
00:40so that it accurately describes the business process.
00:43With the workflow created and validated, you'll then save and publish this
00:47workflow so it's available to SharePoint.
00:49And then finally, you'll create some forms or perhaps customized forms that were
00:53automatically created as part of generating lists in SharePoint.
00:57Well-designed automated workflows provide great opportunities for efficiency
01:03and cost savings, and they take away some of the most boring work that anybody
01:07gets to do, because you can build monitoring and reminders into your automated workflows.
01:11For example, we could have a reminder that said don't forget that you need to
01:16review this presentation that would be sent to all three of the people who need to review.
01:21You could also monitor whether or not the web page was actually created.
01:25You don't need to assign a person or team of people to monitor a SharePoint process.
01:30With a SharePoint workflow, the process is always pro-actively self-monitoring.
01:35When you turn your automated workflows over to SharePoint, the staff in your
01:39organization can focus on doing their work, rather than simply monitoring and managing processes.
Collapse this transcript
Workflow automation in SharePoint 2010
00:00We're back in our SharePoint site, so I can talk you for just a couple of minutes
00:04about some new features in SharePoint 2010 and SharePoint Designer 2010.
00:09Microsoft SharePoint has supported workflows ever since SharePoint Portal Server 2003.
00:15But the 2003 versions of SharePoint required that you use other tools to create
00:20workflows, tools like Microsoft BizTalk Server, or you had to talk to a
00:25developer, have them create some custom code for you.
00:27Or if you had the patience and the skills, you could learn Visual Studio
00:31yourself to create code.
00:32So SharePoint workflows really took off for the first time in a big way with the
00:36addition of SharePoint Designer for SharePoint 2007.
00:40SharePoint Designer replaced a tool called FrontPage that had been used in
00:44earlier versions of Office, but which wasn't a great tool to use at all for
00:49orchestration or for workflows.
00:51So SharePoint Designer, the replacement for FrontPage, really made it easy to
00:55start working with workflows.
00:57Which SharePoint Designer then, a wide range of users are able to create
01:01workflows to support their business processes.
01:03Workflows aren't just for developers anymore but can be created by Microsoft
01:07SharePoint Power Users, Office Power Users, and business analysts.
01:11If you ever use SharePoint Designer 2007, as soon as you open SharePoint
01:15Designer 2010, you know that you're in a new and an improved tool.
01:20SharePoint Designer 2007 was great, but it had its real limitations.
01:24For example, if I created a workflow on one part of a site, I couldn't easily
01:29reuse it somewhere else with SharePoint Designer.
01:32If I wanted to copy and reuse it, I needed to be able to use more powerful
01:36tools like Visual Studio.
01:38SharePoint Designer 2010 supports workflow reuse and some other nifty features
01:43like support for parallel actions so that you can have two steps happening at
01:47the same time in your workflows.
01:50There are three ways to create workflows for SharePoint 2010.
01:54The first is you can use SharePoint and customize one of the out-of-the-box
01:59workflows that already exists.
02:00If you're running SharePoint Server 2010, you have access to eight workflows that are pre-built.
02:05Some of them are compiled, and you can't change them, but there are a group of
02:10them that are called declarative workflows.
02:12You can customize them because they're compiled each and every time you're used.
02:15So you don't even need SharePoint Designer to be able to change those out-of-the-box
02:20workflows, the eight that you find in SharePoint Server and the one that
02:24comes with SharePoint foundation.
02:25You can use SharePoint Designer free from Microsoft, and again, easy access.
02:30You don't need to be a programmer to use this.
02:32But if you are a programmer, you might want to use Visual Studio.
02:36Microsoft Visual Studio is a coding environment for developers, and there are
02:41some times that we need to write some code.
02:43If you need to do some things with your workflow that you can't accomplish by
02:48using the tools in SharePoint Designer, you can still create the entire workflow
02:52in SharePoint Designer and then save it as a template and hand it off to a
02:57developer who can add the coded sections that you need.
03:01In this course we're going to focus on the workflows that you can create
03:04without needing to use Visual Studio or any other programming environment, what
03:09are called no-code workflows that we'll create using SharePoint and SharePoint Designer 2010.
Collapse this transcript
2. Documenting Workflows for Automation
Flowcharting or outlining workflow steps
00:00Whenever you create a workflow in SharePoint, the most important work you do is
00:04done before you ever start SharePoint Designer.
00:07It's the work of understanding and documenting your user's requirements for the workflow.
00:12Usually, you'll be working with a workflow that already exists in the business.
00:15It's rare that the first workflows you do will be brand-new processes that don't exist at all.
00:20And so you will find that the process already exists and has been customized by
00:24the people who are in it.
00:26Manual workflows often have hidden processes that you need to expose before you can automate them.
00:31For example, you may be talking about an application process, and someone will
00:35say, "Well, at this point, the application goes to Mary."
00:38And you ask, "Well, what does Mary do with that application?"
00:41Someone says she routes it.
00:42How does Mary decide where to route it? She just decides.
00:46So now it's time to go talk to Mary, a hidden process in the background.
00:50You might find that she routes it because she asks someone else, and they make a
00:54decision or you might find that she actually doesn't route it anymore, they all
00:57go to the same place, but everyone believes that she routes these things.
01:00So, she has become an extra step in the process.
01:03If she never had to touch the application, she'd be happier.
01:05Now, you can simply make notes of everything you learn about the process, you
01:10could put it on the back of a napkin or jot it down on a piece of paper,
01:15but I want to suggest that you have a more rigorous process that will serve you a little better.
01:19I always try to get whatever I'm working on in my computer. That's the best way
01:23that I can keep it all in one place.
01:26Various and sundry little scraps of paper aren't helpful, but sometimes they are
01:29helpful in a way as you're helping someone understand their own process.
01:33So for example, we can use Sticky notes, whether it's Post-it notes or
01:38computer sticky notes, to help people work through whatever the process is to explain it to you.
01:43So you might hear, for example, that you have the user fill out an application. Who does that? The user.
01:50So, there is my first note in the process. I say, "Okay. Well, what else happens?"
01:55Well, after that, the user emails the application to Mary. Perfect!
02:01What happens now? Well, Mary makes a decision.
02:04I might want to use another color for this. So I'm going to use green for my decisions.
02:08So, Mary decides who she needs to route this to. Great!
02:15And then she actually takes another step. Because it's not a choice, it's just a process,
02:21I'm going to make another yellow one.
02:23Mary then emails the application to the appropriate person.
02:28This is what could look like a hidden step here again, because someone might
02:31simply say Mary emails it to the right person.
02:33But as soon as you know there's more than one possible person, someone is
02:37deciding who it goes to.
02:39So, this is going to be a supervisor of some sort, and then the supervisor is going
02:43to receive this email, and the supervisor actually is making a choice too.
02:48It's another decision.
02:49So I'm going to change the color of this note again to green.
02:54So, the supervisor either accepts or rejects the application, and we could go on and on.
02:58Now, you might wonder what the utility here is of doing the notes this way.
03:02Well, one utility is when you have many steps, you can actually rearrange these
03:06notes right here on the screen just as you could if you were sitting in a
03:10conference room, and you were using Post-it notes.
03:12That's another great tool that you can use.
03:14Just give folks Post-it notes in two or three colors, say any time somebody is
03:17making a decision, use the green ones, if they're just taking an action, use the
03:21yellow ones, put them up on a wall, move them around.
03:24It's a great way to have teams of people decide how this works.
03:27The beauty of having it here in Microsoft Windows is that I can actually now
03:31take a picture of this.
03:32I can go in to All Programs > Accessories, the same place that I found my Post-it notes.
03:38And rather than using Sticky notes, I'm going to use the Snipping tool and
03:42simply say I want to grab a picture of that.
03:45I can save this on my computer, and I have a visual of the session that we've done together.
03:49I have sometimes had folks use Post-it notes to outline
03:53while I'm using the computer to capture the contents of their notes and moving
03:56them around to make sure that we have things in the right order.
03:59So, this is one way that I can capture this information.
04:02In the next few movies, I'm going to show you a couple of other Office tools
04:06that you can use to be able to outline your workflow steps to capture all of the
04:11requirements that we're going to need to create a great workflow.
Collapse this transcript
Using Excel or the Office Drawing Tools to document workflow design
00:00Another place that you can capture requirements for your SharePoint workflow is
00:04in Microsoft Excel, and Excel is actually a fine tool for capturing lots of
00:08information about business processes and business analytics.
00:11I'm going to start by creating a new worksheet, and I'm going to put in step and a description,
00:18the person or team that is in charge of that step--just widen out my columns a little bit.
00:25I want to know if there's a form that's being used at this point and what the
00:29name of it is, and then I'll just have a place for some notes.
00:32So, in our workflow the first step is that the User fills out the application form.
00:37It's the user filling it out, and at this point normally I would actually ask
00:43for two copies of the form, one copy as a blank form and the other copy as a
00:48copy that's been completed so that I can take a look at the kinds of
00:51information that go into the form.
00:53I'd like to have both of those in a hard copy, and I'm also going to request to
00:56have the blank form sent to me electronically.
00:59So right now this is actually called MgrAppForm.docx.
01:04That's the name of it, and I'm just going to write it down here so I'm
01:08tracking it. I'm going to say that the John will email form and send hard
01:15copies by a particular date.
01:17Now if I'm using SharePoint, I can say, "Can you scan those and put them up on the SharePoint site?"
01:21Create a folder for all the documents that I'm going to be using for this workflow.
01:26The second step then is Email form to Mary who actually works in the HR
01:31department, so let's just say that this is the HRIntake Person, and for now we'll call her Mary.
01:37And this is because later on I may wonder what happens when Mary no longer
01:41works here because she won the lottery or when Mary's on vacation, who does this instead?
01:46So it's the HRIntake person, so I'm going to kind of drill down into that and
01:50the user is going to do that again.
01:52And the form that they're going to send is that same form.
01:55By the way, the shortcut for copy the cell above is Ctrl+Apostrophe.
01:59So we already have that form, and then the third step of my workflow is that Mary
02:04determines who needs to approve.
02:07Mary is going to do that. There's no form actually being used at this point.
02:11So I want to take some notes about this and say how Mary decides.
02:14So if the applicant works in Manufacturing, there might be one person and then
02:22if the applicant works in a Retail Store, there might be a particular rule for who approves it then.
02:29And then All other applicants are approved by the Director of HR.
02:36So let's say if the applicant works in a Retail Store then approved by Head of
02:41Sales, and if the applicant works in Manufacturing then that's going to be
02:46approved by the Plant Director.
02:50So we're just keeping track of all of this information that we want to have
02:53together all in one place.
02:54Step four then is to Email form to appropriate person, and that's Mary and so on.
03:02So we're going to capture all of this information, including a good set of
03:06notes, including knowing what forms we're going to use.
03:09If you have a lot of different forms being used in a workflow, this would be
03:13a good time to start numbering or lettering them, form A, form B, form C, and so on.
03:17Write those same numbers on the hard copies you have, use those same numbers at
03:21the start of file name when you save these all in a folder.
03:24So we're collecting all of this information out of the business, we're making
03:27sure we have a great deal of clarity about what it is that we're doing.
03:31And best of all, we're saving all of this information here in Microsoft Excel,
03:35which is one of the most used programs out of the entire Office suite.
03:38So if I want to share this information with other people, it's easy for me to do.
03:42And finally, I can take this list here in Excel, publish it as a SharePoint list,
03:47and share it very broadly with the folks who are helping me document this
03:51workflow before we spend our time putting it together in SharePoint Designer.
03:55Excel is an excellent choice of a location to use to document workflows.
Collapse this transcript
Using Visio to document workflow design
00:00The very best tool that you can use to document your workflow is Microsoft Visio 2010.
00:05Visio is meant to diagram processes, to diagram layouts, and many folks are used
00:12to looking at different diagrams that are made with Visio.
00:15You may have Visio on your computer already.
00:17If you do, you'll find it in the Microsoft Office group, and I'm going to go
00:23ahead and click on Flowcharts because a workflow needs a flowchart.
00:25You'll notice that there is a set of templates called Microsoft SharePoint Workflow.
00:30There are three different editions of Microsoft Visio for 2010, Standard, Professional, and Premium.
00:36This Microsoft SharePoint Workflow is only available with Premium, and we'll be
00:40discussing this later in this course.
00:41But whether you have Standard, Professional, or Premium, all of them have some
00:46flowcharting tools that you can use.
00:48The way you decide what tool to use is a two-step process.
00:51One part is what tool are you most familiar with using.
00:54But the second is which of the tools is going to create diagrams that you'll be
00:59able to explain easily to your users.
01:01Because ultimately, after you're done diagramming, you will then take and share
01:05this with your users to say, "This is what I understood that you said."
01:09So if you're comfortable with Flowcharts and your users are too, use a basic Flowchart.
01:13If your users are comfortable with Flowcharts or with Cross-Functional
01:17Flowcharts, go ahead and bounce up to the Cross-Functional Flowchart because
01:21each of the lanes here is for one role, one user or one group, and they're really
01:27easy for folks to focus on.
01:28I create a number of Cross- Functional Flowcharts, but actually the tool
01:32here that I love is the Workflow Diagram, because it's really easy for folks to understand it.
01:36I'm going to go ahead and double-click to lay out a Workflow Diagram, I'm going
01:40to turn my paper sideways to make it easier for my diagram, because I'm going to
01:45run left to right on the page, and let's begin then by saying that we have a
01:49user that has a need.
01:50Now there are Workflow Objects and Departments here, but there's one more set of
01:54shapes that I always will turn on for this workflow diagram.
01:57Click on More Shapes > Flowchart, and down at the bottom you'll find Work Flow
02:01Steps, and I'll turn that on as well, because these are your action items.
02:05So let's start with the user who wants to make a request.
02:08I'm going to drag that request right out here into my flowchart, and I want them
02:12to fill out a form to do that.
02:14A form is an object, so I'm going to come over and grab a document and drag it in as well.
02:19Notice that as I get close to the shape that is already there, I get
02:23a line that shows me whether I'm lining up with the top, center, or bottom of the existing shape.
02:27So I'm going to drop my form there. That form then is going to be reviewed by Mary.
02:32Mary is going to decide who to route that form to next.
02:36So we'll go ahead and grab a Person shape, and that would be Mary.
02:40If the request comes from a user in manufacturing, there is a requirement that
02:45the chief operating officer be involved in approving this request.
02:49So let's go to Department, and we can either grab a Manager from here, if we wish,
02:55or there is the Manufacturing section, those are entire departments.
02:59Or I can see if there's a Chief operating officer here under Work Flow Objects.
03:04So we'll put the Chief operating officer in here.
03:07Now at the bottom of almost every set of shapes you'll find something called a Dynamic connector.
03:13Drag it into your diagram. It's a arrow that goes in one direction, left to right.
03:17I'll point the back of it here to my first shape, and notice that I have a
03:21red line around the shape, and it says Glue to Shape. Simply drop it there and
03:25the line will be glued, and there's a little red symbol here that shows that.
03:29I'm now going to grab the other end, glue it to this shape.
03:33So I'm connecting one step to the next, to the next.
03:39If I want to add a comment, I can simply double-click anywhere here. So if I want
03:44to add a comment to the form I can double-click on the form, and it will let me
03:48type below it, so I can note the name of the form.
03:52I can also double-click and type on the lines, so we're going to email this and so on.
03:59You might want to move your other shapes that you have room for the text to show.
04:03And the other thing is I don't have to just type on objects or connecting
04:07lines, I can actually go back to the Home tab, click on Text and draw a large
04:11text box and put any notes in it that I want to.
04:14When I'm all done I'll have a nice looking diagram that most of my users will be
04:18able to understand pretty easily. So Visio is a great place for me to capture
04:22workflows because it has all these symbols and shapes that I need in order to
04:26identify different roles and different objects, but also because it's really
04:30easy to understand for all of my users.
Collapse this transcript
Identifying areas for workflow improvement
00:00Whenever you have an opportunity to automate a workflow in the business, it's a
00:04type of workflow improvement, and what will happen is you'll have lots of other
00:09folks who want to add their own improvements to the process.
00:11Or you'll have people say go ahead and do it, and we'll get back to you later.
00:16In either case, you really want to have some control over how there's a
00:19discussion of the process so that you're implementing a workflow that makes
00:23sense for the business.
00:24Any time that you begin looking at the opportunity to improve a form, to
00:29improve a workflow, to paint a room a different color, other folks will want to jump on board.
00:34So how do we manage this entire process in such a way that it makes sense?
00:38First, you need to have some kind of an idea of what the process is to begin with.
00:43Sometimes you'll have a conversation and it's, you know, what are we trying to automate here?
00:47And just getting your arms around that and struggling it to a definition where
00:51you can say in one short phrase what the process is that you care about.
00:56In our case we're looking at employee onboarding.
00:59This isn't employee hiring, this isn't trying to do anything with any other
01:04parts of the process other than onboarding.
01:06So when we're clear, employee onboarding, that's it, then we can begin to start
01:11to know how we're going to get feedback from folks in the business.
01:14The second thing then, is to break this process into documentable steps.
01:19And because we know it's employee onboarding, it actually has a start and an end.
01:23There will be a tendency for folks who want to add things before the start and
01:27add other things after the end, and to the extent to which you accommodate that
01:31it's going to be really hard for you to get your workflow done.
01:34So be clear about the single process, the start and the end, and that
01:38you're only going to describe the steps in between for this particular
01:41workflow improvement.
01:43Once you've documented this, publish it broadly.
01:45Put it on your intranet, make a copy of it and blow it up and put it on the side
01:51of your cubicle, distribute these at meetings, hold a getting to know the new
01:54onboarding workflow process meeting.
01:57However you can, make sure that folks have an understanding that you're looking
02:01at making some changes to this workflow.
02:03And then you need to seek feedback from anybody who is in the process.
02:08Our employee onboarding process, we'll probably begin discussing it with the
02:12folks who are at the director level in this organization.
02:15But they won't necessarily know exactly what the steps are that are being
02:18done by the people and facilities who are in information technology or how
02:22those steps are done.
02:24So you want to make sure that you're talking to the right folks and that you're
02:27getting feedback from everybody who is working any place in this process.
02:31As you're doing that then, you're going to hear possibilities of improvement.
02:35For example, the folks and facilities might point out that if they were after
02:39information technology, it would make it a lot easier because they have to call
02:44IT several times during this process and ask them questions.
02:47If they could instead simply be sequenced a little later, that would be great.
02:50So those are the kinds of things that you're looking for.
02:53You're looking for places where people are doing manual processes, picking up
02:57the phone and calling for information, or a document that moves back and forth
03:00several times between the same two people or the same two groups.
03:04When you have those opportunities, go ahead and start building them into the workflow.
03:08Just here are our places for improvement, let's have a conversation to make sure
03:12that it makes sense.
03:13You'll want to watch in this process for folks who have lots of improvements but
03:17they're all for other people.
03:18Because you know in every organization you have folks who know that if only the
03:23folks in payroll worked as hard as they did, that we wouldn't have a problem.
03:27As you're working on workflow improvement and trying to make your workflows more
03:30efficient, a basic rule is you want to make your workflow more efficient, not
03:35try to fix the people who are in it.
03:37So what are the steps that folks believe would be helpful for them and then get
03:41the people on both sides of that conversation.
03:44So if you are in a conversation about how work passes back and forth between HR
03:48and payroll, it's great to have the right people from those two departments
03:51sitting in the conversation to say, "Yeah, that would make sense."
03:54They're the people who need to sign off on it, even if the idea came from
03:58somebody in facilities.
04:00Now we've got our improvements, we have some agreement on them, we've
04:03documented those agreements with new workflows published broadly, and finally
04:08now that we're changing the workflows, we'll run them for whatever our agreed
04:12upon period of time was.
04:13Let's try this for 30 days, 60 days, 90 days, depending on how mission-critical
04:18this workflow is, but also depending on how often it's used.
04:21A workflow that's only used once a month probably can't be evaluated well for 6
04:26or 7 months because you'll need to run it a few times.
04:29Once you're done evaluating, though, you're done with this workflow, document it.
04:33Know that you'll probably come back to it at some point because it's just the
04:36fact that you've made this investment in the workflow means that other people
04:40will continue to look for improvements themselves, and you'll be changing your
04:43workflow in order to adjust to the needs of the business.
04:46This is a really short course in workflow improvement.
04:50You can find lots of information about this online, it's an entire discipline.
04:54But as soon as you begin working with SharePoint Workflows, you become one
04:58of its disciples.
Collapse this transcript
Driving workflow interactions with forms
00:00Workflows are actually composed of two different kinds of things, first the
00:04logic of the workflow, which we'll lay out in a tool like Visio or with Sticky notes
00:09that we can capture the flow, but then we need the forms that we're going
00:13to use every single time we interact with the users, whether we're presenting
00:16data to them or trying to capture information.
00:19You'll see three different types of forms in your SharePoint workflows.
00:22The first are InfoPath forms, and they're created and edited with InfoPath
00:27Designer 2010, or they could be designed with InfoPath Designer 2007.
00:31For example, here's an InfoPath form that we'll be using later on in a workflow.
00:36The second type of form is a form that would be created using Visual Studio and aspx Web form.
00:42So here's an example of this form that we can display, as you can see here in a browser.
00:47The third type of form that you will see is a form that was automatically
00:51created by SharePoint, and this is a little tricky because SharePoint uses both.
00:56For example, if you're using SharePoint Foundation, then SharePoint is creating
01:01ASPX forms all the time, but you can edit these with SharePoint Designer as well
01:06as with Visual Studio.
01:07And if you're using SharePoint Server, Standard, or Enterprise, then
01:13SharePoint Server creates InfoPath forms, and you'll edit those with InfoPath Designer 2010.
01:19So depending on your environment, if you want to customize forms, you'll either
01:24want to know a little bit more about SharePoint Designer or a little bit more
01:28about InfoPath Designer.
01:30But remember that forms are a foundation for every interaction with a human
01:34being any place through your workflow.
Collapse this transcript
3. Running SharePoint Built-In Workflows
Setting workflow options
00:00The three-state workflow, or three-phase workflow, has been with us since SharePoint 2007.
00:06It appears in every version of Microsoft SharePoint 2010.
00:10A three-state workflow can only be use with lists, not with libraries.
00:14But despite these limitations, it's used over and over again because it's very easy to use.
00:18First, you have to imagine what your three states might be.
00:21For example, it might be that the first state is that item has been submitted,
00:25the second that it's been reviewed, and the third that it's been closed.
00:28Another possibility is that an item is active, an item has been handled, and an
00:33issue has been closed.
00:34So whatever the three states are, as soon as the item is posted it will have its
00:38first state, then some action will be taken, and it will move to its second
00:41state and a final action is taken, and it moves to its third state.
00:45If you need more than three states, this isn't your workflow.
00:48However, the three-state workflow is really easy to use and will give us a
00:52great idea of how easy it is to use all of the built-in workflows in Microsoft SharePoint 2010.
00:57We'll start by opening the list that we want to put this workflow in.
01:01We have an Issues list that was created using the basic Issues List template, and
01:06Issue Status is actually set up for three-state workflow.
01:10I'm going to add a new item just so I can show you that dropdown.
01:13Notice three different states, Active, Resolved, and Closed.
01:19On the Ribbon, I'm going to choose List and then choose Workflow Settings > Add a Workflow.
01:26This will take me to the list of built-in workflows that are available for this
01:29library, and here's our three-state workflow.
01:32I need to give it a unique name that describes not the type of template it is--
01:36which is three-state--but what we're actually doing with it, which is issue
01:40resolution or issue tracking.
01:41So I'm just going to call this Issue Tracking, then there are two
01:46possibilities of where I might want to put the history and the task list for this particular workflow.
01:52There's already a Tasks List that's built in here, and I can use it or if I
01:57expected this to be really high volume and the Tasks List was already use for
02:01something else, I could create a new list if I wished that was simply for issue tracking.
02:07But most of the tasks on this site will be related to issue tracking, so I'm
02:10just going to use the built-in task list here on the site.
02:13Same with workflow history. This is the only workflow I have right now.
02:18This next section, Start Options, asks us to decide how we would like this
02:22particular workflow to get started, and there are actually several options.
02:27One is that any time user wants to kick off this workflow, they can. So they'll be
02:32doing it for an individual item.
02:33If I choose that first option, which is manual starting, I can also require that
02:38only somebody who has permissions to manage this list can start the workflow.
02:42So a user might say, "I'm going to post an issue," but they actually can't start
02:47the workflow, only a list manager can.
02:49Remember that if I do this, though, I'm putting a human back in the place where
02:52they have to monitor and they have to do follow-up.
02:55I'm far better off if I can simply imagine that every time a new item is created,
03:00I want this workflow to start.
03:02I'll still leave this manual starting just in case in the middle of a workflow
03:05something happens, and I want to restart it, but normally any time I can, I'm
03:09going to start a workflow based on something automatic, an item is created or in
03:13the case, for example, of a document library, an item has been changed.
03:17I'm going to click Next now, and here are my workflow states.
03:21The first thing I have to do is I have to choose a field.
03:24And remember I showed you the Issue Status field, there are actually three
03:28different fields that have dropdown lists in them already that have exactly 3
03:31items in them, Issue Status, Priority, and Category, but Issue Status is what I want to use.
03:36Because that's already selected, SharePoint has also filled in the three values
03:41that were possible in that particular field, Active, Resolved, and Closed.
03:46If, for example, I chose Priority, notice that we'll read in the fields from Priority.
03:50I need to specify what my steps are in my workflow.
03:54So, first it says Custom message.
03:57Okay, the value for the field is in the Custom message, and I can include a list field.
04:02What you're seeing here under Task Details are all of the default settings for
04:07the first and the second states here.
04:09So the first state says that we're going to send a custom message that says
04:12workflow initiated on this particular item.
04:15And then it says a workflow has been initiated on the following list item, it
04:18shows the description, and it will show a link to the list item.
04:22I can include when it was due, and I can include who it was assigned to, I could
04:26also send a different custom message if I wished.
04:29So, this is a little archaic and a little difficult to read at first,
04:33but if you walk down each of the items and notice that you have a custom
04:37message with an ID being sent to a particular person that this item was
04:42assigned to, then down below it says we're going to send an email message to
04:46the person the task was assigned to and the subject will be the task title that
04:50was included above.
04:52In the second step, then, we have the workflow changes to its middle state.
04:57The next task is a Review task, and again, we're using the list field ID, we're
05:03sending information that says a review task has been assigned for this list
05:07item, who it goes to, who it was created by, and it will be sent to who it was
05:13assigned to, and the Task Title will appear. So, in our first step the workflow is initiated.
05:19In our second step someone is supposed to review the task to make sure that it
05:23was done properly, and then we're all set.
05:25At the end of this second step we move to our third state which is completed.
05:29So we don't have any specific details to apply to that state, because we moved
05:35to completed as soon as this second state has been done.
05:38I'm going to ahead and click OK.
05:40It doesn't really look like any thing is different in our list. It looks about the same.
05:44The only difference is if we go back to List on the List Tools, and I go to
05:47Workflow Settings over here and click on Workflow Settings, I can see that
05:51there's actually my Issue Tracking workflow is actually here, all ready to run as
05:56soon as somebody actually creates a new issue. We'll do that in the next movie.
Collapse this transcript
Running the Three-state workflow
00:00I have a SharePoint issue list, and I've added the three-state workflow to be
00:05able to automate my issue tracking. This is what this workflow looks like.
00:09A user adds request to the Issues list in SharePoint.
00:13There's an email to someone to resolve the request.
00:16They then update the Issues list with their resolution.
00:19The original requester, then, is prompted to decide whether or not that's resolved the issue.
00:24If it has, they mark it as complete and the issue is closed.
00:28If not they should add some more comments, mark it as Active, and it will be
00:31returned again to the start of the list.
00:34So here we have an active phase, resolved phase, and a closed phase.
00:39Let's see how this works when a user actually goes in and adds a new issue to the list.
00:44Here we are in the Two Trees Olive Oil Issues list.
00:46I'm going to add a new item, and I'd like someone to modify InfoPath form - NPJ,
00:56and to add a Department dropdown list, and I'm going to ask Olivia to do this.
01:04She's the only Olivia in our office, so no exact match was found, but I
01:07right-click on her name, and we can resolve it here.
01:10And the issue is going to be active, I don't want to change this.
01:13And I could make it a higher or low priority.
01:16Actually, every issue of mine has a high priority.
01:18So we'll just go ahead and modify that.
01:20Now I can add some more comments or description, for example.
01:23This request comes from the September steering committee meeting.
01:29Please contact John Ferris for details.
01:33Now if there were other issues that this depended on, I could go ahead and link
01:36them up, but this is the very first issue on my list.
01:39There's nothing more to add.
01:40This Comment section is used later by the person who's going to do the work, and
01:44let's say that there's a due date on this of October 10th.
01:49I'm going to go ahead and Save this.
01:52Now the first thing you may notice is that there's a new column here in my view
01:57that was never there before. It's called Issue Tracking.
02:00That's the name of the workflow, and it shows that it was in progress.
02:03This was added to my default view simply because I created the workflow.
02:07You'll notice that there is an issue assigned to Olivia, marked as Active, High priority.
02:13Now let's go and see what the email looks like that Olivia received.
02:17So here we are in my inbox, Workflow initiated:
02:20Modify InfoPath form, and I get a copy of this because I'm the requester, but Olivia also gets this.
02:26Notice here's the link, so Olivia's getting an email that says there's a workflow
02:30initiated to modify InfoPath form to add the Department dropdown list.
02:34Notice that it's important what I provide is the subject for my email, because
02:38the workflow is picking it up.
02:39When I added this in my issue log, it's being used, and it makes sense then to
02:43Olivia once she sees it.
02:44She can click on the link, it will take her right back here into SharePoint, and
02:49it says here's the item.
02:50So now Olivia can turn around and go modify that info path form and make some changes to it.
02:55When she's all done she can edit the item and say, okay, I think this is done.
02:59She would go to the Comment section and she would add, "I've added the dropdown;
03:06this is ready for testing."
03:09Then she'll change this from Active to Resolved, because she believes that she
03:14has resolved this, and she will save it.
03:17Notice that the issue now shows as Resolved in the Issue Status field.
03:21This would be my clue to be able to go work on it, and sure enough, here comes
03:25my email that says it's time to review the work on Modify InfoPath form at dropdown list.
03:31So I say, okay, Olivia, you've got the work done.
03:34I click on this, I go and take a look at it.
03:37Okay, it looks like she says it was all done, it's ready for testing.
03:40I would now go over, open up that form, make sure it met all my needs, and
03:45say yep, it's all done. Now I have one more thing I need to do.
03:49I need to say thank you Olivia. It's all done. This item is closed.
03:54I could even add a note, and I could say, "Looks great!
03:57Thanks, Olivia!" and Save this. Notice now that the issue shows as Closed.
04:03So there are my three states, active, resolved, and closed.
04:06And right now the Issue Tracking workflow shows that it's still In Progress, but
04:11in a few moments--or perhaps even right now, if I refresh--it's marked as Complete.
04:16So that workflow has run all the way through to conclusion.
04:19That's how easy it is to run a workflow once we've created it on the list in SharePoint 2010.
Collapse this transcript
Overview of the built-in workflows
00:00Built-in workflows are a key difference between SharePoint Foundation
00:04and SharePoint Server--either SharePoint Server Standard or SharePoint Server Enterprise.
00:09With SharePoint Foundation we get one and only one built-in workflow, that three-
00:13state workflow they we've used in the previous two movies.
00:16It's a great workflow if you have exactly three states, and it's also available in SharePoint Server.
00:22But SharePoint server also includes a number of other workflow, six of them, and
00:26I want to briefly describe these to you.
00:29If you're one of the folks who is running SharePoint server to do your workflows,
00:32you will want to know these are there so you don't create them from scratch if
00:36they're a really good match for what you're trying to do.
00:39The collect feedback workflow is designed to be able to have a document or list
00:43item go to a group of people for feedback.
00:45All of the feedback that's provided is compiled and sent back to the person who initiates the workflow.
00:50So might be that you want to create this workflow and have it available on
00:54demand and started manually rather than run it every single time a document is modified or created.
01:00The approval process routes a document or an item to people for approval, and
01:05it's a staged approval.
01:06So you can send it to one person or group, and after they approve, another and then another.
01:10So think of it as something that happens in series.
01:13There's also a disposition approval, and disposition approval is created to
01:17help you decide whether a document that is obsolete should be deleted or should be kept.
01:24This particular workflow is actually designed for use in records management.
01:28The approval process sort of is, but the disposition approval really is designed
01:32for records center site.
01:34Collects signatures requires you to be able to use digital signatures in
01:38your organization, and you kick off the workflow from some place typically in Microsoft Office.
01:44So it sends the document out, and then it is signed by different folks, and it
01:49requires the use of the Microsoft Office signature line.
01:53Translation management is a workflow that is used particularly for sending items
01:58out that are going to be translated.
02:00So we see this in translation management libraries only.
02:03It's not even available more generally.
02:06And finally, issue tracking is used to send an item around for resolution.
02:11So it presents a page that the user can fill out and say here's the issue that I
02:16want to have resolved, and as the issue works its way through different stages
02:20the resolution of that page is automatically updated.
02:23In addition to these six workflows, you can also use the three-state workflow in SharePoint server.
02:29So here's the entire list.
02:31The good news is that many of the workflows that are only available in
02:34SharePoint server are workflows that you can create using SharePoint Designer and SharePoint Foundation.
Collapse this transcript
4. Getting Started with SharePoint Designer
Launching SharePoint Designer 2010
00:00Before you can launch SharePoint Designer 2010, you need to download and install it.
00:05SharePoint Designer is free from Microsoft. This is a change from some prior version.
00:10So simply go to Google or to Bing and choose SharePoint Designer 2010, and the
00:15very first things that will come up will be the download.
00:17When you download SharePoint Designer, there are two different versions.
00:20There's actually a 32-bit version, as you see here, and a 64-bit version.
00:25The choice of 32-bit or 64-bit is not based on the capacity of your machine.
00:29You should instead choose the version that matches the version of Microsoft
00:33Office 2010 installed on your machine.
00:36For sample, on my desktop I have a 64-bit computer, but I have Office 2010 32-bit installed.
00:43So I would need to install SharePoint Designer 32-bit.
00:46SharePoint Designer itself is also very specific to the version of SharePoint.
00:50So you will want to make sure that if you are using SharePoint 2010, you use SharePoint Designer 2010.
00:59If you need to work on SharePoint 2007 sites, you will need SharePoint
01:04Designer 2007, and if you need to be able to use both if you're doing
01:09workflows for two different types of sites, then you will want to search in
01:13Bing or Google for specific instructions on installing both versions on a
01:18single computer, if you need to do that.
01:20So simply go download the software that you need, and you'll be able to install it.
01:25Here is the 32-bit version, download it and follow the installation instructions
01:29and then join me in the next movie so you can see how we're going to open a
01:33SharePoint site, list, or library in SharePoint Designer.
Collapse this transcript
Opening a SharePoint site, list, or library
00:00I've downloaded and installed SharePoint Designer 2010, and now I'm ready to
00:05launch and then open up the site that I want to add some workflows to.
00:08So I'm starting here on my site, and it has its URL that includes homepage, and
00:14that this is one of the site pages. But the core, the site itself, is this
00:18portion right here, HTTPS all the way through to the .com or .org or .edu, and
00:24unless I've memorized that, I need either write it down or copy it, because I'm
00:28going to need that site in just a moment.
00:31Now let's go to the Start menu and to All Programs, and depending on how it was
00:36installed, you're going to find SharePoint Designer in one of two places.
00:39One is in the Microsoft Office group, but if you don't find it there, don't worry
00:44about it. SharePoint workspace is not what you're looking for. You're looking for SharePoint Designer.
00:48Sometimes during installation there's a group created called SharePoint, and you'll find it here.
00:53So there is Microsoft SharePoint Designer 2010. Let's go ahead and open it up, and here we are.
00:59This is the first time this is launched, so I have no sites, I have nothing
01:03to save, and it says, "Would you like to open a site or customize a site or
01:07create a new site?" which you can also do with SharePoint Designer--creating it with these templates.
01:12I want to say I want to open an existing site, and it wants to know where it is.
01:16So I'm going to go ahead and paste in my information and click Open.
01:20Now I'll be asked do I want to log in as myself or do I want to use another account?
01:24And I actually want to log in as myself, and I'm going to enter my
01:28credentials and click OK. You may be prompted to do this more than once.
01:34Don't let that bother you. It's sort of normal.
01:36It depends on your environment and how you connect to your SharePoint Server.
01:41But here I am, I can see that I have the title for my site, I can see my
01:45permissions over here, and I'm actually looking at my site through the eyes of SharePoint Designer.
01:49Now the next time that I would go in to open up a site I can actually go to the
01:55Sites page and my site will be listed here under Recent Sites.
01:59So sites that you've actually open in SharePoint Designer will be here, and all
02:02you have to do then is you'll need to remember your password and your username.
02:07Your network credentials to connect to the site.
02:09But the first time you'll have to enter that information.
02:12Again, copy and paste is a great way to do that to allow you to go ahead and
02:16work in SharePoint Designer. Now there's one other possibility.
02:19I actually don't have to start in SharePoint Designer to begin with.
02:23Depending on what action I want to take, I may be able to begin in SharePoint.
02:27For example, if I'm in my site, and I know that I want to create a workflow, for
02:32example, then I could go to the list or library where I wanted to create the
02:36workflow, choose list, and for example, here, I see Workflow Settings, and I
02:42could create a workflow in SharePoint Designer.
02:45So depending on the action I wish to take, it may be equally easy to begin with a
02:51list or library and then move over to SharePoint Designer from there or launch
02:56SharePoint Designer as we did in this example and then connect to the site.
03:01Either way, we now have the ability to work in SharePoint Designer connected to
03:05this specific SharePoint site.
Collapse this transcript
5. Using Workflow Actions and Conditions
Understanding SharePoint workflows
00:00In SharePoint 2007 there was really only one type of workflow that you could
00:05create with SharePoint Designer, and that type of workflow was called list.
00:09A list workflow is tied to a particular list or library, and it acts on
00:14documents or items that have been dropped in those libraries or lists.
00:18This type of workflow is the standard bread and butter workflow.
00:21But in SharePoint 2010 we have two new types of workflows.
00:25The first new type is called a reusable workflow.
00:28Imagine that you create a list workflow or library workflow, and you say,
00:32you know, I have a lot of libraries of this type. I might want to use this in other places.
00:37So in older versions of SharePoint, if I wanted to reuse a list, I really need
00:41Visual Studio to make that happen.
00:43In 2010, I can create reusable workflows and tie them to different lists or libraries.
00:49The third type of workflow is totally different.
00:52A site workflow isn't tied to anything except a site.
00:56So a site workflow could look at three different libraries and take action on all of them.
01:02So a site workflow is very powerful and these are brand new for SharePoint 2010.
01:07We will be looking at all three of these workflow types in this course.
01:11Now they all I have different permissions as well.
01:14So if you have a list or library workflow, you just need to have design
01:18permissions for that list or library to be able to publish and use it.
01:21But if you want to be able to create workflows for sites, or you want to be
01:26able to save workflows to content types, which is one way you might do a reusable workflow.
01:31You need to have a much higher level of permission.
01:34You need to have design permissions for the entire site.
01:36So if you're working in an environment where someone else set your site up for
01:40you, when you get to Reusable or Content type workflows or to site workflows,
01:45you may need to go back and ask them to amp up your permissions a little bit so
01:48that you can create these different types of workflows that are brand new to SharePoint 2010.
01:54All three are great.
01:55They have different uses, and I think you'll enjoy seeing how each of them is created.
Collapse this transcript
Understanding events that start workflows
00:00In SharePoint 2010 there are three different start options for workflows.
00:05The first start option, manual, is the default, and you'll use manual whenever
00:10it's necessary for a person to decide when to start a workflow.
00:13For example, you may have a library of documents, and we've given any user the
00:18ability to go in and say this document may no longer be useful.
00:22It may in fact be obsolete.
00:24So we want the user to be able to right- click and kick off a workflow so that
00:28document would be reviewed.
00:30The second start option is to start a workflow each time an item is created, and
00:36this is the most used start option of all of these.
00:38It's used virtually any time you have a list or library where someone creates
00:43a new list item or drops a form in a library, and that begins the business process.
00:48So someone fills out a form, saves it, the workflow begins.
00:51The third possibility is that we want to have a workflow but only when an item is modified.
00:57So we have a library that has lots of existing documents in there.
01:00They've already been approved.
01:02Now when someone goes in and changes the document--because it's time to modify
01:06or it's time to update it-- that review starts the workflow.
01:09Let me remind you where these settings are.
01:11When we create a workflow here in the new workflow page, or change a workflow,
01:16start options are down here at the bottom. You can have more than one option checked.
01:20So here we are automatically starting a workflow when a new item is created, but
01:24we would also allow a user to start that workflow.
01:27Easy enough to get to.
01:28And we might have several workflows operating in one library.
01:32For example, that same document library that has a workflow, every time there's
01:38a new document placed in it so that each time an item is created there is a
01:42workflow might also have a different workflow that runs each time that same document is modified.
01:47Finally, we may have a manual process in that library that would allow users
01:51to go in and say I want to start that archive in our obsolescence checked workflow.
01:56So it's not unusual to have multiple workflows going in one library, particularly
02:00when you're looking at documents.
02:02But many lists in contrast would normally have one or at most two different
02:06workflows in a custom list.
02:08For each workflow you create, though, you need to decide is human intervention or
02:12human decision-making needed to decide when to start the workflow?
02:15If so, you'll only want to use manual.
02:17Or is this a workflow that can kick off automatically on creation or on modification?
Collapse this transcript
Understanding workflow steps
00:00So when we talk about a workflow step, a workflow step is a combination of
00:05conditions and actions that we've bundled together, or it's possible that only
00:09conditions or only actions, but it's the logical unit that makes sense.
00:12In this workflow that we're going to be creating in this course, we have some
00:16specific steps here in approval process.
00:19First, an area vice president approves, that's a step.
00:22Then it moves on to the finance vice president and all the actions related to
00:26the finance vice president and all the conditions, those are a step.
00:29And then we have an HR vice president who's approving, that's another step and
00:33then there are other steps that will follow. So the area vice president's
00:36approval, let's look at that one step. First, it begins with an action called Email.
00:42After that action has been taken, there's a second action, and that action is
00:47almost an inaction, but it's the action of waiting.
00:50Following those two actions, then, we have a condition.
00:53A condition says we will take different action based on the results of a value,
00:59who filled out a form, what the value was in a field.
01:02In this case, we are actually looking into this current item in the list or in the form
01:06and we are saying does it equal yes or does it equal no.
01:10In the form, it's a check box.
01:11If it equals no, that's the core of the condition.
01:15We then have two actions that are tied to that condition and only to that condition.
01:19If the vice president turned it down-- that's what VP Yes/No equals No means--
01:25then we're going to email the person who created the item, another action, and
01:30we are going to stop the workflow and log the request.
01:32That stopping and logging is one action all by itself.
01:35So this area VP approval step actually has two actions that will be
01:39completed every time and then a condition, and if that condition is true
01:43that the vice president turned down the request, there are two other actions that will be taken.
01:48If the vice president said yes, then we'll move on through the workflow.
01:52So you will notice that this could have been two or three or even four different
01:56steps, but by bundling them together we make this workflow much easier to understand.
02:01So think of your steps as you might think of sections in a presentation or
02:06headings in a Word document.
02:08Sections, headings, and steps are all used to organize your content to make
02:14it easier to think about, easier to understand, and easier to modify later on if you need to do that.
Collapse this transcript
Understanding workflow actions
00:00You and I create workflows in SharePoint because we want SharePoint to take action on our behalf.
00:06SharePoint has a huge list of actions that you can incorporate in your workflows.
00:10The actions are organized in categories based on how you'll use them, and the names are pretty logical.
00:15For example, actions that affect the behavior of an item in list are called List Actions.
00:21We also have core actions, task actions that appear only in SharePoint
00:27Server 2010, and utility actions sort of mop-up actions, but one of them allows
00:33us to subtract one date from another, so it's incredibly useful.
00:36Then we have some other actions that we don't see all the time.
00:40For example, the document set actions are only available for workflows that are
00:45associated with a special document content type. Relational actions appear only
00:50when your SharePoint site is running SharePoint Server 2010. Task behavior
00:55options only appear when you customize tasks in pre-built workflows like start
01:00approval process or start feedback process.
01:03We're going to be using the list actions and the core actions right away.
01:07We'll work our way up to some of the other actions like task and utility, so let's see
01:11where we'll find all of these actions.
01:14Here we are in SharePoint, ready to create a new workflow that's associated with the list.
01:19So if we look at Step 1, there are two ways to get to the actions list.
01:23The first way is to click on Action, and you'll see all the actions grouped together.
01:27so Core Actions, add a comment, do a calculation, log something, set a
01:34workflow variable, send an email, pause for a duration, these are popular
01:39actions that we'll be using over and over again.
01:41And then because we're in a list, we have List Actions, checking items in and out,
01:46copying them and deleting them, discarding checked-out items, setting a value in the current item--
01:52again, something you'll use over and over again--or waiting for a change in the current item.
01:57Then we have Task Actions, less used, and Utility Actions that allow us to
02:02manipulate text, but this Find Interval Between Dates is used a lot. So we can
02:07click on the dropdown and choose, or if you know something about the name of the
02:11action, you can click where it says Start typing, and even though you don't
02:16actually get an insertion point, it's waiting for you, so you could set type--
02:19for example--Set value. It says No results. But Set, maybe that's the name of it.
02:24Press Enter to view.
02:26Set Field in Current Item, that's the particular action that I'd like to use.
02:31So, if you know something about its name, it doesn't have to be the first
02:34word, you can find it that way, or you can click the Action List and choose from the dropdown.
02:39The actions available when you're creating a workflow always are going to depend on your context.
02:44For example, the start approval process and start feedback process actions
02:48aren't available here. We don't see them at all, and that's because they're only
02:52available in certain context and when we're working with certain workflows.
02:55If you don't see an action that you believe would be there, suspect your context
03:00before you start to assume that maybe that action never existed at all.
03:04So very easy to choose actions, simply click in your workflow and choose
03:07from the dropdown list, or begin by typing some part of the name of the
03:11action you wish to choose.
Collapse this transcript
Creating a simple workflow using the Send an Email action
00:00One of the actions that you're going to use the most is the email action, because
00:04you'll want to notify people all the time of steps in the workflow that
00:08something is ready for them to work with.
00:10So we're going to create a very simple workflow in our Shared Documents Library
00:14that only does one thing, when there is a new item that has been saved to the
00:18library, we are going to send an email to the person whose job it is to monitor the library's contents.
00:24Now in a SharePoint they could easily set an alert for this, but that wouldn't
00:28help us learn how to use the email action item.
00:30So we are going to dive in and create this one-stop workflow and learn how to
00:34create email messages using this action in SharePoint.
00:37I want to remind you that we are going to work with the Shared Documents
00:41Library, there are no documents in it yet, it's a very basic library like you're
00:45used to in very single SharePoint site that you work with.
00:47And here we are in SharePoint Designer.
00:50We've already started it up, connected to this site by opening it.
00:53And we're going to List and Libraries, and there is our Shared Documents
00:57Library, and we can add a Workflow here.
01:00So we are going to choose List Workflow and give it a name.
01:03I always start these with a verb, it makes it easier to think about what they
01:07are, and we are going to send an email to the library monitor.
01:12A Description is always a good thing, including, for example, who created this
01:15or what his purpose was.
01:17And I'm going to say that this was created by Gini Courter to notify the library
01:22monitor that a new document has been added to library.
01:28All good, click OK. Now we're ready to add an action.
01:31We are in Step 1. I'm going to go to Action > Send an Email.
01:35You will find that right here under Core Actions if you haven't used it recently.
01:39If you have, it's up under Recent Actions.
01:41Now this works a lot like the rules do in Outlook, and in some other
01:45applications, where when I choose an action, and it needs more information
01:49there is a hyperlink, right now it's emailing these users, and we don't even know who they are.
01:54So I am going to go ahead and click on the hyperlink, and it's going to open Define Email Message form.
01:59So, I'm going to send this to olivia@twotreesoliveoil because she is the person
02:04who is the monitor for this particular library.
02:07And the Subject, she is going to get lots of these, I'm going to send her out of
02:11the Current Item, the title of this document or the name of this document, they
02:15are actually the same. So I am going to say here's the document name.
02:19So she'll actually get an email that will have the name of the document in here.
02:23And now I can actually add some text that would be more explanatory.
02:27Olivia - The Shared Document library you monitor has a new document added by,
02:33and I am going to go to Add or Change Lookup, and we are going to go to the
02:38Current Item, and we are going to find out who created this item, that would be the Created By field.
02:43So it has a new document Added By, Created By. Here's a link to the document.
02:48I am going to press Enter a couple of times so I don't have a URL running off the end of this line.
02:54And we're going to insert here an item that you will just absolutely want to
02:58remember because you are going to use it over and over and over again, which is
03:02the Encoded Absolute URL.
03:03So this is a URL that points directly to this document in the Current Item in
03:08the SharePoint list. I am going to say OK. So here's a link to the document.
03:12I need some way to sign this email message now when I'm all done, so I could say
03:16your SharePoint server, normally I will add something like, If you need more
03:21information about this SharePoint workflow, please contact--and it could be my
03:27contact information or someone else's, but we would put that here.
03:30Particularly when we have a new person join our organization that isn't used
03:34to getting these kinds of emails, and they're like where do these come from, I can't even tell.
03:39So it's nice to do that.
03:40Because I'm testing I am actually going to put myself in here too, I will come
03:44back and edit this workflow later and remove my name from the workflow, and I
03:48am going to say OK. So this is my entire workflow.
03:52Now I have a couple of steps that I need to do in order to save and publish this.
03:56First I am going to click Save, that's all the more time it took to go connect
04:00to the server and to save it.
04:01However, saving this alone does not make it available for use as a workflow yet.
04:07Let's go over and take a look.
04:08Here is our Document Library, and if I go to Library > Workflow Settings, I'll
04:15find that there are no workflows currently associated, my workflow is saved, but
04:19only saved for SharePoint Designer, I still need to publish it to associate it
04:23with this particular library.
04:25So here we are back in SharePoint, I want to publish this, but that's not all I
04:30want to do actually, I want to check it for errors, that's good, make sure it
04:33has no errors, and I'd like to publish it.
04:37But I'm still in the Editor now, all I'm doing is listing steps.
04:41There is actually one more important thing I need to do.
04:43I am going to go back to my Workflow Settings, here's all the settings that
04:48pertain to my new workflow that I've created, Send email to library monitor.
04:53You remember a little thing called Start Options, one of the things that I need
04:57to do is say whenever a new item is created start this workflow automatically.
05:01If I don't do that the only way I can start the workflow is to do it manually.
05:05I will either need to tell my users, hey, start the workflow when you're done, or
05:09I'll need to go in and do that myself.
05:11So we're going to start this workflow automatically when a new item is created.
05:14I am going to save and publish it again.
05:17If I ever need to come back and edit, or rename, this workflow you will find all
05:21of these tools right here under Workflow Settings.
05:23So that's all done. Let's go take a look at our library for just a moment.
05:27Now this is my Document Library Settings, I am going to refresh this.
05:31And when I do you'll notice that Send email to library is here, and it's actually here twice.
05:37Once when I saved it the first time I published it, the second time when I saved
05:41and published it the second time.
05:42Between those two workflows if some user had jumped in there and had said, I
05:47am going to create a new document, they would actually be running the very
05:50first workflow, but it was only a matter of seconds, so not something that we need to worry about.
05:55And we'll talk later about what you do when you have workflows that are no
05:58longer being used and how you remove those. So let's go to our Library.
06:03If you're not really, really used to going back behind the scenes in SharePoint,
06:07I want to point out to you that these are breadcrumbs, and so I can go back to
06:11Share Documents by clicking right here, I don't have to go Home to get back there.
06:15And now let's add a document here, I am going to browse, and I have a lot of
06:22different documents that I could use, but I'm going to simply use this document
06:28and post it to the library.
06:30There is some information I could fill in, I am all good on this so I am
06:34going to click Save.
06:35So here's my workflow, that workflow already executed.
06:38Here's the email that I was copied on.
06:40Notice it says to Olivia and to Gini, it comes from
06:44sharepoint@msoutlookonline.net, that's the domain.
06:47But it says The Shared Document library you monitor has a new document added by,
06:52that's my exchange name, here is a link to the document.
06:55We could click on this.
06:57We are going to set this aside for just a second because I also want to show you
07:01that as a result of this workflow being published and running there is a new
07:05column with the name of the workflow, and this workflow is already completed and
07:07only had one step to do, we saw that it did it, and it didn't take that long.
07:10But when a user goes in I am going to go back to Home just so you can
07:14actually see the difference.
07:16And now when I open this email and click on the link, it should take me to
07:21shared documents and will actually prompt me to open that document that I had
07:26posted on the SharePoint site. So that encoded absolute URL goes directly to the
07:30document right here in the library, and I could simply say I want to open it
07:34now, or I could save it.
07:36So our link works, our workflow works, everything is great. That's how you
07:40create a simple workflow using the email action in SharePoint Designer.
Collapse this transcript
Setting task and history log settings
00:00There is one more group of Workflow Settings I need to bother you about before
00:04we move on, and those are the settings for your Task List and your History List.
00:09The Task List actually refers to items being written to the Task List on the site.
00:14And that Task List can be connected by your users back to Outlook.
00:18So an example is that if you use an issues list, and you fill out an issue and
00:23assign it to someone that item is automatically placed on the Task List.
00:27And then if that user connects the Task List to Outlook they will see their
00:32tasks in their own Outlook profile. It's a really easy thing for the users to do.
00:36For example, here's our Task List, and it's really as easy as choosing List >
00:42Connect to Outlook to connect back to your Outlook account.
00:46And then any items that I have on this Task List automatically appear here on
00:51my list in Outlook. Isn't that just a great thing for users?
00:54So because this is so easy it makes sense for us to try to put things in the
00:59Task List as a way to encourage users to go ahead and complete them because when
01:04they mark them done in Outlook it marks them done here in and SharePoint and
01:07will reflect that back to your workflow.
01:10Because of that I really want to use one consolidated Task List.
01:13I might have three or four different workflows on the site, but I try to
01:17stick with one Task List.
01:18If I decided I wanted a different Task List I could create it here.
01:22If I do I'll need to direct my users to connect that Task List Outlook as well.
01:27And that's just one extra thing that they may not remember, or they may choose not to do.
01:32So I'd like to make this really easy for them.
01:35But one of the things that's important here is I also need to do this early on
01:39because if I do it after I've published the workflow, and if I do it way down
01:44the road then I may actually make my workflow stop working.
01:49There are directions on the Microsoft site about how you can double-check
01:52list references, or go back and change them, but you really don't want to have to do that.
01:57So the preference would be that you not change the Task List, or the History
02:01List, unless you need to.
02:02If you have many workflows in a particular site, and you know that you are going
02:08to have a lot of workflows, you might want to begin by creating a separate
02:12History List for workflows that are going to generate a lot of history.
02:16SharePoint is going to write to these workflows, it's going to write when a
02:20workflow is canceled, it's going to write when a workflow is completed, and you
02:24will choose to write to this History List too because this is the place that you
02:28can collect information, that you can go back and look at to try to diagnose any
02:32issues you might be having with a workflow.
02:34So if you want a separate History List, there is nothing else that links to it,
02:38it doesn't hook to Outlook like the Task List does, but you would want to do
02:42this immediately at the start of creating your workflow.
02:45And so if you said that I would like to create a new History List, then
02:49SharePoint will automatically create a list called Send email to library monitor history.
02:54It will use exactly the name of your workflow and append the word history on the end.
02:59The last item here in Settings, Show workflow visualization on status page, as
03:04you can tell when I point to it requires a whole lot of things, SharePoint
03:07Server Enterprise Edition, but it also requires Visio Premium on the computer
03:12that SharePoint server is running on.
03:14And then we'll give you a small visualization if you want to see that.
03:17So settings for your Task List and your History List upfront as well as
03:21you're setting for Start options just to make sure that your workflow is actually running.
03:25These settings you can change at any time with no problem.
03:29These settings, if you change them, will create some difficulty for you.
03:32So make sure you have your Task List and History List settings clear in your
03:35head, and set up the way you would like to set them, before you start running your workflow.
Collapse this transcript
Creating a workflow using the Wait for Field Change action
00:00One of the things that SharePoint does very well, that humans don't do so well, is it waits.
00:05There is actually an action in SharePoint that waits until the value of field
00:09changes, and you'll be using this particular action over and over again.
00:14Let's walk through the workflow.
00:15We are going to start this employee onboarding process with someone in HR
00:19filling out an entry in a list that we've created called employee onboarding.
00:24So this list sits on our SharePoint site, somebody from HR goes in, fills out
00:28the employee's name, clicks and attaches some documentation.
00:31Then they go in and they mark the date to show that they've created everything
00:35they needed to in HR, and this is ready to move over to payroll.
00:39At that point we want SharePoint to send an email to the payroll department to
00:44say, hey, new person, go check him out.
00:46So that the folks in the payroll department can add the employee to the payroll
00:49system and the benefit system, and then enter the date to show that they too
00:53have gone in and have done all of their work for this new employee.
00:56At that point we want SharePoint to say, the date has changed in that payroll
01:00field, it must be time for facilities to kick in.
01:03So at this point the email gets sent to facilities so that they can provide an
01:07office, a parking sticker, and so on for the employee, and mark the date to show
01:11that all of their responsibilities for onboarding are done.
01:14And at this point we'd like SharePoint to say, let's let the IT folks know there
01:18is a new employee so that they can discharge all of their responsibilities.
01:22So we've gone out, we've interviewed everybody in the business, we've made sure
01:25that this is the sequence that they want this done in, and it is.
01:28And we've obtained the email addresses for the folks we want to send these emails to.
01:33So we know that we're going to send an email to Greg in the payroll department,
01:36to Janet in facilities, and to me in the IT department.
01:39This is our very simple employee onboarding system, and we are going to go ahead
01:44now and create the workflow.
01:45Here we are in SharePoint Designer in our Lists and Libraries List.
01:50Here's the Employee Onboarding list, here are its Settings.
01:54I am going to click Edit list columns just so we can slide over and see
01:58that these custom columns HR, Payroll, Facilities, and IT all of them are
02:04date and time columns.
02:05I sometimes see applications where these would be checkboxes that someone from
02:09HR goes and checks that they've done something.
02:12But that's such a small amount of information that it might even be a mistake.
02:16And so whenever I need to collect information that tells me that something was
02:20complete a check box is not good enough, I am going to have somebody enter the
02:25date, I am going to have somebody enter their date and initials.
02:28Whatever it takes for me to actually know when the work was done.
02:31Why would I throw away this information that would allow me later to say how
02:35long it took for the folks in Payroll to be able to complete onboarding.
02:38So right from the beginning I usually will replace checkboxes in forms with dates.
02:42You are going to be creating custom libraries and lists over and over again if
02:46you do workflows in SharePoint.
02:48So if creating these kinds of columns or working with a list like this is
02:52something that's relatively new I want to refer you to the SharePoint 2010
02:56Essential Training course in the lynda.com Online Trading Library. Specifically
03:01let me point you to Chapter 5, which is on creating custom lists and libraries.
03:06But we have our list, we are all set, and what we want to do now is we want
03:09to create a workflow.
03:11So I'm going to click Workflows, we are going to create a list workflow, and we
03:16are going to choose the list, which is called Employee Onboarding.
03:18Here's our new workflow, I'm going to actually name it Employee Onboarding.
03:23And we are going to create several versions of this in the course.
03:26So this one is actually a serial version where we have first HR, then after
03:31that Payroll, and so on.
03:32We are going to do a parallel version of this and a couple of others later.
03:36Remember that it's good to enter a description, who it was created by, how they
03:39can find you, what the purpose of this was, and I am going to click OK.
03:43So the first thing we want to do is we want to wait for the HR department to say
03:48all of our work is done on this.
03:50So we are going to choose an action, you'll find it under the List Actions that
03:54says Wait for Field Change in Current Item.
03:57So I am going to wait for a particular field and the field is called HR, when I
04:01created the list I just named these fields after the four departments that will
04:04need to do this work.
04:05And I want to wait for HR to be greater than another value.
04:09Now the HR field is a date field, so I need to enter a value that's a date here.
04:14So I am going to say any date, almost any date would do, but I'm just going to
04:19say 1/1/2001, for example.
04:21Anytime somebody enters a date in the field at all it better be greater than
04:25January 1st of 2001.
04:27So that's our very first step is a step wherein we will wait.
04:30Our next step then, as soon as HR is greater than 1/1/2001, I can go ahead and
04:37say, okay, once we're done waiting we are going to go ahead and send an email.
04:41And the email is going to go, in this particular case, to the payroll
04:45department, and that's Greg. So greg@twotreesoliveoil.com, New Employee.
04:53Now remember I could also choose to put the employee's name in here because I
04:57have that field, and I could say dear Greg, or I could say dear Payroll
05:00department, or I could just say nothing if I wanted to.
05:03Dear Payroll staff:
05:05Please complete the onboarding activities for--and we know we have this
05:12employee's name, so we are going to add a lookup in the Current Item, we are
05:16going to go get this employee's name, right there.
05:20After you have done this, or after you have completed the activities, remember to
05:25visit the Employee Onboarding list and enter the date under HR. Here's a link.
05:34So we could send them right back to that item in the list, and you'll probably
05:37remember that we're going to do that by adding a lookup that is to that Encoded
05:42Absolute URL right here, more information if we wish.
05:47Now I'm going to create an email like this several times, one is going to go to
05:51Payroll, one is going to go to the IT department, one is going to go to
05:56facilities, so it doesn't hurt for me to copy this at all if I would like to.
06:00And while I can change this as I go through I really want to make sure that I
06:04have a pretty good look on this that the subject, for example, New Employee
06:08Onboarding probably isn't going to change, and that's because later on in this
06:11course you will find out how you can encourage folks to set up rules in Outlook
06:15to manage this email as it's coming in.
06:17So we are going to say, okay, it's going to make sure that it can find Greg, and it did.
06:22So there is our first step, wait for HR to be greater than this, then email Greg.
06:26And I could actually even name this step, I can click here, and I can say HR
06:31Done, Notify Payroll, it's a good name for that step.
06:35Now let's add another step, and we will do exactly the same thing again.
06:39But this step instead of being called Note HR Done will be Payroll Done, Notify Facilities.
06:47The next step would be--well here is a learning moment, I actually didn't
06:51want to create this in here, I wanted to create this step outside so I should
06:54have clicked outside.
06:55We will just go ahead and do that, and I'll come back and delete this in a second.
06:59So this one is going to be called Facilities Done, Notify IT.
07:04And I am going to select this step three, and notice that it's yellow, and I'm
07:08going to go ahead and delete it and get rid of it.
07:11So, HR is done, notify Payroll, Payroll is done, notify Facilities,
07:14Facilities done, Notified IT.
07:15I am just going to drop in and set these two actions in this first one again.
07:20Notice that because I'm using these actions, they are right up here, so I am going
07:24to wait for a change in the field, the field in this case will be Payroll
07:28because it's Payroll that would be done.
07:30And I want Payroll to be greater than, and again I am just going to use that
07:34same date over and over again, whatever my magic date is.
07:38And I'm going to right here, insert another action which is to send an email,
07:43email these users, and I will have an email then that I can send to Janet at Two
07:48Trees and the subject would be New Employee Onboarding.
07:51And I'd have some text that I would send to Janet along with the URL and
07:55encouraging her to go back to the site and enter the date when she is done.
07:58And I would do exactly the same thing for the Facilities done, Notify IT.
08:03So I'm using a combination of wait, then email, wait, then email.
08:08So in each case when our folks have gone in to that list or library, Employee
08:12Onboarding list, and they've changed and entered the date that the HR work was
08:17done or Payroll or Facilities and so on, that's actually going to kick my
08:22workflow to the next step each time.
08:24So wait, email, wait, email, wait, email, and so on.
08:29This workflow isn't quite, done but you don't need to hang around while I finish
08:33it, I am going to go ahead and save this.
08:35Before I publish it, I'm going to go back out and take a look at it out here not
08:40in the Editor, but out in the Settings.
08:43And remember that what I want to say is start this workflow automatically when a
08:47new item is created.
08:48I'll finish the workflow back in the Editor, and then I'll be ready to go in and
08:52to publish it when I'm all done with it.
Collapse this transcript
Using conditions to make a choice
00:00Every SharePoint Workflow step can have one or more actions, and one or more conditions.
00:06Conditions determine whether an action should take place or not.
00:10For example, if we were calculating a payroll, we might want to know whether to
00:13use a calculation for over time. So we'd look for the condition, are the total
00:17hours greater than 40? Or if we've had someone check a particular box that says
00:22they're going to provide us with some other information, we might only want to
00:25include that other information if we saw that the box was checked.
00:29So conditions come in different flavors just like actions do.
00:33There are some conditions that are very specific to a context.
00:36These are the conditions that are generally available and are available here in
00:40this particular list.
00:41So first, If any value equals value, this is very generic and allows us to
00:47compare any two things.
00:48We could compare a value from a column in a SharePoint list to some static text
00:53like a number or date, we can compare two text strings to each other, we can
00:58compare information that we've calculated and stored in a variable.
01:02And when I choose if any value equals value one of things you will find is it
01:06includes equals and not equals.
01:09And when we look at values we have a wide range of places to pull things from,
01:13so we can use the workflow look up that we used before.
01:17We can also say, If current item field equals value, so imagine now we are in a
01:21library or list, and we are looking at this particular item. What does the
01:25field in that item equal?
01:27And once again when I choose this it's not just equals, it also includes
01:31not equals as a choice.
01:33So more specific the condition, If current item field equals value is a more
01:38limited version of If any value equals value.
01:41Other conditions are that this item was Created by a specific person, or in a
01:46particular date span.
01:47This item was Modified by a specific person, or Modified in a specific date span.
01:53Person is a valid SharePoint user. You might wonder, what's that even about?
01:57Well, it's possible for you to have folks on your team who aren't necessarily
02:02SharePoint users. So if you had external partners participating in a project,
02:07someone might go in and say, well I'm going to assign the review for this
02:11project to Joe. And they would type in Joe's email address, but we want to
02:15make sure that we can send something to Joe so Joe can get back to the SharePoint site.
02:19So this is a way to check and say if this person is a valid SharePoint user,
02:23fine, we will go ahead and send the review request to Joe.
02:26But if they are not a valid SharePoint user we are going to send an email back
02:30to the person who made this decision and say, you can't send it to Joe, Joe is
02:33actually not on our SharePoint domain.
02:35And finally, the other condition that you can use is you can say that the Title
02:39field contains specific keywords.
02:41And if you choose that, you'll take a look, and you'll actually enter the kinds
02:45of keywords that you're looking for.
02:46So you'll type in that you would be looking for project, for example, or any
02:51other particular word that you wanted to use.
02:54Notice that as I add condition SharePoint assumes that I want all of them to be
02:58true, so it joins them with the phrase and.
03:01If I have two different phrases and either of them would be good enough, either
03:05of these conditions, then I would click on the and to change that to or.
03:09This is a toggle field, and, and or.
03:11If I want to simply delete one of these conditions I delete them, and this is a
03:15time that I might want to be really good at moving things up, it might be true
03:19that I want the first one condition to be before another and so I can just
03:23rearrange them using move.
03:25So I have put conditions in place, and then I can say, well, given these
03:29conditions if these conditions are true, then let's go ahead and add some actions.
03:33So by combining them together in one step SharePoint will make sure that the
03:37conditions are true, and if so, we will turn around, and we will email these
03:41users or we will wait for a particular period of time or we will change the
03:45value in a field and so on.
03:46Conditions and Actions combine together to create powerful steps in your workflow.
Collapse this transcript
Using advanced conditions: IF, THEN, and ELSE
00:00You can chain multiple conditions together to create an if/then or if/then/else
00:05or even a case statement type of condition where you can say, well, if the user chose
00:10one, we'll do this, if they chose two, we'll do the second action, if they chose
00:15three or four, let's do the third action, and if they made no choice at all, let's do something else yet.
00:20I want to take a look at a very small portion of a workflow that we'll be creating.
00:25This is a new position request, and in this case, we got this diagram from the
00:30Information Technology Department so they use a swim lane to show it to us, it's
00:34not quite as cuddly as some of the other diagrams we've looked at, but it's a
00:38great diagram that you want to get used to using.
00:40So we have a start, somebody's completed a form, and they've dropped it off.
00:44And this form is to request a new hire in a department, a position that
00:48doesn't exist already.
00:50And so the vice president for that area needs to review the request, and they
00:54have two possibilities, one is they're going to say yes, and if they do it'll be
00:58passed along to the VP of finance, and if they say, yes, it'll be passed along
01:02to the VP of HR, and if they say, yes, the position will be created.
01:05But at any point along the line any one of these vice presidents could say no.
01:09No I don't think we need another person against the budget, no we don't need
01:13more people at all right now, or no this isn't the time to hire because
01:17we're looking at some other types of alternatives.
01:20So if we just took a look at this section here, what we have is we have an
01:24if/then/else condition.
01:26If the request is approved by the area vice president, then we pass the request
01:31along to the next vice president, but if it is turned down we're going to send
01:35an email back to the hiring manager, and we're going to end our workflow.
01:39So this is how we want to read this, we have an if/then, but we also have an
01:43else, because if the if isn't true there will still be an action taken.
01:48Let's take a look broadly at how we'll combine these conditions and actions into
01:52steps in SharePoint Designer.
01:55So here we are in SharePoint Designer, and we're looking at a skeleton of what
01:59we'll be doing with this particular workflow, because you don't have to publish
02:04every single thing you save in SharePoint Designer, this is actually another
02:08valid way to think about outlining workflow, so I'm looking back and forth at
02:12the diagram that I was given, and I was saying okay.
02:15Well, we're going to process the area vice president approval first,
02:17somebody's dropped the form off and the very first person that sees it is the
02:21area vice president. So we're going to email that area vice president and wait
02:25for some change to happen.
02:27Now we actually have a form where they are going to check a box for approval or
02:31not, but more importantly they are going to set a date.
02:34So when we take a look at that date field, if the date field has changed then we
02:39can take a look at the check box.
02:41If the check box is true, or if the check box is false, we're going to do two different things.
02:46In this case first, if the check box is false, that area vice president said, "Nope,
02:50you don't get that new hire."
02:51We're going to email the hiring manager back, stop the workflow, and we're going
02:55to log a message to stop the workflow.
02:57So this is that first branch where we're saying the answer is no, tell the
03:01hiring manager nope, you're not going to get that person and stop the workflow
03:05we're not passing along anywhere else. The other possibility is the possibility of yes.
03:10So the area vice president says yes. We're going to go ahead, and we're going
03:14to say we're going to email it on to the vice president of finance for their approval.
03:19In this particular workflow we're going to have a box just like this that
03:23actually occurs three different times. Once for the area vice president, once for
03:26the finance vice president, once for the vice president of HR.
03:29In each case, each has a possibility of saying yes, but each has the possibility
03:34of saying no, and if they say, yes, we pass it forward, if we say, no, then
03:39we're going to email folks back upstream to say, hey sorry, you can't have this
03:44hire, and then we're going to stop the workflow and log.
03:47So this is how we do if/then/else condition building here in Microsoft SharePoint Designer.
Collapse this transcript
Creating a workflow with conditions
00:00Here is our sample workflow with the actions built-in, but no conditions. So the
00:04actions--just to give you a broad brush here--are when the form's submitted, we're
00:09going to email the submitter. If you want to know how to do that this second, go
00:13check out the movie called Emailing a Form Submitter.
00:15Then what we're going to do is we're going to email the area vice president and
00:18wait for them to make a decision.
00:20We're going to email the Finance VP and wait, and the HR VP and wait, but we're
00:25waiting for something so that we can make a decision.
00:28So what we're going to do is we're going to add a condition here to the Area VP
00:31approval, and that condition is actually going to go take a look at the answer
00:36that that VP provided.
00:37So we're going to say, if current item equals value, and we're going to say, if
00:43the VP says, yes, well we just keep going.
00:47So, what we want to know is, what happens when they say no?
00:50Because normally if we didn't add a single condition to this workflow it would
00:53happily go on emailing, waiting, emailing, waiting, emailing, waiting.
00:57We need to actually jump in and say, well depending on what happens after the
01:02wait we're going to do something different.
01:05So, if the VP says, no, I can't approve this hire, we then want to take two
01:09actions, one action is we want to send an email to the current submitter and the
01:13other action is that we want to stop the workflow because we're done.
01:16So I'm going to go ahead in this condition and add an action, and we're going
01:21to send an email to the current submitter, and then we are going to stop the workflow.
01:27Notice that both of these are indented under the if. If by chance I put this in
01:33the wrong place, I'll get a different outcome. What this says right now is, if
01:36equals No, email the users stop the workflow. Then if it equals not No, Yes, go
01:42ahead and skip these two actions.
01:45If this action were outside of the if, outside of the conditional, notice when
01:49I point to the conditional there is a box around it this workflow would always stop.
01:52The VP of Finance would never get a single email, because the workflow would
01:56halt at this point, it's not part of the condition it's just an action.
02:00So you want to be careful, it's really easy to put actions or conditions in not
02:04quite the right place, so just point to the condition everything that's boxed
02:08will be done if that condition is true.
02:11In this case if the VP says, no, we're not going to hire that person.
02:16So we're going to stop the workflow and log a message.
02:18We'd have the same thing here for the Finance VP.
02:23After the date was changed, so the VP's gone in and they've said as of this date
02:28I've checked, or not checked, that box. Then we can add a condition and say, if the
02:34Finance VP says no, then we want to email some users, and we want to stop the
02:43workflow. And if the HR VP says no, which would only happen if everybody has said
02:49yes up until now, because any no is stopping the workflow at that particular level.
02:53Then what we're going to do is we're going to add a condition that says,
02:59if the VP of HR said yes, no field equals No, click here in the condition, then
03:08we're going to send an email, and we're going to stop the workflow.
03:14Now we're actually missing a step down here. What happens if everybody approves?
03:18So there would be another step that says email HR to create the position.
03:25I just choose to do Email:
03:28Create the position, and what we do here is we just go in we'd send an email, I
03:34don't need to put a stop on the workflow at the very end, because when I fall
03:37out of the very last step in the workflow it's stops automatically, and it's
03:41marks itself as complete, so I'm only adding these Stop the workflows for all of
03:45the places before this it was possible that someone said no.
03:48So that's how you create conditions just go into the step where you want to add
03:52the condition, make sure that you are in the right place.
03:55In this case, after we've sent the email, and we've waited then the
03:58condition kicks in.
03:59Some steps will begin with a condition, but in any event it's really great to
04:03just be able to put all this together and say, okay, this is what's going to
04:06happen and then talk your way through it.
04:08I'm emailing the vice president. I'm waiting for the date and the form to be filled in.
04:13If it's filled in then if they say, No, this is who I need to let know that they
04:18are not going to get the new hire, stop the workflow log message, but if it
04:22equals Yes, I'll fall through to the next step of the workflow.
04:25This is how conditions work, you can put as many of these together as you need to.
04:29So you can create conditions that cover more than simply yes, no, they cover
04:33possibility one, two, three, and four. Or a workflow that says, well, if this is
04:38true then check to see if that's true as well, that would be an, if inside of an if.
04:42You just throw another condition in right here in the same way, notice an if
04:46inside of an if one condition nested in another.
04:49If you can manage the if statements, for example in Excel, they work
04:52exactly the same way here.
04:54If you've used this kind of logic when you're working with Access, or anything
04:57else, I find that if you're new to this reading these through very intentionally
05:02and perhaps with your office door shut to read them aloud is a really great way
05:06to actually think about what you're doing and what it means.
05:08I am going to go ahead and delete that extra condition, this is looking real good.
05:12So we're going to go ahead and save this workflow, we're done with it for right now.
Collapse this transcript
Using parallel blocks
00:00The new position request library is a place that users drop information
00:05about new positions that they'd like to have created and then there is an approval process.
00:10We've already created the request new position workflow as a straight
00:14through approval process.
00:16First we notify a submitter that we got their email request, then we have
00:21the Area VP approve it, the Finance VP, the HR VP, and finally we create the position.
00:27But what if those steps don't necessarily have to happen in a sequence?
00:31Specifically, what if after the area vice president has approved, we don't care
00:37whether the finance vice president or HR vice opresident approves first, we just
00:42need them both to approve, let's take a look at what that workflow would look
00:46like and how it's a little bit different.
00:48If you want to contrast this with the sequential workflow then return to the
00:53previous movie and take a look at building a workflow with conditions, but
00:57I'm going to create a new list workflow, I'm going to call this Position
01:02approval, and we'll write this up, remember, I've put in some notes about who
01:07created this, and when, but this is an approval process with parallel steps, and let's say OK.
01:15Now the first couple of activities would still be the same, we would have a step
01:18that said Notify submitter, and we're going to send an email to them, and then
01:24we'll have a second step, that is Get Area Vice President approval, and we would
01:31email them and ask them for their approval and wait until we had it.
01:35The next two actions that can happen in parallel, I'm going to insert a step,
01:39we're going to call that step Get Other VP approvals, and then we're going to
01:45insert a Parallel Block.
01:47Now the following actions will run in parallel, and I'm going to insert first
01:51one step, and then I'm going to insert the next, and I want to be really careful
01:55where I'm inserting. There are three different places here.
01:58One is the actions it would have to do with this Step 8, which let's say this is
02:02Finance VP approval.
02:04So if I have actions related to that like send this person an email, I'm going
02:08to put him right here.
02:11But I want to make sure that my other parallel actions aren't out here, notice
02:16that this is out of the Parallel Block, but right there, so I'm going to click
02:20and insert a step, and there in the parallel actions with the gray line to the
02:25left are my two items that will happen at the same time HR VP approval.
02:32Then I could add other items after this step this still had to do with VP
02:36approvals, but were in parallel, or I can simply insert another step for our
02:41final activity, and that final activity is going to be to create the position.
02:46So, how this works is Notify submitter has to proceed to get Area VP approval
02:51and get Area VP approval has to proceed the other approvals.
02:55As soon as the area VP has approved, we drop into these parallel actions, and we
03:00will be emailing the finance vice president, and we will be sending an email to
03:04the HR vice president, and when both of these activities have concluded then the
03:10position will be created, because we'll go on to the next step.
03:13So this is how the Parallel Block works this Parallel Block is new in SharePoint
03:18Designer 2010, and it should make your workflows go more quickly in places where
03:24parallelism works, we're not going to be waiting, for example, for the Finance
03:28VP to come back from vacation and then get all of her work caught up before the
03:33HR VP can go ahead and do this approval.
03:35So watch for places that you can use Parallel Blocks in your workflows to make
03:39them run more quickly.
Collapse this transcript
6. Creating a Simple Form for Your Workflow
Using a built-in SharePoint list form
00:00There are two major ways your users are going to enter information into a SharePoint list.
00:05The first way, is they'll simply open the list and start to type.
00:09They'll see it in Datasheet View and enter information so that's one decent way to do this.
00:15However, not all lists allow Datasheet View and normally we'd like people to
00:20have a better user experience, we'd like them to use a form, and you might
00:23wonder, well where would I get this form from?
00:26The good news is that every time you're creating a list or a library,
00:30Microsoft SharePoint is creating a form for you, it actually creates three
00:34versions of a form.
00:36If we take a look at our Employee Onboarding list that we've been using,
00:40there were four fields that were added, and there was one existing field
00:44whose name was changed.
00:45The default title field was changed to Employee Name and then four different
00:49date fields were added, and here's the form that was created for entering new
00:53items here in SharePoint, let's take a look at something that's a little bit
00:57more complex, let's take a look at our Issues list, let's take a look and see
01:02what happens when we add a new item.
01:04We get a very complex form full of bells and whistles, date pickers, add
01:09buttons and so on, because this exists as a built-in form for a built-in SharePoint list.
01:15Another great reason to say I'd like to use an existing list as the core of a
01:20custom list I want to create, but here's the form as it appears when it's new.
01:24A version of that form is the version that we see when we choose to edit the
01:28item, it's not exactly the same form, but it's very, very close.
01:33So here it is it has the space to provide information about versioning, and when
01:37things were changed and created that's the biggest difference between this form
01:41and the existing form.
01:42And there is yet a third form in addition to the new and edit forms called the
01:46Display Form, and it is the form that we're going to see when we simply click
01:50on the item's hyperlink, and we display the form without the ability to do any editing.
01:54So again, all three of these have been created simply by us creating a new list.
02:00Three new forms, whenever we add fields to a list its forms are automatically
02:05changed and modified by SharePoint.
02:08Now you can make these forms more beautiful if you wish that's not the content
02:12of this course, but if you're interested I want to recommend Simon Allardice's
02:16SharePoint Designer 2010: Creating Data-Driven Web Pages course.
02:21Chapter 6 is all about customizing these forms that have been created for you in SharePoint.
02:27So if this is all you need for the particular workflow that you're creating feel
02:31free to rely on these forms that are already created for you, you have no
02:35investment in them, they are very quick to use, easy to create, conform to the
02:40Windows standards, and most users will have a fine time using them.
Collapse this transcript
Using InfoPath to create a form for a library
00:00If you'd like a form with more bells and whistles than the SharePoint forms
00:03provide, I'd encourage you to take a look at Microsoft InfoPath.
00:07InfoPath 2010 lets you create two different types of forms, one type of form
00:13is a full-featured form that runs in Microsoft InfoPath filler, so it can be used offline.
00:19For example, a form that salespeople might fill out when they can't get to a web connection.
00:23The other type of form that you can create using InfoPath is a Browser-ready
00:27form, so it's a real competitor for the SharePoint forms, but you can create
00:31forms that are more beautiful and forms that use some controls that SharePoint
00:35doesn't have access to.
00:36This is an example of an InfoPath form for the workflow that we're creating to
00:41request a new position, so this is a workflow with lots of conditions.
00:45I'll just walk-through it briefly here, we have the ability for a person to
00:49enter the title of the position that they'd like to have hired, a proposed
00:53start date, their own name, and email, we can have those filled in automatically later.
00:58The name and email for their vice president and then there are some dropdown lists.
01:02If you'd like to see what this looks like to the user, let's go ahead and click
01:05the Preview button, and you'll see that the dropdowns have Department names, we
01:10have some Salary ranges here, and we have nice date picker fields.
01:17So we create this form in InfoPath, and as we're creating the form it's creating
01:21a data source here in XML.
01:23We can now use this form to actually create the list that we'd like to see in
01:28SharePoint, and this is the best practice, we don't want to start in SharePoint
01:32with an existing list.
01:33If we wanted to do it that way we should use the SharePoint forms that are
01:36created and modify them using SharePoint Designer.
01:39When we start with InfoPath we're actually saying that we're really invested
01:43in the kind of presentation that a user gets when they're going to be filling out of form.
01:48So, here's what the form looks like, we're going to go ahead and save this form
01:52so that it's ready for us to publish, to create our list in SharePoint, so we
01:57can then add workflows.
Collapse this transcript
Creating a form library from InfoPath
00:00We've created an InfoPath form that we'll be using to collect information on
00:04new position request.
00:06Now we need to create the list that this form will live in, the list that these
00:10forms will be posted to as people fill them out.
00:13And we're going to do that by publishing this form from InfoPath.
00:16Before we begin this process I want us to look at the form one more time,
00:20because one of the things we will be asked to do is determine which fields out
00:24of this form need to be sent over to SharePoint.
00:27We're collecting a whole lot of data, but we don't need to display it all over there.
00:31So what are the columns that we will need?
00:34And there's two possibilities, one is a column that we will want to display to
00:38users in a list, and the second is a column that our workflow requires.
00:41So because we have a workflow we need to care about that second category of item.
00:46For example, the conditional workflow that we laid out looks at VpDate to see if
00:51it's changed, it's actually waiting for a change, and when that changes it
00:55checks to see if the Approved check box is checked.
00:58So we'll need to send both of these fields to SharePoint, VpDate for the
01:03workflow and approved to know which condition has been met.
01:07The same thing is true for the VP of finances, date, and approval, and for the
01:12human resources VP's date and approval.
01:15What else might we want?
01:16Well, we will need the vice president email to know who to send
01:20the authorization to.
01:21And we will need the Requester email to be able to respond to the person
01:25who made this request.
01:26We will probably want the position title, and one other piece like the StartDate
01:30because you can imagine that in some departments they might have several people
01:34that they are hiring, we are hiring a manufacture specialist, but we have one
01:38starting in March, we have another one starting in July, so those seem like good
01:41pieces of information to have.
01:43So finally we're ready to publish, having taken a look at all of these different
01:46fields that we need. Let's go to File and choose Publish your form.
01:51The first choice is to Quick Publish, but Quick Publish isn't available
01:54because we've never published this form. Let's choose instead to Publish this
01:58to a SharePoint server.
02:00The Publishing Wizard opens and asks us where is our SharePoint server?
02:04Well, if you haven't memorized the location of your server yet you can go grab
02:08it by simply going to your site and choosing everything, including the domain
02:14.COM, .EDU, and so on. You don't need anything that follows site page's
02:19particular page names, and let's go ahead and copy that, Ctrl+C.
02:23Now let's go back to InfoPath and paste it in and choose Next.
02:28You might be asked to login to the site even if you're already logged in
02:32that's because I'm not logged in in InfoPath, I am logged in in SharePoint, that's fine.
02:36And it might ask me do this a couple of times, and that's not a problem
02:40either I am used to that.
02:41So as this form template is Browser compatible, but it cannot be Browser-enabled
02:47on the selected site.
02:48So this particular site that we have is only going to allow folks to fill this
02:53out in InfoPath form filler, I am going to go ahead and put this in a Form
02:57Library, that looks fine for me, let's click Next.
03:00What do I want to do? I want to create a new form library that does not already exist.
03:04Let's click Next, and I need to give it a name and a description, so this is
03:10going to be position requests, or new position request, or something similar now.
03:14When it creates this because it's not asking me for URL, SharePoint will make up
03:20a URL out of the text that I give it, every single place I type a space, it will
03:25actually put a percent 20 sign.
03:27So if I don't want to have that happen I can type this in camel case, uppercase
03:33each word but don't put any spaces in.
03:35And then after the library has been created by the Publishing Wizard in
03:39InfoPath, return to SharePoint and change the name of the library to put spaces
03:44in it, so I'll have a great URL and a good name.
03:47I can provide a description, if I know I'm going to go back and change the
03:51library's name I can provide the description at that time.
03:54I'll just click Next here.
03:56And finally, this is where we need to do an inventory of all the columns from
04:00our form that we want to have end up in SharePoint.
04:02So I am going to go ahead and click Add, and we are going to add the
04:06PositionTitle, there it is on the list.
04:09We are going to add the Department-- and yes you have to do these one at a
04:15time--and the StartDate and the name of the requester and their email. And by
04:25the way, each one of these is going to show up as a column in our SharePoint
04:28library, or list, and so we then might want to go back and tweak that view to get
04:33rid of some of the extra columns.
04:35There's my vice president, my vice president's email.
04:40Now notice that I've had the ability to change any of these column names that
04:44I want, so if intend to show a column I could change this, get a better look for it.
04:49You can always go back and modify it too, if you want to change this, for
04:53example, just click Modify and change it here.
04:55I want to go ahead now and add in the Authorizations group whether the vice
05:00president said yes or no, I want to add the date, whether the vice president of
05:07Finance said yes or no.
05:11We have this growing list down here, and the date, and the same thing for HR.
05:21The fields that are left here are comment fields, and I don't need them, I
05:25am fine with having them in the form, there is no reason they need to show up in SharePoint.
05:30So I am going to say OK, click Next, I verify the information that this is the
05:34library I want to create, this is the location I want to create it in and click Publish.
05:40It says my form template was published successfully, I can send this to email
05:44recipients if I want but I'm far more interested in looking at the library that
05:48was created so I am going to say Open this form library and click Close.
05:52And here's my new form library.
05:54As I noted all the names of all of those different columns are displayed in this
06:00view, I can scroll this, we have a really wide view, and this wouldn't be the
06:03view I'd normally want to show to users, some of these fields are only here
06:07because we need them for our workflow, it doesn't make a lot of sense to leave
06:11them here in the view.
06:12So SharePoint also created a form, but we won't see that form because there is
06:16an InfoPath form that we created.
06:17So when I click Add document there is a message from the web page that's because
06:22this file isn't necessarily trusted in this environment, I am going to say OK.
06:27And here's my InfoPath form that I can fill out.
06:30So if I add information here, it's going to end up back in my site.
06:35So InfoPath is a great tool to use to create our form and to create our site.
06:41There's one more thing that we would need to do to actually make this whole
06:44solution work so that we could put a workflow on it.
06:47And that is that we've created a library, we've created a form to go with it,
06:52but the last thing that we will need to do is we will actually need to configure
06:55this form so that when a user uses it, it posts back to that same library.
07:00Right now, when a user uses the form, when they're done with it, it doesn't know
07:04where it's supposed to go.
07:06So we're going to say we want to submit this form to the SharePoint library back
07:10here in InfoPath, it will ask us about the name of the library, and we can go
07:14ahead and paste in that information that we have, that we have a document
07:19library NewPositionRequests.
07:23I can leave this section here on the end, but I don't necessarily need it.
07:27And then it asks me for a form name, there is that familiar fx button that lets
07:31us know that we will be able to use some different field names in this.
07:35So I don't want to name it form every single time something submitted we don't
07:39want it to have the same name, as a matter of fact it won't allow us to, you
07:44can only have one file with the same name so our choices are either to
07:46continuously overwrite the one that's there, or to have people that are frustrated
07:50because they can't save things.
07:52So let's go ahead and create a new form name that will be used on every submission.
07:56So I'm going to insert a function and the function that I'm going to use is
08:00called concat for concatenate, which allows us to put things together.
08:04And I'm going to say let's put the PositionTitle.
08:08And then let's go ahead and put the StartDate and the Department.
08:14So three things and they are concatenated which will leave no space.
08:17So I might want to put some spaces in, surrounded by commas, and parentheses.
08:25So there is a blank space PositionTitle a blank, StartDate a blank, and Dept, and a blank.
08:30I am going to click Verify Formula to make sure that works and click OK.
08:34And again, if you're not used to creating InfoPath forms, and you want to do
08:38that I want to refer you to the appropriate InfoPath course where all of this
08:42is covered in detail.
08:43I am going to say OK, I am going to click Next, and this is a Submit to the
08:47SharePoint Library, I am going to say whenever somebody submits this is where it
08:51should go, it's the default, and I'll click Finish.
08:54And now I once again need to publish the form.
08:57The first time I publish the form it created a library.
09:00Now it won't create a library, it will simply post back to that same library
09:04I created, I can go ahead and Quick Publish, and my template has been published successfully.
09:10So now when I go to this library and add a new document--this is an interesting
09:15learning moment--the form that I have on my computer is not quite the same as
09:19the one I just published maybe because I didn't save, so I am going to go ahead
09:24and save and update my form.
09:25Your users will see that too so, there's always a local cache that has the form
09:29in it, but if there is a newer one on the site they are prompted to use it.
09:34So now when I fill out this form I'm filling out a form that I can then submit,
09:38and when I submit it will be sent back to my SharePoint form library so that I
09:42can kick-off a workflow with it, and that's what we'll be doing next.
Collapse this transcript
7. Using Email Notifications
Emailing the form's submitter
00:00Let's spend just a little bit more time talking about how we can best email
00:04notify folks in our workflow.
00:06I've created a small workflow based on the list with three different steps in it.
00:10We're going to talk about Emailing Submitters and Emailing Users and
00:13ultimately Emailing Aliases to users, but let's just start by saying that we
00:17want to email the submitter.
00:19Somebody has launched the workflow, dropped a form in a library, and we would
00:24like to let them know that that form got there. There are a couple of reasons for this.
00:28We could let them know on the screen if it was a web form, but often what folks
00:33want is proof that they participated in the workflows that later on they can say
00:37hey, I turned this interview on this date and here's my proof.
00:40So it's a good idea to send an email message back.
00:43We're going to add an Action that says Send an Email.
00:46Email these users, click the hyperlink and where it says To, we're going to
00:51click out here on the Address book to open the Select Users dialog.
00:56So user who created the item is really easy to find.
01:00Let's go ahead and grab them right here, and say OK.
01:04The next thing I want to talk to you about is the Subject.
01:07I want the subject to be understandable.
01:09I want it to have a portion that is unique, and that is long enough to be able
01:14to easily find, and the reason is I'm going to show my users how to create
01:19rules to route messages.
01:20So if every subject is different, if I simply grab the name of the form, that's
01:25not going to work, I need something solid I can build a rule on.
01:29So I'm going to click this three-dot
01:30button, that's the Builder button here, and it's going to open up the String
01:34Builder, and this particular email is coming out of a hiring process.
01:38So I can use some unique information here.
01:42New Hire Request for, for example, and then I can add a lookup here.
01:49In the Current Item we can go grab anything that's unique like the Title.
01:55Now what this will allow me to do, in Outlook, in a bit is create a rule that
01:59looks for the words New Higher Request, but it also doesn't have every single
02:03one of these looking the same, somebody can actually get some value out of
02:07seeing what the title is.
02:08And you know I don't really need the word for, if you think about it, I could
02:12just say, New Higher Request: here's the name of it, and I'm going to say OK.
02:17So I want to create really good strong subjects with some unique piece that
02:22refers back to the workflow each and every time.
02:25It is not unusual when you first create workflows that you're going to
02:28copy somebody, and that somebody might be you, to make sure that the
02:31workflow is actually working.
02:33So when I'm first going to do this, I'm probably going to put myself in, but
02:39later on I can remove myself simply by editing this form.
02:43And then remember that you have access to every single thing you want here to be
02:47able to show somebody what they need to do next.
02:49If you have something specific that says I need you to actually go open
02:53this form and look at this particular field, this is the place for those instructions.
02:57And remember that the way we're going to take somebody back to that library so,
03:01so easily is we're actually going to include if it's a list, an absolute URL
03:06that will take them right on back to that list every single time.
03:10So here's how we're going to send a message to the Submitter, great
03:13subject, Current Item: Created By, say OK, and there is our very first email.
Collapse this transcript
Emailing a person in a group
00:00When you're ready to email someone in your workflow, other than the submitter,
00:04it's very easy to do. So let's review the steps.
00:07I'll choose Action > Send an Email, and click on these users hyperlink to open
00:13the Define Email Message dialog box, and then on either To, or CC, I'll go ahead
00:20and click to open the Select Users dialog box.
00:23Now I can Type a Name or Email Address in right here.
00:26So if I know, for example, that I'm creating an application for helpdesk tickets
00:30I might say, helpdesk@ twotreesoliveoil.com, and just add it. That works.
00:41This is how you want to address email to folks who are not on your SharePoint
00:46site and who aren't in your domain, so you might need to send something outside
00:50of your organization.
00:52And I can also say, choose People or Groups from my SharePoint site.
00:55I click Add, and it lets me go Search, and I can enter, for example, someone's
00:59name, like Janet, or Olivia, there's Olivia.
01:05So I can just double-click on Olivia and add her, there she is.
01:09That's her exchange address that I'm seeing there.
01:11It's not pretty, but it works, or I can add groups in exactly the same way
01:16from my SharePoint site.
01:17The third possibility is that I'm actually going to go look up somebody's
01:22information out of the workflow.
01:24This would mean, for example, that I had asked someone to type an email address
01:28in, or I had gone and gotten it from somewhere else.
01:31So I can either grab those kinds of addresses that I've had someone fill in,
01:35type into a form, or I can go get some of the things that SharePoint itself
01:40knows like, there is my original submitter but I can also get the last person
01:45who modified the document.
01:47So if I grab the Modified By person it will actually go resolve their email
01:51address and send to them.
01:52So several ways that I can add specific folks, or distribution lists here, to be
01:58able to email to anybody I want to out of my workflow.
Collapse this transcript
Using a contacts list for email workflow lookups
00:00It's great when you know ahead of time who gets emailed in a workflow, but more
00:04often than not, that's not the case.
00:06We have an employee onboarding workflow that we worked with earlier, where we're
00:09emailing human resources, we're emailing payroll, and that's Greg.
00:14We want to email facilities, and we know to email Janet, and we want information
00:19tech to receive an email, and that would be me. So those are real easy, we can build them in.
00:23The problem is we want to insert another email right here, because we've
00:28forgotten to tell the department that this employee is actually going to work for.
00:32So the boss is sitting around, and there are all kinds of folks coming in and
00:36looking for office space and asking questions and they haven't been notified.
00:39And you know what, we don't know who we need to email necessarily.
00:42It will be different for every single department.
00:45We have a list of about a dozen departments ranging from, accounting and
00:48administration, to sales and shipping.
00:50We could set up a set of conditions like we've done in other cases.
00:54We could say well, if it's accounting send it to this person, if it's
00:57administration send it to this person.
00:59However, when we do that we make it more difficult to work with our workflow
01:04because every single time one of those folks changes, we have to come back and
01:08modify the workflow.
01:09And we have an unnecessarily complex workflow with all of these if statements in it.
01:14The best answer is to do a lookup to actually say, if I know what department
01:18somebody is in, I should be able to create a table and go look up what email
01:22address I need to send this information to. Let's see how to do that.
01:27Here we are in our Employee Onboarding list, and we have the new EmplDept Choice
01:33field, the new field that's been added to this list to be able to track what
01:37department that employee is in.
01:39Clearly that would be filled out by somebody in HR, because they know where
01:43they're placing this person.
01:45So what we need now is a corresponding list, a contacts list created as a custom
01:50list that we can just list all of the different departments so that we can see
01:54who's in the Employee department.
01:55So I am going to just click that, and if you take a look here are each of our
01:59choices on a separate line, Accounting, Administration, Facilities,
02:03Greenhouse, Info Tech, Manufacturing, Operations, Retail, Sales, and Shipping,
02:07we have a lot of them.
02:09I could actually copy these and drop them into Notepad or some other application
02:13that would be a really good idea so that I don't have to remember what they are
02:16or keep going back here to look them over and over again. There they are.
02:21We'll just put this over to the side for now we don't need it.
02:24Now we're going to go to create some new site content.
02:28One easy way to do that we can do it with Site Actions > Site Settings, we
02:33could say View All Site Content and do it from there, and I'm going to Create a new Custom List.
02:38We are going to call this list wf for workflow, DeptContacts and these are
02:47Name and email address for each department for notification during Employee Onboarding.
02:58Now once you've created one list like this, you'll find that as you add more and
03:02more workflows it's often the same person this kind of email is going to go to.
03:06It might be the administrative assistant in the department or whoever is in
03:09charge of getting incoming information at a department level, and you may then
03:13want to create this list farther up in your site collection so that you can use
03:18it over and over again.
03:20For more information on that check out the SharePoint Essentials 2010 course.
03:25I don't want this list to appear on the Quick Launch bar, because nobody needs
03:29to use it except those of us who are creating workflows and doing
03:32administration for the site.
03:33So I am going to say No, and we are going to go ahead and Create it.
03:38Now I need to change the List Settings a little bit.
03:40Every single new list you create starts with 3 columns Title, Created By, and
03:44Modified By, and there's no point really in getting rid of them but we might
03:48want to change title. So the question is what fields do we want?
03:51I would suggest that we probably want four, the name of the department, the
03:54first and last name of the person that we are sending the email to, if they have
03:59one, and finally the email address we are sending it to.
04:02So I'm going to go ahead and change the Title column to Department, and I want
04:07to Require that this contains information.
04:10I'm going to now quickly Create a new column for First Name a Single line of
04:15text, and I'm not going to require that this contains information because it
04:19is altogether possible that they have like a departmental mailbox that I am
04:24going to mail this to.
04:25So let's go ahead and add Last Name, and the same sort of logic, just Single line
04:30of text in my default view, and finally, I am going to Create my fourth column,
04:35and it's going to be Email Address.
04:38And that all looks really good, and I am going to say OK, and now I have my table.
04:45So if I go back out to my workflow Department Contacts, and I add a new item,
04:50I'll be prompted to add, for example, in the Accounting Department that Joe
04:54Jeffers is getting the email, and it's jjeffers@twotreesoliveoil.com, and there
05:04is my very first item in my list.
05:06And I'm just going to go ahead and add Info Tech, because that's me, and we are
05:20going to add one more person.
05:34So you just continue to fill these in and the beauty of this is that if the
05:39accounting department decides that somebody else should receive this email, you
05:42only have to change it here, you never are going to need to go back and modify
05:46that workflow because it's going to come out and grab these folks.
05:49So let's see how that last piece works now.
05:52Let's go ahead and go back to our workflow and see how we have a workflow, look
05:56in a list to return a value.
05:58So here we are in our Employee Onboarding Workflow, and we want to add this step
06:03right up here at the top, so I'm going to click Step, and we are going to name
06:08this Notify Department.
06:13And the Action is going to be to Send an Email, and we are going to Email these users.
06:18This one's a little bit more complex, we have lots of people we could choose
06:21from, but we're going to do a Workflow Lookup to find a particular user.
06:26And where I'm going to look is I'm going to look in the Data source that's called wfDeptContacts.
06:33So if it's not on the list, if you don't see wfDeptContacts here, go ahead and
06:38close out of these dialog boxes and click the Refresh button up here and have it
06:43go back to the server and get a list of all of the different lists and libraries
06:47that you have, because if you just created it a few minutes ago, it may not yet
06:52have shown up here in SharePoint Designer.
06:54But I am going to choose wfDeptContacts, and the field that I want out of that
06:58list is the Email, and it's coming back as a string.
07:02Now what I need to do is identify how it's going to be found.
07:06So this is the data to retrieve, and if you read this dialog it's really pretty straightforward.
07:11Choose the Data source, so go do a lookup on wfDeptContacts and bring back an Email Address.
07:18How do we know which one the right one is?
07:20Well, what we are going to do is we are actually going to look here in the
07:25Department field in wfDeptContacts, and we're going to pull back the match for
07:32the employee department in the Current Item.
07:35So here in our list we filled in an employee department, it should match
07:40the department field in wfDeptContacts, and when it does, it will pull back the Email Address.
07:46Now, there is no necessary unique ID in our list of the employee departmental contacts.
07:53And so SharePoint is going to tell me hey, without having an unique ID it's
07:57possible that somebody would add 3 or 4 different contacts for the accounting
08:00department, 5 or 6 for the shipping department, and if that happens, I'll
08:04only use the first one.
08:06We can say yeah, we want to continue, that's okay, that's just fine.
08:10So all of that work was to create this wfDeptContacts Email Address and pull it
08:15back based on the value. Let's go ahead and say OK.
08:19We need to enter a Subject now or we can't save this email message so this
08:23subject might be, You have a new employee!!
08:27And then some more information, we'll talk more about how we might want
08:30to address that later. But now we can Notify the Department.
08:34So the way this works is as soon as there's a new item that's dropped into that
08:40list we'll begin emailing, and the very first person emailed will be whoever the
08:44contact is for the department.
08:46Let's go ahead and test this and see how it works.
08:49We are going to Save and Publish.
08:53I didn't Check for Errors, but if there were any we would have heard about it by
08:58now because it wouldn't actually Save and Publish.
09:00And now if we go back to our list, and we Add a new item, and we are going
09:05to add Greg Bennett.
09:09And we are going to say that Greg actually works in the Info Tech department.
09:13That makes it easy because those emails are coming to me out of the list.
09:17And I would probably rearrange the default view to put Employee Department next
09:21so it was way up here at the top.
09:23That would be a nice thing because then the form would reflect that.
09:27Let's go ahead and click Save.
09:28And you will notice that we have this Employee Onboarding In Progress.
09:31Greg's working for the Info Tech department and here is the email that was sent
09:35only to me as the contact listed in the wfDeptContacts list.
09:41So if later on I get promoted and someone else's this person, all we have to do
09:45is change it in one place in that list.
09:47And this is how you use a contacts list to generate emails in
09:51SharePoint Designer Workflows.
Collapse this transcript
Using Outlook rules to manage workflow messages
00:00We are over here in Outlook for a moment, and don't let this startle you, but I
00:04want to show you something that you can do in Outlook and more importantly,
00:07something that you might already know to do but you'll want to show some of your
00:11users, particularly when you're in the initial stages of a workflow, and you're
00:14doing a lot of testing.
00:16You don't want to have your Inbox fill up with a whole bunch of extra e-mails
00:21they you've sent just to make sure the workflow is working, and you're actually
00:25seeing what your users future looks like too is that they are going to get lots
00:29emails every time there's a new employee in a position that particular workflow
00:33going to email people.
00:35Whenever we have each workflow kicking off and sending emails, folks are going
00:38to get them and what will happen is that over time they actually won't pay a ton
00:43of attention to them, and then they will start complaining about them.
00:46So it's really good early on if you can show folks how to manage their email and
00:50these will work for you as well.
00:52So we have a workflow that every time it kicks off it actually sends a workflow
00:56initiated message to me as the Developer, or as a person who is monitoring
01:00workflows, the Workflow Administrator in the organization.
01:03I'm just going to right-click on this, and I'm going to create a new rule, and
01:07the rule that I'm going to create is going to say that if I get a message that
01:12starts with workflow initiated, From Two Trees, which is actually the name of
01:17the SharePoint here.
01:19If it's From Two Trees and the Subject contains Workflow initiated then I'm
01:23going to move it to a folder. And I'm going to create a New Folder.
01:27I'm going to name a folder SharePoint workflows, and I'm going to say every time
01:33I'm going to throw it in there.
01:35Now, if I have a number of workflows that I'm managing I might want to even be
01:39more granular and create a new folder inside of that one that says something
01:44even more specific, for example, Employee Onboarding or whatever it is.
01:48And the reason that I want these to come to me is the fact that they stop coming
01:53would tell me that something was wrong.
01:55But also, originally, it lets me take a look at what the user experience is
01:59it gives me a way to debug without having to go and crawl into my workflows
02:04in order to do that. So I'm going to say go ahead and send it here.
02:08Every time there's a new item go ahead and slide it in there, and I'm going to
02:12say OK, and it's going to ask me what would you like me to do with the messages
02:14you have already in the Inbox.
02:15So I'm going to say, go ahead and move them over there, and indeed it has done that.
02:21I can create a new rule again for any of these particular workflows.
02:26While I'm working on a workflow, perhaps for the first month or sometimes less
02:32after I launch it, I'm going to take that Employee Onboarding workflow folder,
02:36and I'm actually going to show it up here in my Favorites.
02:39So as I have things coming in no matter where I am, no matter how this is
02:43collapsed, I'm actually going to see that I have new information coming in, and
02:47if it seems unusual I can pop that folder open and take a look at it.
02:51This allows me to have my non-workflow information, or my critical emails, in my
02:56Inbox and will route the other ones somewhere else.
02:58Remember that this is something that you can easily show also to other folks in
03:02the organization just point them to this movie and say go take a look at that,
03:05because that would be a good way for you to use rules to manage the information
03:10that's coming to you from SharePoint as a result of participating in workflows,
03:14particularly a Workflow Administrator or a Workflow Owner.
03:18So use the rules in Outlook to match up with the subjects that you've created in
03:22your workflows, and you get a really good fit that makes folks feel like they're
03:26not inundated by messaging coming out of your workflow system.
Collapse this transcript
8. Using Core Actions in Workflows
Pausing a workflow
00:00Two of the core workflow actions involve waiting, pausing for something to happen.
00:05One is to pause for a specific period of time, and the other is to Pause until a
00:10specific time, or time and date.
00:12I'll be honest, that I don't use the Pause until very often, I use Pause for
00:18a few all the time.
00:19So if we're going to choose to Pause for a few, here, I can right-click and
00:25choose Pause for Duration, and the default duration is 5 minutes, and let me
00:30tell you why I use this.
00:31There are lots of actions that if you take a step and then try to take the next
00:37step, SharePoint needs to catch up with you, it needs to update list, it needs
00:40to send an email, and if you jump right from one thing to the next, SharePoint
00:45actually isn't ready for you.
00:46A prime example of that is when you want to copy an item to another list and
00:52then delete the current item.
00:54If you don't leave room for a pause that item will never actually be deleted
00:58because the Copy operation is still going on, and the next microsecond
01:02SharePoint gets ready to do the Delete, and it can't, because the item is in
01:06use, it's being copied.
01:07So Pause for Duration is something that I use a fair amount, anytime that I want
01:13to make sure that I'm not getting ahead of myself with the workflow.
01:15Pause until a specific time on the other hand, I use sometimes, but not quite so much.
01:22It's a core action, it says, Pause until Date, but you'll notice that it
01:26actually says this time, you're choosing a time and a date combination here.
01:30So the types of things you might use this for are you might have a workflow
01:34cranking along, and you send something to someone, and then you're going to
01:38send them a reminder.
01:40There should be no action in between your initial send and the reminder.
01:43If there is you wouldn't want to pause, and I believe that's why I don't use
01:47this quite as much as I might.
01:49Because if I'm pausing, by definition this workflow isn't really doing anything
01:54during that time, it's waiting until the specific time or date comes up, that I
01:59would say, okay that's what I want to do.
02:01So I'm going to say Pause until a specific time, and we're going to Pause until
02:06the 11th at 4 O'clock PM, and then the next step in the workflow would continue.
02:16So two easy pauses to set, Pause for a Duration, Pause until a specific time or date.
02:21Use them as you need to in order to set reminders, slow your workflow down, or
02:27just make sure that you keep things synchronized with SharePoint.
Collapse this transcript
Understanding workflow variables
00:00When you look at the list of Core Actions available for SharePoint workflows,
00:04you'll find one action called Set Workflow Variable.
00:07Set Workflow Variable is used to create a memory space that you can use to hang
00:12onto an item that you want to use later in the workflow.
00:15For example, you might get some information from a user that you want to
00:19use three steps along. So we'll store that in a Workflow Variable.
00:24You might calculate something and after it's calculated, but before it's used
00:28somewhere it's going to be stored in a Workflow Variable.
00:32There are a couple of different ways to create Workflow Variables, one is using
00:36Set Workflow Variable, and when you do that you'll actually go up in this
00:39workflow and click on Local Variables and Add a named container for it.
00:44So if you were going to calculate a total cost, go ahead and just call it
00:48TotalCost, and we'd want to store that sort of thing is an Integer or a
00:52Number not as a String, and you'd say OK, and we have a new Workflow Local
00:56Variable that we could use.
00:59You can come back and modify the variable if you need to, if you forgot to type
01:02it correctly, for example, and you used String when you meant to have Number or
01:06you used Number when you intended to have Boolean.
01:09So these are modifiable and they're also removable when you don't need them in a
01:12workflow any longer.
01:15However, Set Workflow Variable is only one of a number of actions that
01:20use Workflow Variables.
01:22And when you use the other actions, you have a choice either to assign something
01:27to a variable that you created as a Local Variable or to simply allow SharePoint
01:32to make up its own names for the variables as it goes long.
01:35Let's take a look at the list of actions that use Workflow Variables.
01:39The first of course is Set Workflow Variable where you very intentionally have
01:43said, I have a purpose, I want to do a calculation and store it somewhere, I
01:48want to grab some information from a user and store it somewhere.
01:51But if you create a new list item, SharePoint will actually create fields to
01:56store the items in until it can create the new item.
02:00If you do a calculation the results have to be stored somewhere, if only for a microsecond.
02:05And the same thing with Time/Date calculations, which add time to date and set
02:10time portion are both types of.
02:12When you collect data from a user, it needs to go somewhere.
02:16And then finally, all of the utility actions create workflow variables.
02:21From extracting a substring to finding an interval between two dates,
02:26notice that they all are functions and every one of them needs a place to store its results.
02:31So Workflow Variables allow you to store the contents of information temporarily
02:36without needing to provide a SharePoint column or a form field to store it in.
Collapse this transcript
Creating workflow variables
00:00Sometimes when you create a workflow, you actually start at the end, and it's
00:04not a bad way to start.
00:06For example, the business has told us that they want to automate the process of
00:10ordering business cards, this is a perfect easy workflow, low hanging fruit.
00:14And this is what they'd like the email to look like when it's all done, Your
00:18order for the ordered quantity of business cards has been received, this is who
00:22will notify, this is when you'll receive them, and this is what you'll be
00:25charged, Thank you, the folks in Facilities.
00:28So we're going to create a workflow for business card order.
00:31I've already created the list to support the workflow, let's take a look at it real quickly.
00:36Doesn't look like much this way, I always like opening up that initiation form
00:40so I can go take a look.
00:41So, who we're going to Notify, there is the Quantity, names for the cards, I
00:45could actually make all of these fields required--and probably would want to--
00:49and the date that it was created on. And it wouldn't hurt for me to go in and
00:54to set the default on this to be equal to today, but that's what the order form looks like.
00:58So we're going to need to create those variables that we saw in the email, we
01:02want to know, for example, how much we're going to charge back to the
01:06department, and we need to be able to calculate that date that's seven days from
01:10the day the order was placed.
01:11Let's slide over to SharePoint Designer and create those two variables that
01:16we'll be using in our workflow. So here we are in SharePoint Designer.
01:20Workflow Variables are assigned to a workflow, so I actually have to start with
01:24a workflow to begin with.
01:25Here are my business card orders, and we're going to do a new List Workflow, and
01:30the name of this is going to be Order Business Cards.
01:36Business Card order and confirmation email.
01:40Now we're going to start with just a small piece of this workflow.
01:45And this is the piece that would actually go from the point when somebody
01:49ordered it, to us sending that email. So that only requires two local variables.
01:55The first is going to be a place to store the chargeback amount.
01:59And we're going to store that as a Number.
02:02Notice that we have Number and Integer just those two, we don't have things like
02:08currency, we'll get those types of choices later.
02:10But right now you just need to decide, is it an Integer? Or is it the equivalent
02:15of a non-integer, double, or any other choice, other than Integer?
02:21And then I need to add a DeliveryDate, or a promise date, and I want to make sure
02:27that I store that as Date/Time, and that's it.
02:30So we've set up our two local variables that we'll use in this workflow, and we
02:34will be using them in the next two movies with two different workflow actions.
Collapse this transcript
Using Do Calculation
00:00We've created two local variables to use to store information in our workflow,
00:05and we're going to calculate a chargeback amount.
00:08We charge five cents for each business card that gets ordered, and so we're
00:12going to click and choose Do Calculation out of our list of Core Actions, and
00:19we're going to calculate.
00:20Now here notice that I can choose out of the Current Item, but I could also
00:25choose an existing variable.
00:27If I wanted to look something up in another list, I could do that as well.
00:31But in this case, I want to take the Current Item, and I would like to find
00:37Quantity, typing the letter Q was a big help there.
00:41The field type is picked up out of the SharePoint list, so I don't get to set
00:45that, it's already set in the library, or list. I am going to click OK.
00:50Now I have the choice of five different operators, plus, minus, multiply by,
00:56divided by, and mod.
00:58Of all of these, mod is the one that's probably a little bit more interesting
01:02than the others because the place that you'll use mod typically is in things
01:06like fulfillment and warehousing, other kinds of shipping.
01:10Mod is the remainder that is left over after we do a division operation.
01:16So, for example, if we have 49 items that we're putting into palettes, and
01:21a palette holds 12. Then mod is the 1. The remainder that is left over
01:27when you're all done.
01:28But we're going to choose multiply by, and then I can set any value here.
01:33Now notice I can go back, and I can look something up if I wish, or I can simply
01:37say that I want to enter a value manually. Then I get to choose where I store it.
01:44Now as soon as I chose Do Calculation, Microsoft SharePoint stubbed it in for
01:49me, and it included creating a variable called Calc.
01:52But I want to use the variable I created called Chargeback, so I'm going to
01:55just choose chargeback.
01:57So what we've done here with Do Calculation is we've grabbed a value out of the
02:01Current Item, done an operation, multiply by in this case, by another value, one
02:07we typed in five cents, and we're storing this in a variable called Chargeback
02:12so that we can use it later in this workflow.
02:14If we forget to use it, when the workflow ends, this value will be discarded.
Collapse this transcript
Calculating and setting times
00:00We're continuing with our business card order workflow and just so you can take
00:05a quick look at this, we created a workflow variable called DeliveryDate, and we
00:10want to calculate seven days from the date in which the order was placed.
00:14So let's go ahead and create a new step, and in this step we're going to
00:19Calculate the Delivery Date.
00:23The function that we'll use for this is not Do Calculation, but is instead Add Time to Date.
00:31This name is a little interesting, it makes it feel like there's a date, and
00:35we're going to add like 3 p.m. to a date that already exists.
00:38Actually you could think of this as add time to time, add date to date, or
00:42increment date or time, which is the way I tend to think about it because
00:47everything here is a variable.
00:48I'm going to add 7, then click somewhere else, days to the date.
00:56And the date that I want is actually to go into the Current Item and to grab the
01:01date that it was created on.
01:04Now there is also just a Created field that I could use, it's also Date/Time,
01:09either one of those will do, but I'm going to use Date Created, say OK.
01:13And as soon as I added this particular action, Microsoft SharePoint stubbed it
01:20in and included a new variable.
01:21But I want to use my own variable called DeliveryDate, because it's going
01:25to make it a lot clearer when I put this into my email message later in this workflow.
01:29So again, the action here is Add Time to Date, but it's used to increment time
01:35on any kind of a date, whether you're adding minutes, days, hours, whatever it
01:41is you wish, and storing it in a local variable that will have the same life as
01:46the duration of the workflow.
Collapse this transcript
Setting workflow status
00:00While your workflow is running, SharePoint updates and then shows that it's in progress.
00:05And then when it's all done it shows it as canceled, or completed, depending on how it ended.
00:11There are some built-in statuses, but you can set your own status that would be a
00:15little more user friendly or would just provide more information.
00:19So to set the workflow status, this is different than the status of an item that
00:24we might do as a custom field, this is of the workflow itself, let's go ahead
00:27and choose Action > Set Workflow Status.
00:30Now there are three items on the dropdown already.
00:33You can choose when you're setting the status from Canceled, Approved, and Rejected.
00:37You can also add other items to this list.
00:40If you do you can't delete them from this list later on, so this is a place to
00:44be a little careful with your typing.
00:46And if you have a list that you're going to use, you might imagine before you
00:50customize it, what that list would look like in all kinds of different settings.
00:54For example, if I wanted to have something that instead of said Canceled, said
00:59that the workflow status was terminated. Am I comfortable using that every place?
01:04Or is that jargon that's only good for this particular list?
01:08On the other hand, I might want to type something really long.
01:11For example, we've ordered the business cards when it gets to this point.
01:15So the workflow status could be Order Completed.
01:19That would be just fine as something that I might want to set.
01:22And I wouldn't use that then if wasn't an order system of some kind.
01:25So I'm actually going to say Order Completed, and I'm going to Tab.
01:30So now when I go back to this list, as I told you, I have four items on here.
01:35And I can use this anyplace else in this workflow, and with this list, but not anywhere else.
01:41If I want to have Order Completed elsewhere, I'm going to need to type it in
01:45again unless I want to approach this programmatically using Visual Studio.
01:49So, if this is the very last step in workflow like it is here, I'll actually see
01:53this when I go look at my workflow log or my history log.
01:58But right now it just gives me a way to move the status along and use the
02:02language that I would prefer to use, in order to update the workflow status.
Collapse this transcript
Stopping a workflow
00:00We want to talk about how we stop a workflow, and why we would stop a workflow.
00:04So we're returning to our request new position workflow that we've been working
00:08with throughout this course.
00:10Every single workflow needs to be designed in such a way that it can end.
00:16So if, for example, in this workflow as long as vice presidents are giving their
00:21approval we go all the way through to the end.
00:24The workflow will actually end itself right down here, after it emails, create
00:28the position this final step, that email is sent, and then it will mark itself
00:33as complete, and it will end.
00:35But at all of these other points in the workflow where approval isn't given, we
00:40need to terminate the workflow ourselves, because if the Current Item equals No,
00:45we send an email, and then we just stay here in the workflow, and the workflow
00:49remains in progress, it remains unconcluded.
00:52So one of the things we want to be able to do is when we come to a branch where
00:57one choice is to continue and the other choice is not to continue, then the
01:01thing that we need to do to finish off that not continuing branch is actually to
01:05choose the action Stop Workflow.
01:08When we do this then we'll be asked to log a message.
01:10If we just want to grab a value out of the current item and send it to the log we could.
01:16But I usually will choose to display the Builder and to actually put some text
01:20in here that says Workflow Stopped, and to reflect why.
01:25In this case it's the Area VP did not approve the position.
01:31If I want to add Lookups here, I can.
01:34Just as I can in an email message or anywhere else I see this String Builder.
01:38So I'm going to say OK, this will be sent to the log, we'll be seeing logs
01:42later on in this course. But that's how Stop Workflow operates.
01:46Again, you never need to add a stop the workflow at the end, it will do it automatically.
01:51However, any place above the bottom of the workflow where you're saying here's a
01:56dead end, what you need to do then is stop the workflow, and write the
02:00appropriate entry to a log so that every workflow can complete.
Collapse this transcript
9. Using List and Utility Actions in Workflows
Creating a new list item
00:00The SharePoint list actions are used in both lists and libraries.
00:04We are going to create a real small workflow here to show how we can create a new list item.
00:10This is a really handy thing to be able to do, and it provides the same kind of
00:14interoperation that you have in Outlook, for example, where you say, I want to
00:18take a calendar item and create a new task based on that item.
00:22What we are going to do is we are going to use the Calendar here, the corporate
00:27calendar for Two Trees Olive Oil.
00:28And give users the ability, when they create a Calendar Item, to actually go in
00:32and then create an announcement from it.
00:35We could also make this automatic and have it happen whenever a new item is
00:38created, we can talk about that, but I think we'll create a manual process right
00:42now, until we get used to it and see show it works.
00:46Let's jump over to SharePoint Designer.
00:48Here's our Calendar List in SharePoint Designer and what we are going to do now
00:52is we are going to create a new workflow for this list, so we'll go to Workflows
00:57> List Workflow > Calendar, one of many ways to get here, and I'm going to say
01:02Create Announcement from Calendar Item.
01:09And again it's a good idea to have some documentation here about the
01:14Description because it will show up. And particularly if you have multiple
01:17people creating workflows, you want to say who it was who created it, and what the intention was.
01:22This is pretty straightforward, we are going to Create and post an Announcement
01:27item from the current Calendar Item, okay.
01:37So here we are Step 1, and we are going to just insert our first Action.
01:43Our first action is List Action > Create List Item.
01:48Create list item in this list, so the list that we want to choose here we are
01:51going to create the item not here in the Calendar, but over in Announcements.
01:58And it says okay, well, what will we use for the Title of that item that we
02:02are going to create?
02:03So we need to modify this and then go choose the field in the calendar that we
02:08would actually want to use.
02:10So from the Current Item in the calendar, we have lots and lots of choices.
02:14But remember that what we'd like to do is we'd actually like to have something
02:19that makes some sense as a title, and you'll probably find over and over again
02:23that if you go back and choose Title, that works.
02:25So we are going to create an item where title is the same as the title in the Current Item.
02:32And we can add other items as well if we wish, so we have, for example,
02:37information about what's going to go in the Body of the announcement.
02:41And we can use a Builder for this if we wish, and we can say The event, and
02:48let's go grab the Title, will be held on, go get some more information about it,
03:06Start Time at, Location.
03:14Now you might wonder how I know what these things are called.
03:17Well, they are the same as they are in Outlook.
03:19If you know them from Outlook it's going to work for you.
03:22If you don't know they are from Outlook then you can actually go take a look at
03:26an Outlook form and see what all the items are. You can also take a look at a SharePoint form.
03:31You need to know the names of these fields so that you can call them up.
03:35So Title is pretty standard across all items and documents.
03:38Things like Start Time and Current Location, you might also want to know.
03:41Here's a link to this event.
03:49There is our Encoded Absolute URL, which we are going to use every single time we
03:54want to create a link.
03:56So, we've got a title, we've got some other information that's going to go into
03:59the Body that we've built, and we could add other fields if we wish.
04:04But this is good enough for us to get an announcement going here.
04:07Let's say OK and the output is going go to a variable called create.
04:12I am going to call this Create Announcement.
04:17I just think it's good not to leave step 1, step 2, and step 3, and so on in there.
04:21Even if there's only one step, there should be something that's going to work for us.
04:26I want to Check this for Errors at this point and say OK.
04:29Let's go ahead and Save, and let's Publish.
04:34Let's go back out of the Editor to the item itself.
04:40I really want to force myself to do this, and encourage you too as well, because
04:45this is where we make sure, for example, that if we wanted to have it
04:48automatically started, it would start here. But this is all we want to have.
04:52This is good, it's published so it's running on the calendar, and now we can go
04:56back over and test it.
04:58So I'm going to create a new calendar item for the 4th of July, maybe at 6:00
05:05o'clock, for example.
05:07Here's my New Item form that opens, and this is going to be a Barbeque and the
05:14Location will be Balboa Park. And it's going to go from 6:00 to 9:00.
05:22And we could have some other information, the Description of course, we could
05:26create some Categories, we could specify our own values, and I am just going to
05:32go ahead and Save this item.
05:33So here is our calendar item, we can select it, and choose Workflows, or we can
05:39double-click to open it, and click Workflows.
05:42And we're going to Create an Announcement from the Calendar Item.
05:46Click Start, and we are back in our Calendar, and it looks like nothing's changed.
05:52But we didn't expect it to change here.
05:54Let's go to our Announcements List and here is our new announcement about the Barbeque.
05:59The title that we provided is the same title as it had in the calendar.
06:03And here's our body text This event will be held on 7/4, at 6:00. There's our
06:08location and here's the link to the event, very easy to create.
06:13So this ability to take a current item and create a new item in another list is very powerful.
06:20You might want to create Tasks from calendar items. You might want to take a
06:24Discussion item and turn it into a Task, or an Issue, so that it can be worked
06:28on further by folks who are just discussing it in a sort of ad hoc fashion right now.
06:33So take a look at opportunities to create items of different types in different
06:38lists, or the same type of item in a second list, if you prefer, a document that
06:43we are now going to create in a second library.
06:46This is how the Create New List Item works in your SharePoint Workflows.
Collapse this transcript
Checking items in and out
00:00There are lots of list actions, some of them are not made for all lists, but are
00:05made specifically for libraries.
00:07Document libraries are a more specialized type of list, and some places here in
00:12SharePoint Designer lists and libraries are lumped together.
00:16But in this particular list, in the Site Objects list, there is some real clarity
00:20about what's a list and what's a library.
00:22We've been working with the new position request workflow a fair amount, and
00:27it's easy to think of that as having being created as a list.
00:31But any time we publish an InfoPath form to create a list, we're really creating
00:37a form library or a type of document library.
00:40So we're going to work with our request for new position workflow.
00:44see here they're listed as Lists, but it's really for a Library.
00:48And let's go ahead and open and edit that workflow.
00:52Because we might want to be in a position where we could actually check
00:55something out, make some changes to it and check it back in.
00:58So this is the type of list where we would use those particular actions.
01:04So let's say, for example, that we wanted to check the item out to do
01:07something with it here.
01:08I'm going to add another step that says Check out, modify, and check in item, for example.
01:20And then we'd say that the action that we want to use down in our list items,
01:24and if you know you're doing a lot of this, you can click this arrow and just
01:28say show me the List Actions, so I don't have to scroll while I do this set.
01:32Let's go ahead and check out the item, and in this list check out the
01:36Current Item, works for me.
01:38Then we might want to do some kind of a modification using any of the other
01:43actions that we have, and then it's time for us to say we're done with this
01:47item, and we want to check it back in.
01:49So let's say we checked out the item, and we had a user working with it, and
01:54then they checked it back in, so they're checking it back in to the Current Item
01:59and the comment could be whatever the output of that is.
02:02So this item has been sitting with the hiring manager, so the comment might
02:06simply be that the hiring manager has reviewed.
02:11And this, again, is going to be available-- this comment--not in a workflow history.
02:16This comment is actually being written into the versioning on this particular document.
02:22So when somebody goes and looks at the history of the document being checked in
02:25and checked back out, they'll actually see this comment that this item was
02:29checked out, that something was done.
02:31We might if we were doing something programmatically here, we were actually
02:35going and saying, well, I'm going to change a value in this item, I'm going to
02:39edit one if its values, and it doesn't take that long, this is another great
02:44place for us actually to insert that pause for duration for that 5 minutes,
02:49because a checkout followed by a really quick check in can create some problems for us.
02:54The other possibility is that we didn't want to check it in at all, that
02:58the action that we actually wanted to do here was the action of discarding the checkout.
03:03So if we discard the checkout, that would look like this, and we would say
03:07discard the checkout of the current item.
03:09Now in this particular case that discard would never happen because the item
03:12would be checked back in.
03:13One of the things that check in and check out does is that actually makes sure
03:18that the appropriate state is there before it tries to run.
03:21So if the item is already checked out, you won't be allowed to check it out.
03:26If it's not checked out you can check it back in or discard it.
03:29So that's how these three list conditions, Check Item In, Check Out Item, and
03:35Discard Check Out all work so that you can make changes to an item and make
03:41sure that no one else is making changes to the same item while you're trying to modify it.
Collapse this transcript
Setting field values
00:00Here's one of the things I love about SharePoint, if we design our Workflows and
00:04our Lists and Libraries carefully, we can actually empower users to be able to
00:08go into the site and get information for themselves, particularly about
00:12processes where they have some investment and they might want to pick up the
00:16phone every few minutes and call and say, hey, did that position get approved
00:20yet or what is the vice president of finance think about these positions?
00:24If I am careful in my construction and provide information back to users, I can
00:29give them a place they can get that information without harassing an
00:32administrative assistant somewhere or walking around wondering what's
00:36happening with their work.
00:38So I've added one column here to our NewPositionRequest list, that column called Status.
00:44And now we're going to add Actions to our workflow to be able to update the
00:48value of the Status field so that user could come in here and look and say
00:53what's happening with that particular position?
00:55Let's see how this works. Here's our Workflow.
00:58It begins with us Notifying the Submitter, hey, we got your request.
01:01The next thing we do then is we Email the Area VP, and we say hey, what do you
01:07think about this request?
01:08And then we Wait for them to actually go in and approve it.
01:12So, if I'd like to be able to display the status, Area VP Review, I would put
01:18it right in here after we've emailed and before they have actually made the change.
01:24So in other words during the time we are waiting for them to review.
01:27I am going to click right there.
01:29We are going to go to Action, and we're going to choose the List Action > Set Field in Current Item.
01:36The field I want to set is the Status Field, and the value as neatly as I can put
01:42it is Area VP Review.
01:45Now if I'd called this field reviewed by, then I could just put Area VP, but I
01:50might want to do other things than note who's reviewing it.
01:52So, there is my first item right there, Set Status to Area VP Review.
01:58Same thing here, between the time we email the vice president of finance and the
02:02time that they actually do something with that Date field.
02:06Let's go ahead, Set Field in Current Item, the field we are going to set is
02:10Status again and the value is going to be Finance VP Review.
02:17And we have a third one of these, between the time we email, the HR VP and the
02:23time that they respond, Set Field in Current Item, Status, HR VP Review.
02:33Now I could also set another status down here after the HR VP has approved, we
02:40would absolutely know that there wouldn't be any reason not to say that the
02:44position was approved in total.
02:46So, I could go here, and we can change the Status to Position Approved. That looks good.
03:01Let's Save it, Check for Errors, looks good, and now let's Publish it.
03:08And let's return to SharePoint.
03:10Remember of course, that there's already a workflow that doesn't include these
03:14updates that's being used by this initial position.
03:17But let's go ahead and Add another document.
03:21So, now let's get a Pipefitter, and we're going to have them work in the Facilities Department.
03:27We would love it if they were available to start on August 1, and the Salary
03:32range for a Pipefitter is let's say, $50,000 to $65,000.
03:38And I'm filling this out for somebody else. Joe Johnson has actually asked for this.
03:47Now notice that there's no Status field that's been kept here in this form.
03:52It's only available in the Workflow.
03:54And we are going to need to provide Joe's vice president's name.
04:15So this is all set, we are going to Submit it.
04:18The form was submitted successfully, I am going to say OK and close it.
04:22So we have submitted our document, here it is.
04:24We know that we already have our workflow In Progress because it tells us that,
04:29and you might wonder why this Status isn't marked here.
04:32Sometimes, remember, there's a little bit of a delay.
04:35We have our workflow, and it's sending a couple of emails, and then it's
04:38actually updating the status.
04:39So, one of the things that we'd want to do is we'll actually just want to refresh this.
04:43And as you will see, here's the Status, and as our Workflow continues, the Status
04:48will be updated with the Finance VP Review and the HR VP Review and then our
04:53final Status that shows that the position was actually approved and filled.
04:58This first workflow though, that's running on this item will never reflect any
05:03of these statuses, because it's on its path already, running it's way down the
05:07hill, and there's nothing that we can do easily to redirect this.
05:12Often, if people really want to make sure that this document participates in a
05:16workflow, the easiest way for them to do it if it's relatively new is actually
05:19just to repost the document again so that it will pick up on the workflow, as
05:24will every future document that gets posted to this library.
05:27That's how we can use the Action of setting a field's value to a specific
05:32value that we supply.
05:34We can also use calculated values and other values that we pull from
05:38different list, but this is a really common use of this particular action in SharePoint Workflows.
Collapse this transcript
Copying and deleting list items
00:00We have got a basic Announcements List here.
00:02And we have 20, 30, 40 announcements in it, we want to get rid of them, but we
00:08don't want to delete them.
00:09We don't want them gone, we just want them elsewhere.
00:11So we really want an announcements archive, and to have the ability for someone
00:16to go in and to say I'd like to move this item from one location to another.
00:20So we created another announcements list that's simply called Old Announcements.
00:25And now we're going to add a workflow to the Announcements List to allow a user
00:31to move an item to the Old Announcements List.
00:34Let's go to SharePoint Designer, click Workflows, and add a List Workflow to
00:39the Announcements List. And this is going to be Move to Archive.
00:47Move the current item to the Old Announcements Archive.
00:51You might think, why can't we just drag and drop? And the reason is drag and drop
00:54is turned off for many folks.
00:56And it's difficult to just move things between libraries, so let's see how we
01:01are going to do this here.
01:02This is actually a two-step process. We can call the whole thing Move to Old Announcements.
01:09And when we go take a look at our List Actions, you'll notice that there is no
01:15move item here at all.
01:16That's because move is actually first a Copy then a Delete.
01:20So we are going to Copy this List Item to Old Announcements.
01:24Then we are going to take advantage of one of our Core Actions, which is a
01:29Pause for a Duration, we are going to wait a few minutes to make sure that it
01:33gets there, and then we are going to Delete the current item.
01:36So a Move is a Copy followed by a Delete.
01:39Let's start with the Copy.
01:41Copy the Current Item to. Notice the Old Announcements isn't here, so we are
01:47going to go up, and we are going to Refresh.
01:50When you're moving pretty quickly with SharePoint, this isn't all that unusual.
01:54To this list, there is Old Announcements.
01:56So we are going to Copy the Current Item to Old Announcements, that's Step 1.
02:01The second Action in this step is actually to Pause.
02:04So we are going to Pause for a Duration, 0 days, 0 hours, 5 minutes is actually sufficient.
02:12If you were concerned, if you were in a situation where you had SharePoint
02:15hosted somewhere else, and you thought, it seems to me that it sometimes takes
02:19longer than it were, crank it up to 10 minutes, doesn't really matter.
02:22But 5 is usually good enough.
02:24And then what we are going to do is we are going to take our third Action, which
02:29is on our List Actions List, which is Delete Item, Delete the Current Item.
02:35So, copy the item to Old Announcements, wait for 10 minutes, Delete the item.
02:39That's our entire workflow. Works for me. Let's go ahead and Save it.
02:45And now let's go back out to its settings.
02:47This is a workflow that is manually started, this is a great example of a
02:51workflow that we don't want to have start automatically. We don't want it to as
02:56soon as you drop a new item in, let's move it and delete it.
02:59Although there are times you will want to do that, this isn't one of them.
03:03So let's go ahead and Publish it.
03:07And now let's go back to our library, and we want to go ahead and take this
03:11announcement, and we'd like to archive it.
03:14So I am going to choose Workflows, Move to Archive, Start.
03:19Notice that this is In Progress right now.
03:22If we slide over here to Old Announcements, we will actually find that the copy
03:26part of this was done pretty quickly.
03:28And so for this 10-minute interval, this item exists in both places.
03:32When the 10 minutes are up, if we come back here to the Announcements List, we
03:36will find that Move to Archive has completed, and that this item is gone.
03:42This raises the issue of whether we actually want Move to Archive to show here.
03:46If we were doing a lot of archiving, we might, because that way someone can
03:49actually tell, yup, I did it right, it's already started.
03:52But it also takes up space.
03:54It might be that if you wanted to show this, you would actually create a
03:57library view that was archiving or a library view that what utilities that
04:01showed these columns for this kind of clean up or utility-based workflow that
04:07you might want to create.
04:08But two new List Actions, Copy, Delete, and a reuse of our Pause, give us a nice
04:14Move from one library to another.
Collapse this transcript
Waiting for a change to a list item
00:00Another useful action that we've used in our Workflow is the wait for a field
00:04value to change action.
00:06We've used that here in our Employee Onboarding workflow.
00:10The way it works is we are waiting for a user to go in and to change a value,
00:15and when they do, then we know we can resume the workflow.
00:18But until they do, we are going to pause.
00:20So, our form that we use in this workflow is used in this fashion, the
00:25Vice-President says, I Approved this and they enter the date.
00:30Later on then we've routed it to the Vice-President for Finance and they don't
00:34Approve it, and they enter a different date to show of no, and they might make
00:38the comment, No funds available at this time.
00:43Clearly we can't wait to see if the check box changes, because the
00:46vice-President for Finance isn't going to turn on and back off again.
00:50So we have to watch another field, and we intentionally added a field to this
00:53form, a Date field that would require someone actually changing it.
00:58Another possibility, by the way--and this has to do with form design more than
01:02workflow--is we could've used rather than a check box, a dropdown list that had
01:07select as it's default and then approved and rejected as its choices so that
01:12someone would actually have to make a choice.
01:14But these folks wanted to use a check box, their old form had one, and their old
01:18form actually had a place for the date, so we copied their form.
01:22But again, we are not going to wait for the check box to change, we are watching this particular field.
01:27So the way this works in our workflow here is that we're Waiting for HR to be
01:32greater than a particular date. Any date that's in the past will do.
01:37And when we added this Action, we actually chose Wait for Field Change in Current Item.
01:47It asks us for the field, and we said, well, we want to wait on whatever field
01:51that is that we are looking at.
01:53And then to equal, we have to equal or not to equal as defaults, but we would
01:57also have greater than, less than, and so on, based on the field we chose.
02:02And then we would set a value that we are looking for.
02:05Now you really need to understand what types of data you have.
02:08Because if, for example, you have text, like we are going to Wait for
02:12Employee Name to change, or to not equal--notice my list got longer as soon as I made a choice--
02:19my Employee Name to not equal a blank, we can do that.
02:22But I couldn't wait, for example, for a date like Created to not equal a blank,
02:28because a date will never be blank.
02:30So I could say I'm waiting for the date created to be greater than, and I have
02:35to enter a date here, so dates for date, numbers for numbers, text for text.
02:40But simply say to wait we are going to watch this field.
02:43And as soon as it changes, I want you to note something else about this.
02:47It's not saying as soon as it's not empty or soon as it's filled, so you can use
02:51wait on a field value to show that something has been modified, as opposed to
02:56it was blank, now it's filled in.
02:58This Action is an incredibly powerful action that you'll use over and over
03:02again, especially if you consider how to design forms to take advantage of it.
Collapse this transcript
Finding an interval
00:00The Business Card Order entry system has been a big hit in the Facilities area
00:04and really throughout the business, because it does exactly what it should do.
00:08It allows users to easily provide information so that they can get what they
00:13need out of a system without a lot of additional human intervention.
00:17So, instead of getting a lot of scraps of paper and phone calls and even
00:21emails that then required the folks in Facilities to use copy and paste to
00:25order the business cards, now everything is coming into a system. It's readily available in a SharePoint site.
00:31Now, the folks in Facilities would like to extend this just a little bit more.
00:35What they would like to do is to be able to provide additional feedback to
00:39people, because what they're finding is 4 or 5 days in, people are picking up the
00:42phone or emailing and saying, are those cards really going to be done on time?
00:46So a progress report, always a good thing to put in a workflow.
00:49And the second thing is they would like to actually be able to know when stuff was done.
00:54That's not something that we were told to collect to begin with.
00:57So I have added two more fields to the form.
01:00The first, the time and date stamp for when printing was actually done.
01:05And the second a time and date stamp for when someone was notified.
01:08In terms of the printing, we will need to have a human being to provide that
01:12information, and you'll see how to do that in a later movie.
01:15The notification we'll provide automatically, because when we send out the
01:20email, it's easy for us to set a value for a field in the current item.
01:25There's another really good reason that the business wants to collect this
01:28information, because once we have times and dates that show when a process was
01:33started--a midpoint, for example, when printing was done--and when it was
01:38complete when someone was notified, we are collecting key performance indicators
01:43about the efficacy of our printing operation.
01:46So, we can accumulate lots of data easily about printing and find out,
01:51does it really take 7 days? Why does it take 7 days?
01:55Is there additional time that's needed?
01:57Whether we're sending things out to a vendor or we have an internal printing group,
02:02it nice for us to just have easy information that we can use to say, are they
02:06getting better or worse at what they're doing? Is it taking more or less time for
02:10them to provide business cards? So why not collect this data?
02:14Again, you'll see that I could have a check box here that says Printed check,
02:18Notified check, but I don't.
02:20I'm using the time and date stamp, because that's the only way that we can have
02:24this kind of performance information.
02:26I want to go ahead and close this form, and we are going to head over to
02:31SharePoint Designer to see how we can calculate these intervals to be able to
02:34grab indicator data about our business.
02:38Here we are in a SharePoint Workflow for order business cards.
02:41And you'll notice that I have already added a couple of additional steps for
02:45when we're going to complete printing and when we have sent the notification.
02:50I have a couple of questions.
02:51How are we going to get completion information from the printer?
02:54Is there any lag time needed for shipping?
02:56Is it possible, for example, that we're sending some things out to be shipped?
03:01Is shipping a different separate process? So if something's printed today, it won't
03:05go out today, it won't go out until tomorrow, so I need to know those things.
03:09But that's not what we are really worried about right now.
03:12Right now, what we're concerned with is how are we going to calculate the time
03:15between when an order was submitted and when the order was actually completed?
03:20Now both of those fields are date fields.
03:22But if we subtract one date from another, the answer in SharePoint is always
03:27going to be a number rather than another date.
03:29If you think about it, that's how it works in Excel and Access and other programs too.
03:34If I subtract today from tomorrow, the number will be 1 day or 24 hours,
03:40it won't be another date.
03:42So we're going to create a couple of Local Variables. The first Local Variable
03:47we are going to create will be from the time the item was submitted to the
03:51time it was printed.
03:52So, SubmitToPrint, and again, not a date time, but actually a Number.
04:00And then I want to add another local variable that is for SubmitToFinish.
04:07And again, subtracting one date from another, the answer is not a date, but a Number.
04:12So two new Workflow Local Variables, let's go ahead and say OK.
04:17Now let's see how we're going to calculate the interval between the time this
04:21was submitted and the time that it was actually completed.
04:24I am going to put it right down here before Order Completed, because that's
04:29where it belongs, and let's go ahead and add an Action, and the action that we're
04:33going to add is way down at the bottom of the list, you see Utility Action
04:37called Find the Interval Between Dates.
04:40When it's first stubbed in, it says Find minutes between date and date and
04:46Output to a Variable called time.
04:48Well, I already know that my Variable here is called SubmitToFinish.
04:52And I don't think I want to use minutes.
04:55I am going to come up with a really big number there.
04:58Minutes feels too granular. Days fields not granular enough.
05:01I am going to choose hours.
05:02So, I am going to calculate the number of hours between and the Current Item.
05:08First, when this item was dropped off or created right there.
05:12It's a Date/Time field, then I want to check that if I'm doing interval here.
05:16And then find the hours between that and the date that we don't necessarily
05:24have yet, but we will.
05:26That is the date that we actually notify the user that this was done, so there
05:30is our completion date, Date/Time field, yes.
05:35So Find the hours between the time this item was initially submitted and the
05:40time that the user was notified, which we are going to do in the prior step
05:44right here, and Output that to SubmitToFinish. So we are going to have a great number here.
05:49The last thing we are going to need to do is find a place to put this, because
05:54we're at the end of our workflow.
05:56So remember, that a local variable that we don't do anything with before the
05:59workflow ends gets disposed of.
06:01So I am going to Add another Comment here so that I don't forget that what I
06:05need to do is I need to report SubmitToFinish, so I don't forget to do
06:12something with that variable.
06:14I'm not quite sure yet what we want to do with it, but I know that we want to
06:18calculate it, and we don't want to lose it.
06:20We could write it back to a column on this list that we haven't added yet, or we
06:26could use this to set a value in a column in another list.
06:30We will decide that as we continue with our workflow and have a few more
06:34conversations with our users and with the business about how they would like to
06:38have this information reported.
Collapse this transcript
Updating list items
00:00We have a list called Asset Inventory with a list of items. Each of them has a
00:04unique Asset Number, a Title, and a Quantity.
00:08And so we want to create an easy workflow that would allow a user to walk around
00:13the business and count things and actually update this list pretty easily.
00:17So let's go ahead and create this update list workflow, and we can create this from anywhere.
00:22Remember that the List Actions allow us to take action on the current list but
00:27also on other lists as well.
00:29So we could put this just about anywhere we would like to, but I'm going to go
00:33ahead and connected to this particular list.
00:35Let's switch over into SharePoint Designer, and here's our Asset Inventory.
00:41Let's just go ahead and create an Update Workflow.
00:46And all we really want to be able to update is the Quantity, and this is an
00:51Inventory reconciliation for physical inventory.
01:00And so what we are going to do is we are going to Update the Quantity on Hand.
01:05To do that, we're going to go to Update List Item.
01:10We are going to update an item in this list, and we are actually updating the current list.
01:15And so what we're going to do is we're going to Add setting In Stock, at
01:21the start, to the value 0, so they will all be zeroed out, so we can go do our current inventory.
01:29So that's just going to do the Current Item. Let's just go ahead and Save
01:32this and Publish it.
01:37And so if we were going out to do inventory and wanted to 0 set these or
01:41any other specific inventoriable value, we can go here and say we are going to zero this one out.
01:47Remember that we can go to our List, we can choose an item.
01:51We can say that we want to run a Workflow on it, Start it, and notice that it
01:57updated that value to 0.
01:59Now, I can update a value to a specific value, to a value that I get from another list.
02:04I have access in that dialog to any of the places that we've gotten information from before.
02:10If I'm storing a variable, I can stuff the variable in here.
02:13So remember that when we were working on this workflow and we get to the
02:17point where we want to decide what value we put in here, that I actually have
02:21the ability to go get a value from anywhere else, from a list, from a workflow,
02:26anywhere that I've kept it, and then go ahead and stuff it into this particular field.
02:31Also, I can change as many of the fields in this item as I wish all at the same time.
02:36So, I'm choosing In Stock, but I could say I also want to set, for example,
02:41the Title, and allow the user to change the title, because we got a new title
02:45from somewhere else. So this makes it really easy.
02:49Now we have the ability to go and with any particular List Item, we know now how
02:55to Create it, how to Delete it, how to Copy it, or how to Update it, all four of
03:01the key actions that we would use with List Items.
Collapse this transcript
Extracting substrings
00:00You could create a lot of SharePoint workflows and never need to extract
00:04substrings from strings.
00:06But if you do need this functionality, you will want to know that it exists and
00:10how to use it, because it will save you lots and lots of time.
00:14This is a Library that you haven't seen before. It's a library where we're
00:17asking employees to fill out and drop in expense reports, and the template for
00:21this Library is actually an Excel template.
00:23So we didn't create this using Info Path, it's a dock library with an Excel
00:27workbook sitting behind it so that when a user goes in and says I want to create
00:32a new instance of this, I want to submit my expenses, they will go to New
00:35Document, Create a new document in the library, and there's actually an Excel
00:39template that opens up.
00:41So here's the Excel template, and when we're all done, we've actually provided
00:44information for users on how we want them to save this.
00:49So what they'll do is they'll save this using the date first, a four-digit year
00:54followed by a dash, a two-digit month followed by another dash, the two-digit
00:59day followed by another dash, and the word Expense.
01:02Finally, a dash and then the name, and this would be the portion of the person's
01:07name that is the username in their email address.
01:09So it doesn't have to be your full name. I am gini@twotreesoliveoil.com, so
01:13this comes from Gini.
01:15The Library right now has two items in it, one that was my Expenses and the
01:19other I put Olivia's in for her, so they're all there.
01:22I want to take just a moment to show you how you can find more information on
01:26swapping out the template for a library so that you can use existing Word and
01:30Excel templates in this way.
01:32Let's go over to the Microsoft site and office.microsoft.com, simply say you want
01:38in SharePoint to set a file template, and if you search for that, your results
01:42right at the very top, set a file template for a document or form library.
01:47Again, not part of the workflow class, but if you're doing workflows, this is
01:51something that you might want to know how to do.
01:53So search for SharePoint, set a file template on the Microsoft site.
01:57But let's now go back to our Library, and here is the challenge.
02:01We have lots and lots of expenses in here, but we have decided that we shouldn't
02:05be saving the end date for this expense report or the reimbursee name as part of
02:11the file name. We want to be able to extract those so that we could show, here
02:15are all the expenses that were filed for this month, ending date, for example.
02:19So how do we get information out of the file name to be able to put into another field?
02:26And that's where extracting a substring is just exactly what you want to be able to do.
02:30Let's swing over now to SharePoint Designer, and I'm going to create a manual workflow.
02:35Now it's very easy going forward for us to actually prompt the user to give us
02:41the ending date for the expense submission and the name of the reimbursee as
02:45metadata, as separate data, but for all the items that we have in there, too, but
02:50that's a representative sample out of the hundreds that are actually there.
02:53We'll want to be able to have the user just click and run a workflow.
02:57So what we're going to do is we're going to start a new workflow on our
03:02list, and we're going to call this Get ending date and reimbursee from file
03:10name, a good Description.
03:13Once we set up our workflow, I am going to go ahead and click OK and the very
03:18first thing I'm asked to do, of course, is to go ahead and insert an Action or a Condition.
03:23We are going to run this manually.
03:25So I don't need a condition. The condition will be that the user chose to run this workflow.
03:29And the Workflow Actions that we're going to use are all part of our Utility Actions.
03:34There are all of our Extracts and Find Intervals.
03:37So the first thing we want is the Date.
03:39So we are going to Extract a substring from the start of the string.
03:43The date in the format that you just saw, four-digit year, two-digit month,
03:49two-digit day, with dashes is 10 characters long.
03:53So I'm going to copy 10 characters from the start of the string, and the
03:58question is, what string?
03:59Well, in the Current Item, we're actually going to go grab the name, and it's
04:07going to put it somewhere.
04:08Now, as with all of the other actions that use workflow variables, SharePoint
04:12has already set up a variable called substring, but I'm actually going to change
04:16that and create a new variable, and the variable that I'm going to create is
04:20going to be called PeriodEndDate. I'm pulling it out of the string.
04:26The fact that it's a date doesn't mean that I get to pull it out as a date.
04:30All I can do is grab letters.
04:32So I am actually counting, 1-2-3-4-5-6- 7-8-9-10, grab those out of the String.
04:37We'll have to convert it to a date separately.
04:41The next thing I want to do now is get the name, and so I have 10 characters for
04:46the date followed by a dash, the word Expense, and another dash. That second dash
04:51falls as the 19th character in that String.
04:55So I'm going to Extract a Substring from Index of String.
05:00Now, I can't really subtract it at the end, because end works like start.
05:04So if I subtract it from the end, I have to know that everybody's name is the
05:08same length, for example.
05:10So if I want to be able to say that I want from this point going forward to
05:14capture the entire name, I am going to choose Index. And how that works is I say
05:19then copy from the String, Name, starting at, and I told you that the last dash
05:30is at the 19th position, the 20th character, and I'm going to Name this new variable Reimbursee.
05:39So I'm grabbing both of these Substrings out of the same String and tucking them into two variables.
05:44Now you know that with workflow variables, these are going to be discarded at the end of our workflow.
05:49So I need to now set up a column to put them in and stuff these items into columns.
05:54But before I do that, I just want to make sure that this piece is working.
05:59So what I am going to do is I am actually going to log this to the workflow log
06:04to make sure it works.
06:05So let's Log to History List this message, and I'm going to say that the Period
06:12Ending Date is and go grab my Workflow Variable that I just created called
06:20PeriodEndDate, and Reimbursee is, and I'll go grab that Workflow Variable for my
06:29Reimbursee and say OK. All right! So I'm writing this to my History Log.
06:35So now I'm going to just take a second and say Extract substrings from file name.
06:44And let's Save this, Publish it, and it will now be available in our Library.
06:52So let's go back to the Library.
06:54Here we are, and I'm going to go to this first Expense item.
06:58Now, this has been sitting here all the while I have been working in SharePoint
07:02Designer, so I'm just going to Refresh this. It's a good idea to do this,
07:06because I want the workflow to show up.
07:07So I am going to click, Workflows, and I'm going to say Get ending date and
07:14reimbursee from file name, go ahead and run this.
07:19It comes back, and it says it's Completed.
07:21What I'd like to know is what did it actually do?
07:23So I click the Completed hyperlink, and it says Period Ending Date is 2012-06-30,
07:30and the Reimburse is Gini.
07:32So I can tell that both of those Extracts worked exactly as I wanted them to.
07:36For right now, I'm just putting this into the log to test that
07:40functionality, but now I would go back to that workflow and create a couple
07:43columns in the list, and I would place this metadata in there using the set
07:48value in Current Item Action.
Collapse this transcript
10. Getting Data from Users
Collecting data from a user
00:00We've had some requests for an addition to our Employee Onboarding Workflow.
00:05As you'll recall, this is a workflow that kicks off when there's been a new hire
00:09and various departments do different things to make sure that the employees all
00:13fully on board. And there's been a request then to be able to send the employee a
00:18welcome email at the very end, after they should've received all this--sort of
00:22like a checklist that says you should've gotten his form from payroll and turned
00:25it back in, you should already have your office, your cell phone and so on.
00:29The problem is when we start this workflow, we have no idea what the
00:33employee's email address will be, because that's actually assigned down here
00:38in the IT department. That's one of their tasks.
00:41So we're going to need to find out what the employee's email address is
00:44towards the end of the workflow, and then we can use that email address to
00:48send the welcome letter.
00:49There are two easy ways to collect information from users in a workflow.
00:54The first is to Assign a To-do Item, and what we would do is we would actually
00:58add a column to our list, and that column would be employee email, for example.
01:05We'd send a task to the IT department and say please go update this, and then
01:09they would mark it as Done.
01:11The other possibility is we just want to Collect some Data.
01:14We actually don't need to have a task that's that formal.
01:17We just want to say, hey!
01:18Give us some information, and then we'll immediately store that in a local
01:22workflow variable and then use it to send the email message, and that's the
01:26method that I'm going to use here.
01:28So I am going to choose Collect data from this user and Output it to a Variable.
01:32The date that I want to collect is the NewEmployeeEmail, and this is going to
01:40be a task name, so I am going to say Provide NewEmployeeEmail, and the
01:46Description is Please enter the email address for this employee, and I am going to click Next.
01:56Now we're going to actually add a field to a form that we haven't seen before.
02:01So I need to provide that new field, and it is Employee Email Address.
02:08And this is the Email address you assigned to this new employee, and instead of
02:17you perhaps, the IT department assigned or whatever, single line of text.
02:21We are going to choose an Information type, we have a pretty robust list, but we
02:25just want text here, and I am going to click Next. And the Default value, I
02:29shouldn't provide one, I have no idea what the default email address would be,
02:33and at this point I'm not going to allow a blank value.
02:36This email address should have been assigned already, and if not, I don't want
02:40the workflow to continue. So I am going to clear that out.
02:43If we have a standard in our organization on the maximum length for an email
02:47address, it would be good for me to make sure that that's here as well, and I am
02:51going to click Finish. There's my custom form field to be filled out.
02:55Notice that I could capture information in more than one form field.
02:59So I could say I'd like the email address.
03:01I could say, if you know it, then I also want to know what the URL is for their
03:06personal page on our SharePoint site.
03:08I could be asking the Facilities folks about specific custom fields.
03:12What cell phone number did you give them? What office are they in and in what building?
03:16So feel free to use multiple items. They should all go together in this step, though.
03:21There are our custom form fields for this particular step, and I am going
03:25to click Finish here.
03:27So, I'm collecting this from this User, and for right now I'm going to go
03:31ahead and use myself. I am the IT person in this workflow, and now we're going
03:37to use a Variable EmployeeEmail that I actually had created earlier as a local variable.
03:43So that looks good. Let's go ahead and Save this.
03:46Check for Errors, there aren't any, go ahead and Publish, and now I can test this.
03:54So I'm going to go back over to my Employee Onboarding list, and let's go ahead
04:01and add a new employee, Esperanza Johnson, and she's going to be working in
04:12Administration, because she's in HR. Let's go ahead and Save that, and that
04:18workflow now is starting.
04:20Remember that when we look at our workflow, there are a number of things that
04:23have to happen first, but all of them are basically the department going and
04:27saying our work is done and so on.
04:29So we can simulate this fairly easily by simply opening this up and entering
04:37today's date for the HR work being done, the Payroll work being done, the
04:45Facilities work being done, and let's go ahead now and Save this.
04:50The workflow is still In Progress. We can go check it and see where it is right now.
04:55Notice here's the New Employee Onboarding, that's actually the email that's being
04:59sent to me by this step in the workflow right here, so all the waiting has been
05:04done, I've received my email.
05:06Let's go back and look at Esperanza Johnson again.
05:09Notice all we are waiting for is IT.
05:12So where is that request for me to fill in this information?
05:16Well, it wasn't emailed to me because we are asking me for information.
05:21It's actually a task.
05:22So if I go take a look at the Tasks list, I'll find that I am being asked to
05:27provide NewEmployeeEmail here, but notice what just came in.
05:32I'm receiving an email from SharePoint to say you have a new Task that's been assigned to you.
05:38If I click that, there is the email, it tells me go Review Esperanza Johnson,
05:44perform these Actions, so I am going to go look. I am going to Edit this item.
05:50If I wish, another place that I'll see this is if I go look in Outlook, on my
05:55Task list, as I refresh it, there is that Provide NewEmployeeEmail.
06:02So lots of places telling me, hey! You need to go ahead and do this.
06:07So I can review Esperanza Johnson, and then I can open this Task to mark it as
06:11Complete, but here is the place for her Employee Email Address.
06:16I am going to just Edit this item, email address assigned to this employee is
06:20esperanza@twotreesoliveoil.com, and I'm going to Complete this Task.
06:29So that's how this works.
06:31I'm asking for information, and there are lots of ways that my user is getting prompted.
06:36If they have their tasks connected to the Task list in SharePoint, which we
06:40want them to do, they'll automatically receive a task that goes to their To-do List in Outlook.
06:46Even if they don't, they'll receive an email from SharePoint saying, hey!
06:49You have got a new task and here's a hyperlink to it.
06:52So a couple of different ways to get there and then the ability to quickly fill
06:56out that information so that the workflow can actually continue.
06:59So if we go back now to Employee Onboarding, what we'll find is
07:05Esperanza Johnson's workflow has completed all the way through.
Collapse this transcript
Assigning a task to a user
00:00Many of the workflows that you'll create are a mix of steps that can be
00:03automated, but then steps that have to be done manually by someone, they can't
00:07be done by a computer.
00:08A perfect example of that is in our workflow here, to Order Business Cards,
00:13eventually somebody actually has to print these business cards.
00:16They need to set them up to verify them to make sure that everything looks good,
00:20and when they're all done, they need to let us know that they finished that.
00:24So this is a task for a human being, and therefore, the Action that we're going to
00:29use here is we're going to Assign a To-do Item to the printer.
00:33Now when we look at this workflow, it might make sense that the very first thing
00:39that we would do is we'd say wow!
00:40Just got an order, we should let the printer know.
00:43But remember that these electronic tasks take no time at all and more
00:47importantly, when we assign a task to someone, the workflow pauses until
00:52that task is complete.
00:54So if we send the task to the printer right away, none of these steps would be
00:58done until the printer would actually have done the job, and one of these steps
01:03is letting the person we are supposed to notify know that we have actually
01:06received this order and they will be getting it.
01:09So we want to put this request down in Complete Printing.
01:12We could change the name of this task to Notify Printer and Complete Printing,
01:19and that's a good idea.
01:21Notice I have a comment here from before that we want to get this completion info.
01:25So let's go ahead and Assign a To-do Item to these specific users.
01:31This is going to feel very similar to Collect Data from a User.
01:36It uses a similar wizard.
01:38So we're going to Assign a To-do Item, we are going to click Next, and it says
01:43what's the To-do Item, and we're going to say Print Business Cards and the
01:49Description is There is a new print order to be completed.
01:57And I am just going to say Finish.
01:59So we've assigned Print Business Cards to these users.
02:02Now, we'll probably be assigning this either to a group or to an individual
02:07person who can decide who out of the printers this gets tasked to, and that
02:13depends really in our business on whether all of those printers are responsible
02:17for managing their own work and are going online and hooked up to a task list.
02:22It's not unusual for some manual processes that there's really only one person
02:26who's in charge and they then hand out the work.
02:29So you want to determine how the workflow happens in the print department, or if
02:34it's an outside vendor, we probably have one contact.
02:37We are going to email them, hey! Here's this new print job.
02:40Right now, I'm actually going to assign this to myself so that I can make sure
02:45that the workflow works, and I am going to choose OK.
02:48So here's the Comment, we Need to get completion info from the printer, but
02:52actually, I don't necessarily need that comment anymore, but before I delete
02:56it, I'll just leave it there for a second, and Check for Errors, Save, and Publish our workflow.
03:06So this will be pretty easy for us to check on because we should get this task
03:10right away after all these automatic steps.
03:13So let's switch back to our Order Business Cards list in SharePoint.
03:17We're going to Add a new item, and we're going to print some business cards for
03:24Bart Bartlett who is going to work in the IT department, ordering 250 cards.
03:34Bart's a Business Analyst and the email address on Bart's cards and mobile
03:39number and so on, we'll just go ahead and leave blank, but the email address of
03:43the person we are going to notify, and once again, I'll put my own address in
03:48right now, because we're just testing. And I'm going to go ahead and Save.
03:55You know, I actually should get rid of this Email of person to notify, because
03:59it makes me think that I want to type here in the Notified space, and if it
04:04makes me think that, it's probably going to bother my users in the same way too.
04:08So I should be typing an email address here and changing this field name
04:11perhaps or not, but not having a tip here that looks really close to this Notified field.
04:17This isn't the first time I've made this mistake filling out the form.
04:20So if I'm having errors, my users are going to have them too.
04:24We'll go back and fix that.
04:25Now I am going to click Save, and here's my new item Order Business Cards is In Progress.
04:31We can take a second and look at the workflow, but check it out, here is the
04:35Card order for Bart Bartlett on its way in. We have received a Card order.
04:40We will send an email to when the order has been completed, so this I am
04:44receiving, this is the notify on completion field that's triggering this, that
04:50says here is the estimated ship date, remember we calculated that, that looks
04:54good, then I will say OK.
04:56Let's go see what else is happening in this workflow.
04:59So the order has been received, and there's been a Task Assigned, well
05:03where would this task be?
05:05Let's go take a look, three different places this task should be.
05:09The first place it should be is it should be in SharePoint, so if we go to the Tasks List,
05:14there is Print Business Cards right here, but because I have connected this Task
05:20List back to Outlook, it should be in my Outlook list too. If it's not right
05:23now, it should be fairly soon.
05:25If we go take a look in my To-do List here in Outlook, it hasn't actually made
05:30it here yet, but there it is.
05:33So there's my Print Business Cards, and if I double-click, notice it says
05:38Review, and it's the first name of the person, I can go look at that and
05:42say I've reviewed it, I have got that, and now it says Open the task to mark the task as completed.
05:48So imagine, I am working on the print shop, I have got a list of my jobs, I have
05:53got the Bart job and the Esperanza job and 12 or 13 different print orders to
05:57do, but as I mark them off, I can go ahead, and I can say, okay, I can Follow Up,
06:02and I can mark this as Complete, that's one way I could do this, or I could go
06:07into my Task List here, and I could Update it, or I could go into Bart, and I
06:14could Update it there in Bart.
06:16So all of these are different choices of how I can do this, but obviously the
06:20easiest way for me to do it is simply to mark that task as Complete in Microsoft Outlook.
06:24Very easy to do, very slick, and now that the task has been completed, the
06:30rest of the workflow can now go on, and notice we are a little bit out of
06:34sync, but that's not unusual. Here finally is the notification that I've been given this new task.
06:39We're seeing this in real-time, normally the printer is someplace else, and they
06:43don't know that they should have gotten this 35 seconds ago.
06:47But that notification will happen, that will allow them to go and review it.
06:51So three different ways, it's on the Task List, in SharePoint, it's on the Task
06:55List for this individual user, and they are going to receive an email from
06:59SharePoint reminding them that there's some work that they have to do and that
07:02when the work is done they should update so that the workflow will know about it and can continue.
Collapse this transcript
11. Creating Easy-to-Maintain Workflows
Using email aliases for easy workflow maintenance
00:00If you're new to SharePoint workflows, it might be hard to imagine the sort of
00:05volume that you'll have to maintain as you have more and more workflows running in your organization.
00:11We have one workflow, and you need to update it frequently, it's usually not
00:14that big of a deal, but when you have 12 workflows or dozens of workflows or
00:19a hundred workflows, and you need to maintain them, you have just created a full-time job.
00:24So from the very beginning I want to encourage you to do the kind of thinking
00:29about workflow creation that would make your workflows very easy to maintain, and
00:33one of those is to make sure that in areas where the business is volatile,
00:38you're not hard-coding things that you will later regret.
00:41An example of that is anyone's email address, for example, here Greg Hurion is
00:47the person who is the contact for the Payroll department.
00:49So we have just put in here email Greg to notify him we have a new employee.
00:54Same thing with Janet, hey!
00:55Send Janet an email, and then send Gini an email, but what happens when any of
01:01these folks get promoted or leave the company or simply decide that it would be
01:06better to have one of their underlings or minions manage all these emails,
01:10rather than doing it themselves?
01:11So what I would like to encourage you to do is to develop email aliases that
01:16you use and never hardcode someone's name in here unless there is absolutely no way around it.
01:23So you are going to be having a really good relationship with your Microsoft
01:26Exchange Administrator, because they are the folks who set up aliases and then
01:29direct them to specific accounts. Let me show you what I mean.
01:32For example, there's normally someone who is in charge of the workflow, it's theirs.
01:38If you're creating a workflow for a business area, it's probably the
01:42person who is in charge of that particular piece of functionality.
01:47So if it's Employee Onboarding, it might be somebody in the Human Resources
01:50Department, if it's something to do with expenses, it's probably somebody in
01:55accounting, but whoever that person is rather than include their email address,
01:59I actually want to set up an email address that would work for them and for
02:03workflow owners so that I can immediately spot those emails to them, what I like
02:08is to set up an alias that starts with a lowercase wfo and then has the name of
02:12the workflow, because they don't own all workflows, they own one.
02:16So, for example, the person in HR who owns Employee Onboarding, I would make
02:21changes only if they asked, might be wfoEmployeeOnboarding@my organization name
02:30So, wfoEmployeeOnboarding@twotreesoliveoil.com.
02:36Then there's somebody whose job is to administer the workflow.
02:38This is typically somebody in your Information Technology department.
02:42If there's a problem with the workflow, they're the folks who are going to
02:45follow up on it and make sure that if it's stopped that it gets restarted.
02:49If it needs some work that they contact the developer and usually those folks
02:54are wfa for Workflow Admin.
02:57If you have one person who is in charge of administering all of your workflows,
03:01and you know it's going to stay that way for a while, you might do simply
03:04wfa@twotreesoliveoil.com, or if you have a few workflows already or have a list
03:12of workflows waiting for you to actually draft them and different people would
03:17administer them, then you would want to do wfa the workflow name, so
03:21wfaEmployeeOnboarding@twotreesoliveoil.com.
03:26This is a conversation in your IT department, because you could always use
03:29wfa@twotreesoliveoil and have that then alias to an entire group.
03:35Workflow developers, wfds. I use this only for testing, wfd is not an ongoing
03:41role, but that means that if you generate an email, and it comes across as wfd,
03:46and you're now actually working on that workflow, that you probably have an
03:50issue somewhere that needs to be resolved.
03:53So I'll usually say wfd, and that's a testing ID.
03:57You could also have wfqa if you have somebody who does a QA role in your
04:01organization for testing, because once you've created your workflows, if they're
04:05reusable, you can move them from your development environment to your QA
04:09environment to your production environment.
04:11So developer and QA roles should have their own email addresses.
04:16And then let's look at what this means then in the business, because these
04:19are the folks who were trying to prevent having lots and lots of emails coded directly to them.
04:23So let's say, for example, we are talking about the Payroll department.
04:27It might be that there's one person who's in charge of getting all of the emails from workflows.
04:32So that would be wfPayroll@twotreesoliveoil.com, our workflow contact, but it
04:39could also be that we're going to have different people for different
04:42workflows, and in that case, you are going to have wf, the name of the workflow,
04:47and the name of the department.
04:48So imagine that we have for a department contact in the Payroll department for
04:53Employee Onboarding, wfEmployeeOnboardingPayroll@twotreesoliveoil.com.
05:01It's a huge email address, but when you have your conversation with your IT
05:06folks who are in charge of your Microsoft Exchange Server or whatever email
05:10server you're using, if you explain to your Exchange Administrator that you're
05:14trying to make workflows that are easy to maintain, despite the fact that you
05:18have people moving from one job to another, and that it will mean that you will
05:22not have to be involving them with setting up new emails all the time, as people
05:28come in and changing the emails that particular people receive, they are usually
05:32fairly receptive to this.
05:33So again, by using these aliases, and I'm now going to use wfoWorkflowName.
05:39Let's go back now and say, okay, instead of emailing Greg Hurion in Payroll then,
05:44what we'd be doing is we'd be saying, well, this is a workflow for Employee
05:49Onboarding, and this is the Payroll person at twotreesoliveoil.com.
06:00Greg for now, but someone else later on, changed so easily simply by letting the
06:05Exchange Administrator know, hey!
06:07That wfEmployeeOnboardingPayroll address now goes to Janet, not to Greg any longer.
06:13This is how you use email aliasing and a system of really smart aliasing to make
06:19sure that you don't have to come back in and modify this workflow every single time personnel change.
Collapse this transcript
Adding a comment
00:00As you're creating your workflow, it's a good idea to add comments about
00:03anything that seems a little bit obtuse.
00:06If you're co-developing with somebody else, this becomes really important, but if
00:09you're called back two years from now to look at a workflow that you created
00:12today, you probably won't remember it, and you'll wish that you had done
00:16something to put notes into it at that time.
00:19So the easy way to do this is to use the action that's called Add a Comment.
00:22If I have a comment that I want to make about the workflow in general, I'll put
00:26a Step in at the very start, and I could call this Notes to Developers.
00:31So that's the place to put general information that I would like every single
00:35person to know who is working on this workflow with me.
00:37What I'll do then is I'll go to Action, and I'll say Add a Comment, and I'm
00:42allowed just to type anything that I would like to type here.
00:45So I can talk about when this workflow was developed, although I've good
00:48information on that someplace else, but I'll put in, for example, that
00:52Originally the business unit requested that we email the new employee, however,
01:04it's possible that they would not yet have an email address.
01:13So there's my comment, when somebody wants to see it, they just click and they
01:17can see the comment, and say oh okay, that's what that's about.
01:20If they want to see it in a whole box, they can click the Builder here and
01:25show the entire string.
01:27Notice also, that because you can use the String Builder for this comment, but
01:30there's no reason you can't add lookups if that would make sense, but the notion
01:35is that any place you put a comment it will show up.
01:38The only folks who can see this comment are folks who have access to SharePoint
01:42Designer and can show the workflow there, or folks who are seeing the workflow
01:47because it's been exported to Visio.
01:49So, this is not normally the place that you would want to put information that
01:53you never wanted anybody else to see, because somebody else could be looking at
01:57this workflow down the line.
01:58But this Action step, which really doesn't take any action of adding a comment, is
02:02your best way to embed information here in the workflow that you want to make
02:07sure doesn't get lost, not a separate Excel document, not a separate Word
02:11document, not even a separate Visio document, but documentation kept here in the
02:16workflow where it's going to be seen by anyone who needs to modify it.
Collapse this transcript
Writing to the workflow log
00:00We're looking at our Order Business Cards workflow.
00:02We're having some issues with it, and we'd like to double check and see how it's working.
00:07This is a real difference between the SharePoint Designer environment and the
00:12Visual Studio environment.
00:14Visual Studio and many other development environments have the ability for you
00:18to step through a process to actually say let me look at step one and see what
00:23happens, step two, and so on.
00:25We don't have that ability here in SharePoint Designer. We don't have a step
00:29through debugger, but we do have the ability to write to a history log so that
00:34we can go back and see what's happening in our workflow.
00:37Please remember that we had the settings for that history out here on our
00:42Settings page--we created them early on--and so now when we go back to
00:46the Editor we can write to that history log, and it's as simple as adding an additional action.
00:53So, if I know, for example, that my workflow is working fine, my Chargebacks
00:56working, my Delivery Dates working, and this Email is actually being received,
01:02but I'm having a problem someplace in here,
01:04what I'll want to do is add some logging that I can use to be able to determine
01:09where I am in the workflow and where it's actually stopping.
01:12So, I'm going to go to the Core Action > Log to History List, and at this point
01:22I'm going to add some message.
01:23So, I might want to add something that ties it back first so I can identify with
01:28which item in the Order Business Cards list it's dealing with.
01:33So I'm going to create a message using the String Builder, and I'm going to say
01:38that my step is Notify Order Received. Okay, but I also want to know what the item is.
01:49So before I have the step even, I'm going to add a lookup from the Current Item
01:54that's going to let me get right back to it, and that is my name, and this is
02:03the end of this particular step, so it would be complete.
02:05So I'm going to log whatever the name of this order for business cards is, Step: Notify Order Received, say OK.
02:13Now if I'm thinking that my problem is someplace right in here, I'm going to go
02:17ahead and send another log entry in exactly the same way.
02:20So Log to History List, log this message, use my Builder, it will grab my
02:27current item's name, say OK, put a dash, because these are going to appear on the
02:34list, so I'd like them to be very, very similar, right?
02:37That way when I sort the list in order, it will work well, and the Step here is Complete Printing.
02:45By logging these items to my workflow history list, I can simulate the kind of
02:49step-by-step debugging that I would have in some other development environments.
02:54So now when I go through, and if I really I'm not certain where I want to look
02:59for problems in a particular workflow, I can go ahead and log after every step,
03:03and it will be really easy then to read the logs and say, yup, the Chargeback
03:07worked, the Delivery Date worked, the Notify Order worked. Oops!
03:11It's stopped here, so my problem is here in this step.
03:15That's the kind of thing you're looking for.
03:16If I know that my issue is in the two calculation steps, then I can just stub a
03:21couple of these different logs in.
03:23In the next movie, I'll show you where to find your logs and how to read them.
Collapse this transcript
Checking workflow logs
00:00There are two different ways that you can see the workflow log in SharePoint.
00:05First is to look at the log from the point of view of a specific item.
00:09I'd like to look at one of these particular expense reports and see what the
00:12history log looks like in a very individual item by item basis.
00:16The other possibility is I want to look at the entire log regardless of
00:20what item it was for.
00:21So let's see both of those ways that we can look at specific items here in our History Log.
00:27First, if I'm looking at item, and I have access to the workflow--that's what
00:32this says, Get ending date and reimbursee workflow--
00:35if I click on the hyperlink for the status, in this case Completed, it will
00:40actually take me to the Workflow Information, and I can see that this has been logged.
00:45This is actually a very readable log entry in the History.
00:48Here is the date and time, here's the type of an item, it was a Comment that
00:52was made by the workflow, so it comes from the System Account, and here's the description.
00:57So that's an easy way to be able to take a look and say ah, that's what was log
01:02for this particular item, and the same thing would be true if I chose, for
01:06example, this other item, and I would see similar information.
01:10What if I want to see the entire log, though? Well, there are couple of possibilities.
01:15The easy way to remember this is first we probably kept the same history log for
01:20all of the workflows on our site, and if we did then I know that its name is Workflow, space, History.
01:26If I provided a different name for it, I'll need to know that name in order to
01:30get to it easily, because the easiest thing to do is for me simply to enter the URL.
01:35For example, our site is https://lynda.hostpilot.com, and all I need to do is
01:44append another /Lists/ and the name of the list to be able to go take a look at it,
01:50so that's very easy. This is my list name, /Lists/Workflow History.
01:55Let's return to SharePoint and simply type lists/workflow history and everything
02:04else will be appended. So here's my workflow history for my site.
02:07And if I take a look, it's a little grizzly, but it's not completely horrible.
02:13Here's who the user was, the Date that it Occurred, the Type of an event, and
02:17you can find information and all these event types on the Microsoft site, and
02:22here's the Description, the workflow was started in this area.
02:26There was a change state.
02:28I can sort all of these, so if I want to sort, for example, by Event Type, I can do that.
02:31I can sort it by one when an item was logged, and if I have specific
02:37things that I logged.
02:38For example, earlier we created messages like waiting on HR, waiting on VP
02:46date, so those items I can actually go in, and I can either search for, because
02:51I can search in these columns, or I can filter based on the column, or I can simply just sort.
02:56So here's my entire log.
02:58As you'll notice, there is a lot of stuff here already.
03:01I have over 30 entries, most of them made by the System Account, but not all of
03:06them, and here are my entries related to that particular extraction that we
03:11were doing out of the file name to show the date and to show who the actual reimbursee was.
03:16So you can find these, and it works pretty well.
03:19If you want to find a particular item in the log, you might want to start with
03:24the item itself first.
03:25So, two approaches, both of them work, one for the entire log, one based on the
03:30individual instance of a workflow tied to that particular item in the list or in a library.
Collapse this transcript
Creating error traps in workflows
00:00Error trapping is a programming discipline that you use to build workflows
00:04that are really strong, and that account for every possibility, even if it should never exist.
00:11This is an example, and it's easy to understand because I'm talking about credit cards.
00:16However, you would never build this application. The laws around credit card
00:21processing are so fierce these days that you are not going to create a credit
00:27card processing application inside of SharePoint.
00:28However, we might want to go take a look and say, you know, is this American
00:33Express MasterCard or Visa for a purpose other than processing?
00:37So here are our three possible credit cards, but the business has just made a
00:42decision to also take Discover cards, and because our workflow was written
00:45when we didn't take Discover cards, we could go a long time allowing people to make free purchases.
00:51There they are using their Discover card, and we don't have a way to process it
00:54because we're processing American Express, MasterCard, Visa, and if it's none
00:59of the above, we just drop out and go on to the next step.
01:02An error trap will allow us to capture the fact that something's happened that
01:07we didn't normally expect.
01:10So in this particular situation when we build this workflow to begin with, and
01:15when you build other workflows that have different conditional possibilities,
01:19one possibility after we read the card type is that it's American Express.
01:23The second possibility is that it's MasterCard, and the third is that it's
01:27a Visa, and we're actually using the conditional If, but inserting this Else If Branch.
01:33So if it's American Express, fine, Else, maybe it's MasterCard, Else, maybe it's
01:40Visa, and that's what we would normally indicate, but the error trap is this
01:45final Else that says none of the above.
01:48And then what I can do here is send an email, for example, to the workflow owner
01:53or the workflow business owner, or if this is during development, to myself.
01:58This is wait a second, we have a problem, because all of a sudden we have cards
02:03coming through, credit card transactions that are none of the above, what do I do now?
02:07And that's just really easy. And then in the last Else, I'll just send an email,
02:12and I'll send email with the Subject like Credit Card Workflow ERROR!!!
02:18Sometimes I'll put in the Text of the message, you should never see this email
02:25because it means there's an error.
02:31We have received a credit card transaction that is not Amex, MasterCard or Visa.
02:42And then I can provide some information with an absolute URL, a title,
02:46any information I want.
02:48So what I'm doing is I'm building it ahead of time--and again, you'll do this
02:52after you've had the error, you want to do this preemptively before.
02:55This should be the entire universe of all the credit cards we accept, and if
02:59something else got through to here, we have an issue.
03:03Now how would we stop stuff from getting through to here?
03:05Well, we would have a form with a dropdown on it with three possibilities,
03:09American Express, MasterCard, and Visa, but you might imagine then that while we
03:12are in the process of updating our application, updating our workflow and forms,
03:18that we could get into a position where the forms updated to include Discover,
03:21and we have not remembered to update the workflow.
03:25So error trapping allows us to grab possible errors, things that fall outside of
03:31the universe of what's anticipated and allowed in a workflow.
03:35You will use this If condition, along with Else If Branching to build most of
03:40your error traps, and they will look just like this.
Collapse this transcript
Modifying existing workflows
00:00SharePoint makes it really easy to modify workflows, because it's not unusual
00:05to need to modify one.
00:06For example, the needs of the business might change, and that would generate a
00:10request for a change, but it's also true that the imagination of what's
00:14possible in workflows grows the longer folks are using SharePoint Workflows that you create.
00:21So throughout this course we've been opening up workflows, making some
00:25modifications, and re-saving and republishing them, and remember that each time
00:30we do that, every time we publish a new workflow, which is when we re-associate it
00:35with the List or Library that it was created for, each time we do that a new
00:39version of that workflow is created.
00:41Any instances of the workflow that were previously created with items in the
00:45List or Library continue with the version that they were already using.
00:50And any new items that are created, any new instances of the workflow are
00:54created using the newly-published, newly-modified workflow.
00:58So all of that works fine, I do however, need to show you that there's a
01:02possibility that you can make a modification that's a little problematic and
01:06what you might want to know about that.
01:09If you use some specific actions, for example, Log History List or the Task
01:16Actions, Assign it To-do item, Collect Data from User, these actions have something in common.
01:22They write to other lists that are kept on the site, and so when we go back and
01:28take a look at the settings for this workflow, you'll find a Task List and a
01:33History List that we created very early on.
01:37Once we are actually creating Tasks or writing to the History List, it is
01:41problematic for us simply to go in and to change this to a different Task List
01:45or a different History List.
01:47If we need to do that, and there may be compelling reasons to do so, then we
01:52need to be able to go back in and modify the association of these lists to the workflow.
01:58So if you need to do it, fine, but don't change the Task List or Workflow History List casually.
02:04And if you need to change either of these lists, let me show you where you'll
02:08find some additional information on how you'll need to re-associate these with your workflow.
02:14So I've gone to the Microsoft site just because I know that the document I'm
02:18looking for is here, and I'm going to use the search and search for modify a workflow association.
02:25You'll notice that the very first article here is on Modify workflow
02:29associations, as is the second, it's the same article.
02:32And just click, and you will actually find all the information you need to be
02:36able to re-associate Task List and History List back to the Workflow.
02:40Just scroll down, and you'll find lots of information about how to do that.
02:45So don't change these casually. These are really the only two things that you
02:49can modify in a workflow that are going to create significant problems for you.
02:53Other than that, modify away.
02:55If you have a question about your modification, don't be afraid to save it.
02:59Do some additional research and make sure you've got all of your modifications
03:03made before you Publish and generate that new version associated with a List or Library.
Collapse this transcript
Removing workflow instances
00:00With SharePoint Designer I can go in and edit a workflow anytime I need to.
00:04It's really easy, just open up Designer, click on Workflows.
00:07Let's say, for example, I want to change this workflow, I can go ahead and make
00:11sure I am in the right place. Here's my overall settings, click Edit Workflow,
00:16makes and changes, Save and Publish again, easy enough to do.
00:20Every single time I do this SharePoint creates a new version of this workflow.
00:25Because it's possible that during the time I have this workflow open working on
00:29it, somebody actually goes in and says here's another new hire, and the
00:33workflow that they use will be the old one, the one that was open already for me
00:38to work with until I Save and Publish this again. All the time I am sitting,
00:43having this opened, adding some Actions, changing some steps, it's possible that
00:47somebody could be creating a new workflow.
00:49So as soon as I open it up, here's a new version that gets created.
00:53What do I do with all of these?
00:55Well, I can ignore them, but I probably shouldn't.
00:57Let's go over and take a look and see how we're going to get to those
01:01workflows and manage them.
01:02So I'm going to go back over to the list in SharePoint. There are a variety of
01:07ways that I could do this.
01:08I can go to SharePoint, or if I am in Designer, I can actually go to my Lists and
01:13Libraries, and I could open up my Employee Onboarding.
01:15And I could go to the List, but I prefer keeping SharePoint Designer and
01:19SharePoint both open.
01:21Once I'm in the Library on the Ribbon I can click List, Workflow settings, and
01:28I'll see that I actually have 4 different versions of Employee Onboarding.
01:32Now one of them won't have any other information associated with it.
01:36It doesn't say current version, but it doesn't say previous version either.
01:40So this is the one that's current. If I just Saved and Published, this is it.
01:45These are all prior instances. You'll notice that the very first version, there
01:50are actually no workflows associated with that.
01:52I created it and saved it, but that wouldn't have gotten it here.
01:56I published it, and it was added, but nobody hired a new person during the time
02:01that that was the current version.
02:03However, as soon as we fired up the next version, we had somebody who was added
02:09and these workflows are actually in progress, they're not done.
02:12If they were completed, it would show zero here.
02:15So we have a workflow that was underway and a set of rules that were
02:19created for that workflow.
02:21You might remember that early in this workflow we didn't notify the local
02:25manager when we had hired somebody, so these older ones still won't do that.
02:30Even though there's a new workflow, there's nothing that takes and routes this
02:34old document through the new workflow.
02:36Imagine that you're standing on the top of a hill and every time there's a new
02:41workflow you've got a kid on a sled or a wagon, and you shove him down the hill.
02:45The fact that you're going to shove the next kid in a different direction does
02:49nothing to change the wagon or sled that's already flying down the hell.
02:52It's got a course, it's good to get there, it'll run into a tree or have a happy
02:57ending, it doesn't matter, it's gone, but even though you can't change the old
03:01ones, you can say we're not going to use these anymore.
03:03I'm not going to a use that path that ends up with a small child wrapped
03:07around a tree any longer.
03:09So we can go back, and we can get rid of these workflows.
03:12Just choose remove workflow, and you're going to see this new window that's
03:15going to show all of those different items and how many instances of workflow we have.
03:19So this one, for example, these are old, and as soon as a workflow is old--there
03:23is only one current workflow--every other workflow is marked No New Instances.
03:27In other words, when I add a new employee to be Onboarding list, these
03:32Instances, these old workflows won't be used, this is the only one that will be used.
03:37But as soon as the Instances go to 0, I'm smart just to go in and to choose that
03:42particular workflow and say, hey, it doesn't own any New Instances, and it has
03:46no old instances, no current sleds or wagons running down the hill.
03:51I'm going to get rid of it and say OK.
03:53Notice now that the only workflows I have left are workflows that actually have
03:58specific instances, folks that are already on their way down the hill, and that
04:02every new workflow will be assigned to this one that is not a previous version.
04:07No matter how many workflows you have, it's a good idea when you've made changes
04:11to workflows to go back and to get rid of any old workflows that have no Instances.
04:15It's simply part of keeping your server cleaned up.
04:19But it also makes it really clear, if you have a very old workflow that has an
04:23instance that you probably have something that didn't track all the way through
04:26to completion, which might be an issue for the business.
Collapse this transcript
Terminating a workflow instance
00:00From time to time you may have to terminate a workflow.
00:03Typically what happens is you're doing some testing, and these are test employees
00:08that we've put in, and we didn't complete the workflow yet, we just use them as
00:12a learning experience, and now we'd like to end these workflow so they don't
00:16sit here In Progress forever.
00:18The best way to end a workflow is to go to the Instance, the List Item or the
00:23Document, click the down arrow and choose Workflows, and you'll actually see the
00:28Running Workflows and the Completed Workflows.
00:30So in this case, there are two workflows running on this particular employee,
00:35and I'm going to just click one of them, and I'm going to click Terminate this workflow now.
00:41Notice that if they were tasks previously created, they're gone, and there's no way to undo this.
00:47So I really want to know that I'm terminating the workflow for sure, and now I
00:52can go back, and I'm going to Refresh this and notice that that second workflow
00:58actually completed, but the way it completed was it canceled.
01:02I can now remove the other workflow if I wish, really the same workflow, two
01:06different instances of it that were created while testing, and now this Workflow
01:12History is the workflow was canceled by me. Excellent!
01:16So let's go back, and when I go take a look now at these workflows, I'll find
01:24that there aren't any that are incomplete.
01:27If I wanted to, I could now start the workflow again, bearing in mind that this
01:31workflow may actually not be designed in such a way that starting it once the
01:36item exists is a good idea, but you can always start that workflow manually, if
01:40I've allowed for that in my settings.
01:43So it's very easy to terminate workflows, impossible to undo that
01:48termination, and they're always logged by SharePoint, so you know what happened to each workflow.
Collapse this transcript
12. Creating Reusable Workflows
Creating a reusable workflow
00:00I touched on Reusable Workflows earlier in the course, but I want to spend a
00:04little time digging into them a little bit more deeply because there are new
00:07feature of SharePoint 2010 and incredibly useful.
00:11In earlier versions of SharePoint, if I had a workflow that I wanted to use on
00:15more than one list, I really either needed to use Visual Studio to do it, or I
00:21needed to do some research and download a pretty long article from the Microsoft
00:26site about how to take a workflow and attach it to a different list and change
00:30its GUIDs and things like that.
00:33If I have a workflow that I know I want to use in multiple places in SharePoint
00:372010, I just create it as a Reusable Workflow. One of two types of workflows that
00:43aren't, to begin with, attached to a specific list.
00:46So I'm going to create a new Reusable Workflow. And the Name that I'm going to give
00:52to this workflow is really pretty easy, because what we're going to do here is
00:56we're going to Email a Submitter.
00:58So Send a confirmation email to the submitter of the current item.
01:09I could use this in a million places.
01:11I would write it over and over and over again, it is the first step in a
01:15workflow, so why not simply create it once and for all, and literally for all,
01:20all Lists, all Libraries.
01:21Now I can tie this to a particular content type if I wish.
01:26This doesn't make sense in this instance because I'm not going to just use it
01:29on documents, and I'm not going to just use it on items, I'm going to use it
01:33very globally, but it's possible that I would want to create a workflow that
01:37tied to a particular content type.
01:39And we're going to talk about that in a later movie, but right now I'm just
01:43going to leave it set for All and click OK.
01:46And then you know Step 1 is simply going to be to Email submitter, it's a single
01:52step workflow, not a problem.
01:55So Action > Send an Email, Email these users and go get them.
02:02So workflow Lookup for User.
02:05The Current Item is always going to have someone who it was Created by, so
02:09this will work, but I want you to look at how paltry this list is of items
02:14that are available always.
02:16These are the only fields that we know are available in every single item and document.
02:21What its content type is, who Created it, and When, its ID that's assigned by SharePoint.
02:27If it has been Modified, who Modified, and when, and a Title, that's it.
02:31Other than that we can't make any assumptions about the kinds of fields that are
02:36available, that's an important thing to remember when we're working with
02:40Reusable Workflows, because if we need to be able to have fields at our
02:45disposal, we're going to have to find a way to connect to them.
02:48But right now Created by is going to work well for us, we would do everything
02:52else to address this email, New Item or document, for example, and then all of
02:57our text, and you know how to do all of this to Email a Submitter.
03:01So, here's our workflow, I'm going to go ahead and save it, and we have a
03:06Reusable Workflow available for any List, or Library, as soon as I publish it.
03:14Now in any list, or library, that I wish, I can go ahead and connect back to
03:19this Email Submitter workflow, that's how easy it is to create a basic Reusable Workflow.
03:24In the next movies we have a little more flavor that we will add to this process.
Collapse this transcript
Assigning association columns to a reusable workflow
00:00The Reusable Workflow we just created only uses a couple of columns that are
00:04available everywhere. They're available anytime you have a new document, or a new item.
00:10But often you'll want to create a workflow that actually needs to store some
00:14information in a column, and you want to make sure that that column appears in
00:19the list, or in the library, that you're attaching this workflow to.
00:23So, two ways you can think about doing this.
00:26One way is to create a Content Type. That's a group of columns together that
00:32underlie a particular list or many lists.
00:36For example, there's a group of columns under the Content Type for Contact, and
00:41if we go take a look at that you'll see many familiar columns that you're used
00:46to seeing in contact lists.
00:48So every contact list that's built using the Contact List Content Type has all
00:53of these columns in it. So that's one possibility.
00:56Another possibility though is that you don't necessarily need to have a whole
01:00lot of columns and the columns that you need don't constitute an entire type,
01:05like an entire contact, they're just a couple columns that you need to have every
01:09time this workflow runs because it requires them.
01:12So in that case, our other choice is called, Association columns. If you associate
01:18a column with the Reusable Workflow, then when we add that workflow to a List,
01:22or Library, the Associated columns are automatically also added to the List, or
01:27Library. So let's see how we would Associate columns with this workflow.
01:32Specifically the column I'm looking for is a column that will include category,
01:37because we want to categorize all of the items that are submitted, and when we
01:41provide the feedback that says, hey, we get your document or we got your item,
01:46we're also going to say, and we put it in this category. So let's just go
01:49associate that with the reusable workflow and then obviously we would add some
01:53other steps to assign a category based on a number of different criteria, or
01:58perhaps, we would have a human do that, and we would ask them to make that
02:02decision, but let's go ahead and choose Association columns.
02:05Every time you click that button, you're going to get this warning that looks
02:09really dire, it says if you change these Association columns for the workflow,
02:13then new instances of the existing associations might not work.
02:17That's actually true, but it's not a problem, and we're going to see this
02:21every single time we click the button. And now what we're going to do is select the column.
02:26Now there's two ways we can choose a column.
02:28There is that entire bank of columns that sits underneath the existing Content
02:33Types that I just showed you. And my first choice for you will always be to go
02:37look at the site columns and see if the column we want already exists. And the
02:42reason for that is you don't need to have two different fields, one called first
02:47space name, and the other called first name with no space because you didn't
02:51bother to check, or more likely, someone else didn't bother to check.
02:55They just went, oh, I need a new column. Let's make one.
02:58So, we'd like to use the site columns as much as we can because if we have a
03:02site column, then we can build business requirements into that site column.
03:05For example, if we have an employee ID that has a particular pattern, we'll
03:09create that as a site column once, use it over and over again, and if we change
03:13our formatting for employee ID, we change it in just one place, so there's real
03:17power to these site columns.
03:18Think of them as global site columns, and I'm looking for category, and I
03:23actually find the category field appears a couple of times, one is a Base column
03:28and one as a Core Document column.
03:31I'm just going to go ahead and choose Category because it singular and say OK.
03:36And I have now added the Category Association here to this workflow.
03:41If I want to remove a category, I can remove it from here.
03:44Removing it will still leave it in the list and so I might need to go do some
03:49cleanup, and I'll be prompted to do that, but this is all good, I have this
03:53extra column that I need and later on when I associate my Email Submitter
03:58Reusable Workflow with a particular List, or Library, it will automatically get
04:03an instance of the Category column added to that List, or Library.
04:08That's how Association columns work. OK, Save, Publish, and we're all done.
Collapse this transcript
Creating a custom content type for a workflow
00:00The other way that I can guarantee that all of the columns of data necessary to
00:04support a reusable workflow are present is to create a Content Type, and then tie
00:10my Reusable Workflow to that Content Type.
00:13I'd like to create a workflow that we can tie as part of our new hire process.
00:18That after we've onboarded somebody back in the HR department, they can set
00:22up the 30 day, 90 day, and 180 day evaluations for this employee as soon as we've hired them.
00:29We know it needs to be done, we can start our clock ticking, and this workflow
00:33can do all of the things that we need to do.
00:35So I want to create a reusable workflow that can be used by anybody who's hiring
00:41folks, even for vendors or for contractors, we don't necessarily need to do this
00:46only with employees.
00:47But in order to do this I need to have some information.
00:50Now I would always first go to Content Types and go take a look, but the Content
00:54Type that's here that's the person Contact type.
00:59There is Contact, and there is East Asia Contact, and they both have really
01:02similar information in their Content Types.
01:05They have Last Names and First Names, all of the things that you expect in an
01:09Outlook contact, but they don't have something that we need, and that is we need
01:12to be able to capture the hire date.
01:14So I am going to show you how to create your own custom Content Type that we can
01:18then use with a workflow for employees.
01:21So we are going to create our Basic Employee Content Type.
01:25So we've clicked Content Type here under Site Objects, clicked New Content Type,
01:30and we're going to call this Employee.
01:31And if we look at the Descriptions for these, it's like, Create a new basic
01:37page, Fill out this form, Create a link, and so on.
01:42So that is the type of Description, so this is Enter information about an
01:48employee, that kind of fits.
01:51Now what we want to do is select parent content types.
01:56So there are groups, notice Custom Content Types, Document Content Types,
02:00Folder Content Types, I'm actually going to use the Contact Content Type as my starter for this.
02:07So that is part of the list Content Types.
02:12Now if I didn't know that I could have scrolled the list that you see here and
02:16found it, but it's not a document, it's not a folder, and it's not a group, and
02:21list is just about everything that's not a document actually.
02:24Because, look at all the lists, these are the things that you're used to working
02:28with here in SharePoint Designer.
02:30So there's my Contact, and then it says. Where should it keep this? Where
02:34should it sort it into?
02:35Well I could make a case, actually, for putting this down where we found it
02:39just now, which is under the list Content Types, it makes it sort of
02:43traditional and hierarchy.
02:45I could make a case for that, I am going to keep it under Custom for right now.
02:48And I could also set up a New group, and this is an unusual that would be named
02:53for my organization.
02:54Here are the Two Trees Olive Oil Content Types, they are different than
02:57everybody else's, and we could put our own Custom Types there instead of
03:00putting them with these.
03:02You might wonder how these Custom Content Types got here because we haven't
03:06created them before. And the answer is they've been created for us by SharePoint
03:11whenever we've gone in and said, well let's create a workflow, but it needs a
03:14particular column there.
03:16So I don't necessarily want the things I create intentionally to be here, I've
03:20just talked to myself into creating a new group.
03:22So here are the Two Trees Olive Oil Content Types that we created intentionally
03:29exactly like I am going to show you right now, that'll work.
03:33Where will I find these? The answer would be, in alphabetical order, and T comes last.
03:37So let's go open up the Employee type and edit the Content Type columns.
03:42And here are all the columns that I got because I based this on Contact, they're all here.
03:48But I need to be able to add a hire date.
03:51This is the part that feels a little difficult because I'm not allowed just to
03:54add a free form anything.
03:56If I want to add a column, it needs to exist in the collection of site columns.
04:01If I click and say, well, let me look for something like a hire date, you'll
04:06find that it's not there, there's no hire date, there is no onboarding date.
04:10So the answer here isn't to give up, the answer is to go add a new Site column.
04:15So let's go to Site columns and create a New column, and you click the
04:19dropdown, and it asks you what type of data we will have, and this is going to
04:23be a Date & Time column.
04:24And this Date & Time column is going to be called Hire Date, and this is going
04:29to be an employee, contractor, or supplier.
04:34And so with an employee, we call that a hire date, or a contractor or
04:40supplier, start up date. Now it's asking where we want to find it?
04:48Well, here's the Core Contact and Calendar items, and that's exactly where I'd like it to be.
04:53I could also choose to create a New group that was Two Trees Olive Oil columns,
04:59but I don't feel a need to do that.
05:01This system of sorting works really well for me, combined with the ability to search.
05:05So let's just go ahead and say OK, and notice here's our new Hire Date column.
05:10Now that it exists in the site collection I can use it, but first notice here's
05:14the asterisk that shows me I haven't saved my work yet, let's go ahead and
05:18save, and that's what we'll get it saved to the Site columns collection.
05:22Now I am going to click on my Employee tab so I can edit that.
05:26I'm going to Add an Existing Site column, and this time when I search for the
05:30word hire, there it is, and I can go ahead and add this.
05:34In a similar way I could add any other column that I need to have present in
05:38this particular Content Type, and I can also remove things if I don't want them.
05:43I don't have a need, for example, to have an employee web page.
05:47I don't necessarily have a need to have some of these other fields.
05:50But when I have my Employee all set up the way I would like to have it set up,
05:56that looks pretty good here, I am going to go ahead then and save this. And now I've
06:01created a new Employee Content Type that is going to be available any time that
06:05I want to have all of those fields together, to create a List, or a Library. or to
06:11support a Reusable Workflow.
Collapse this transcript
Associating a reusable workflow or content type with a list
00:00So now we have a workflow based on a Content Type, and we want to connect those
00:05to a Library, or a List. And I already created a list called Employee Review.
00:11So there are a couple of things that we need to do, first we need to make sure
00:16that this list Allows management of content types because we're going to use
00:19a new content type.
00:20So scroll down to the bottom of Employee Review, here in SharePoint Designer on
00:25its Settings page, And let's go ahead and Allow management of content types, and
00:29let's go ahead and save that, so it knows that it allows management.
00:33Now I am going go to go ahead and close this, and I'm going to go to my
00:38Content Types, and go down to Employee content type, and I'm going to apply this to a list.
00:46And the list I'm going to apply it to is that Employee Review list, and click OK.
00:51Now it looks like nothing happened, but if we go back to our list now, and
00:56we take a look at our Employee Review, and we scroll down, we'll find that
01:03the Employee content type has actually been added here. So it's now
01:07available to this list.
01:09But so is Item, and if we skip over to SharePoint for a moment, you'll see
01:13what this looks like.
01:15So here's Employee Review, and if I say I want to add a new item, it will take a
01:20second and try to figure out what it should use, and it says, "Oh well, let's
01:24just use that Title thing." I don't want that.
01:26If I went to Items on the list, and I chose New Item, I'd have two choices, a
01:31new list item, which has one field in it, or new Employee, which is what I'd like to have.
01:36So effectively what I need to do here is I need to say, you know what, I don't
01:38want to create just the plain old list items anymore.
01:40You might wonder, why does it allow both of these?
01:43Well, there's some really good reason for that.
01:45A list, or library, isn't constrained to only one type of information.
01:50So let's imagine, for example, that we have a library. And we want to keep
01:55different metadata, based on whether we are putting documents or images or
01:59media files in there.
02:00So we could actually have three content types, document content type, image
02:03content type, picture content type, and a media content type. And we could use
02:08them all, and then when somebody is putting a new image in they would choose one
02:11kind of new item, if they were choosing a document, another.
02:14So that's what's being allowed here.
02:16But in this case, we have no desire to have people dropping these simple items
02:20with one field in them, into this list.
02:22So there are a couple of different places that we can take care of this, but
02:26I'm going to prefer to return to SharePoint Designer. And here we have this Item
02:30as a Content Type that's allowed in our Employer Review list, and I'm simply
02:34going to delete it.
02:37And I'm going to go ahead then and say this looks pretty good to me, I'm happy,
02:41because the only type that would now be allowed in is Employee.
02:46I can also create folders there, and I can only do that when I have an explorer
02:49type view open. Notice that it doesn't show up on the menu, and Employee is now
02:53the default setting, and the only thing that we can create in this library.
02:58So now what I'd like to do is I'd like to hook up my workflow to the library.
03:02I've put the control type in there, that's good, and we're going to choose our
03:06Schedule New Employees Review Reusable workflow.
03:09Remember that I can't assign any of my list flows to other lists.
03:13If I choose one of these, my associate choices are gone.
03:16But I'm down here on Schedule New Employees Review, and this is already
03:20Associated to the Content Type Employee.
03:24What I want to do is associate it to the Employee Review list.
03:27Here I am over in SharePoint adding a workflow. So Content Type, Run it on All types of items.
03:34Well, there is only one item type left here anymore, but that might not always
03:38be true, I am going go to tie this to Employee.
03:40Notice that I have different workflow templates, these are my reusable
03:43workflows that are allowed to be used here, and I'm going to choose Schedule
03:47New Employee Reviews.
03:48That is the global name, but I need to enter a specific name, it could be
03:53the same if I wish.
03:54If this were, for example, one department I might be saying Schedule New
03:59Production Employee Review, Schedule New Warehouse Employee Reviews.
04:03But I'm just going to say Schedule New Empl Reviews.
04:07And then it says, if this workflow uses Tasks, what list will we use? And you'll
04:12remember that these are settings we talked about earlier.
04:14It's good to share a common Task List, and it's not bad to share a
04:17common Workflow History.
04:18And then finally, we'll need to set the Start Options for this workflow in
04:23this particular library.
04:25And I actually want this workflow to start every time a new Employee Review item is created.
04:30So as soon as I add an employee over here, whether somebody types them in, or I
04:35create this employee by using information that I have in my on boarding
04:39workflow, and I throw it over the wall here, however it's created, that's when
04:43I want this to actually start running.
04:45I am going to go ahead and say OK, and I now have Schedule New Employee--E-M-P-L--
04:51Reviews, that's the local name of this workflow that I've created, connected to this library.
04:56So there are all the parts and pieces.
04:58Whether I'm using a Reusable Workflow with Association columns, or I am using a
05:03Reusable Workflow tied to a Content Type, I have to tie the workflow at least
05:08with a Content Type, the Content Type as well, and I'm going to do that in
05:12SharePoint Designer by saying that I want to Associate.
05:15I'm associating workflows to Content Types, workflows to Lists and Libraries,
05:20Content Types to Lists and Libraries.
05:22This entire process has lots of parts and pieces, but when you've done it a few
05:27times you're going to get really used to doing it.
05:29The best advice I have for you is as you're doing anything down here in
05:33SharePoint Designer, each time go back up and save it.
05:36Most of the issues that I've faced are because I forget to save, for example,
05:40an Association to a Content Type, and then I have problems trying to use that in a Library.
05:45But Associations with Reusability allow us to create powerful, powerful
05:50workflows and use them over and over and over again in different settings in our site.
Collapse this transcript
Creating a site workflow
00:00The last new workflow we are going to create is a Site Workflow, and this is a
00:04new workflow type for SharePoint 2010.
00:07The List Workflow and Reusable Workflows have to be connected to a specific list, or library.
00:14Even the Reusable ones sits there waiting for you to hook it up to associate it.
00:18But a site workflow is independent of lists and libraries.
00:23And therefore we can use a site workflow for a workflow that really only has an
00:28initiation form with the user and then goes and does some work, and it's done,
00:32or a site workflow can cross libraries and lists.
00:36You could have a site workflow that you could point and have it look at
00:40various lists in your site. So let's see how to Create a New Site Workflow.
00:46First, we'll need to give it a name. And what we're going to do, in this
00:49particular workflow, is we are going to make it really easy for a user to drop a
00:55suggestion off to a department. Probably too easy, they'll be suggesting all
00:59kinds of things, but this is the new employee suggestion box, and we want to be
01:04able to launch this from anywhere. We don't want people to have to go to a
01:08particular library, so we're just going to create this as an example.
01:14Gather suggestion info and email to the Suggestion Diva in our organization.
01:23Let's go ahead and say OK.
01:25Now, we don't have a regular library, or list, for this to hang off of, and so
01:30what we're going to do is we're actually going to grab some information and put
01:35that in Initiation Form Parameters.
01:37I want to slide over here, for just a second, out of the editor and take a look.
01:41And as soon as I save this workflow, even with nothing in it, if we
01:45just save this, we'll have the ability then to go and to add some initiation
01:50form parameters that are going to be shown on a form that's going to create right down here.
01:55So what I'm going to do is I am going to say that we want their suggestion text.
01:59And I could do a Single line of text, here is that short list of object types,
02:03but I am going to give them Multiple lines of text, and I'm not going to
02:07provide a default value.
02:08This is an interesting choice here, Append Changes to Existing Text, which would
02:12actually allow me, for example, to keep a running list.
02:16You'll see this in discussion items where one person adds more to the list item
02:20that's already there.
02:21And how many lines I want them to have to begin with, not a big deal, 6 sounds
02:26good, I am going to go ahead and click Finish.
02:28And I might want to ask something else like here's the suggestion, I might ask
02:32who they believe the suggestion should be sent to?
02:35So let's just go ahead and add another initiation field, and we'll say Recipient.
02:41And notice that I could drive a choice menu out of here if I want to, but I
02:46am just going to ask somebody who they think would best benefit from having this information.
02:50And there's no Default value, and I'm just going to click Finish.
02:53So there are my two and initiation form parameters, and I am going to say OK.
02:57These are like local variables, but it's also, make sure that these variables
03:02are placed on the form. Let's go ahead and say OK and edit our workflow.
03:06So the first thing that I'm going to do is I'm going to Send an Email.
03:12And the Action here will be Send an Email, Email these users, and I am going to
03:18Email this to suggestions@twotreesoliveoil.com.
03:23While I'm working on this, I might want to copy myself, because I'm testing.
03:31I love it when I can have my IT folks set up a couple of test accounts, test
03:35user one, test user two that they put in mailboxes I can then open those
03:39mailboxes in Outlook and make sure all these things are working right.
03:42And so we have an item coming in here with a New Suggestion, and we might as
03:51well go ahead and put the username here, that would be the Current User, New
04:00Suggestion from Current User.
04:02And then in my body of my document I can say, You've received a new suggestion,
04:09and I can insert some information about that new suggestion and my Data source
04:14here would be in my Workflow Variables, so there's my SuggestionText.
04:21Then I can say that the Current User, we grab their information up here as well.
04:25So remember all I have are variables in a context here, there's no form there's
04:29no library, so you are pretty limited about the places you need to look in order
04:34to find what it is you're looking for.
04:37So the Current User listed, we'll go grab our Recipient, that again comes out of
04:43the variables as the best recipient for this suggestion.
04:52So the same kind of thing that we would do if we were grabbing information
04:56out of a task, if we were using collect info from user action, if we were
05:02taking data that had been submitted in a list and using it, but when we're
05:06creating this site workflow, we don't have a permanent resting place for any
05:11of this information, it's actually only existing during the time that the
05:15workflow was running. So let's go ahead and say OK.
05:18That works well, I want to check my workflow for errors, there aren't any, let's
05:24Save, and let's Publish.
05:28And if I look at my Workflows now, there's my new site workflow.
05:33Where will I find it in my site? Well, let's slide over to SharePoint.
05:37So let's go take a look and find our workflow.
05:40We'll actually find it under All Site Content, so we can either scroll to the
05:44bottom and go to All Site Content--it's probably the easiest way--and at the top
05:49of that list here's our listing of Site Workflows.
05:52It's the only place you're going to find it right now.
05:54And there is my Employee Suggestion along with my description of it.
05:57I am going to go ahead and click Employee Suggestion, there is my
06:01SuggestionText, and I am going to say Frozen yogurt on Thursdays, and I actually
06:09think that the person in charge of Facilities would be best.
06:12Not really I know his name, maybe it's Joe. I don't remember, is Joe in Facilities?
06:17Mary Anne, can't remember, somebody is in Facilities, and let's go ahead and Start this.
06:22Now it takes a second for that workflow to process and sometimes there's even
06:26more of a delay and the user will click a couple of times.
06:28But notice that our workflow has run, and it's completed, it's all done.
06:33So if I were to go check my email, which I am going to do, and I am going to
06:40force it to go get my email for me, and there we go. New suggestion, Frozen
06:45yogurt on Thursdays.
06:46The user listed Facilities is the best recipient for this suggestion.
06:51So the date has no place within this email, but it's great to have captured it.
06:55If I wish, I could actually copy this shortcut, and I can put it somewhere else
07:01on my site to run this, it's a valid shortcut for me to use someplace else.
07:08Notice it goes immediately here to the form.
07:10So I don't have to direct my users to All Site Content to get to it, this is a
07:15really great way to create a simple form, to grab something and then post a
07:20link on the homepage in SharePoint or someplace specific that's going to be easy to get to.
07:26Real minimal effort to create a small workflow along with a form and
07:31application, so, welcome to Site Workflows, find a lot of great uses for these.
Collapse this transcript
13. Using Visio Premium 2010 for Visual Workflow Design
Exporting SharePoint Designer workflows into Visio
00:00One of the real shortcomings of SharePoint Designer 2007, in my opinion, was the
00:05inability to really do good documentation for workflows.
00:08Lots of the users in the business are happy with reading this type of a thing,
00:13but if you take a look, you don't have the ability to print.
00:16And so, how do I provide information here?
00:20What I've done, in many cases, is I've actually taken a screen scraper tool, a
00:25snipping tool, and taken pictures of each step and pasted them into Word
00:28documents and annotated them.
00:30With SharePoint Designer 2010, I have the ability to export my workflow to
00:35Visio, and that has made all the difference.
00:38All I need to do in SharePoint Designer is open my workflow and then
00:42choose Export to Visio.
00:43The name of the workflow is used as the file name and the type of file it
00:47creates is called the Visio Workflow Interchange File.
00:50I don't really have any other choice here, so there's no reason to worry about it.
00:54I am going to go ahead and click Save, and that interchange file has now been created.
00:58That's the easy part.
00:59Now I need to go open it up in Visio, and that's not a lot harder.
01:03So here I am in Visio Premium 2010, and I say premium not because I want to
01:08upsell you, but because if you don't have Microsoft SharePoint Workflow as one of
01:13your choices when you choose Flowchart, like this, you're not in Premium, or
01:18you're not in 2010, and you won't be able to do this.
01:21But check this out.
01:23I am going to open a new Microsoft SharePoint Workflow. Here it is.
01:27Here are my workflow actions, and I can now go to Process and Import my workflow
01:34that I created in SharePoint Designer.
01:36And this to me is worth the price of admission because now I don't have to copy
01:41and paste out of any window, I get a really nice representation of my workflow.
01:48So let's zoom in a little bit, and take a look because this did a beautiful job.
01:54So here we have Processes, we're waiting for items to change.
01:57Look at that little clock, all of my users are going to understand that.
02:00They're going to understand, Send an email with a little email attachment, and Stop.
02:05But Visio is using the proper symbology for my IT people to be happy too.
02:10This is a process, this is decision, or in workflow terms, this is an action,
02:16this is a condition.
02:17So every place that I have multiple choice, notice that we have a condition
02:22going into actions if it's yes, and not, if it's no.
02:25So, what a beautiful thing this is that I have a great flowchart that I created
02:31with just a small number of clicks.
02:33I can take this apart and use it in a PowerPoint Presentation, I can print this
02:37and talk with users about it, I can post it on the wall of my cubicle, and it
02:41represents such a major step forward in documentation.
02:44I'm thrilled with this new feature of SharePoint Designer 2010, and I use it all the time.
Collapse this transcript
Using the SharePoint workflow template to design a workflow
00:00If you have Visio 2010 Premium, you can create your Microsoft SharePoint
00:04Workflows here in Visio, and then import them into SharePoint Designer.
00:10Now, there are number of different workflow templates in Visio, but the only one
00:14that you can use for this is the Microsoft SharePoint Workflow.
00:18Also, there's no way to update something to SharePoint Workflow.
00:22So, if someone has created a basic workflow, you can't automatically turn
00:26it into a Microsoft SharePoint workflow, you have to start intentionally right here.
00:30I am going to double-click, and I have several different sets of shapes
00:35that have been put together, one of Actions, one of Conditions, and one of Terminators.
00:41If you're used to using Visio, you might want to add some more shapes, say I'd
00:46like to look for some Engineering Shapes and add them or draw with other items.
00:50But you can't do that and import them into SharePoint.
00:54These are the three groups of shapes that you can use.
00:57A couple of other caveats, every single possible action and condition is
01:01here, even if it's not supported in the library you would put it in, even if
01:06it can only be used in SharePoint Enterprise Server, and you have SharePoint Foundation.
01:11So, when you're taking a look at the Actions, you need to be responsible to know
01:16which ones of these will work in your context.
01:19It is possible in Visio, actually pretty easy, to create a new set of shapes, for
01:23example, my SharePoint Workflow Shapes, or my SharePoint Workflow Actions, and
01:28drag some of these into that stencil so that you have a subset that you would
01:32use rather than using the entire set of shapes.
01:35If you'd like to learn more about customizing the Visio 2010 environment to
01:40create SharePoint Workflows, take a look at the Visio 2010 Essentials course in
01:46the lynda.com online training library. Let's go ahead and create our own workflow.
01:51Every Workflow in SharePoint has to start with a Start, and end with a Terminate.
01:55So I am going to go ahead and drag a Start out here, and then we're going
02:00to add some Actions.
02:01The first thing that we're going to do, this is a Workflow that's going to run
02:05when something is saved into our expense report library.
02:08There are two types of things that get saved there, one is that folks will save
02:12the expense reports themselves.
02:14The other is that folks will save supporting documentation, for example, they
02:18might save a PDF of an airline ticket, or something similar.
02:21There's a different naming convention for those items.
02:24So, the first thing we want to do is every single thing that's submitted, we
02:28actually want to send an email.
02:29You'll notice that the print here is really small.
02:32Let me drop the other shapes on, and then I am going to pump up the volume so
02:36that these are easier for us to see.
02:38After we've sent that first email, it says this item has been submitted,
02:41thank you very much.
02:43What we want to do is we want to decide what kind of item it is, and we want to
02:47decide that based on its file type.
02:49So, I'm going to take a look and see what file types we have here, and then,
02:55based on the file type, we're going to take another action and the action is
03:00going to be that we're going to send an email.
03:02So, we're either going to send an email that says hey,
03:06a new expense report has been received, that's our first email.
03:10If it's just an image, however, or a document that's supporting a workflow, we're
03:15actually not going to send an email about that, so we would then simply stop the workflow.
03:21This, however, isn't a real stop, stop.
03:24We still have to terminate the workflow out here on the end.
03:28So, let me now select all the shapes, do a Ctrl+A, and I'm going to change our
03:33font size here to a 14 point so that we can see this a little bit more easily.
03:39Now what I am going to do is I'm actually going to go in and edit the contents.
03:43So we're going to send an email, that's the name of the action, so let's keep
03:47that to the submitter, file received. Then file is a specific type.
03:53Well, the specific type of form used in this library, where we are dropping these
03:57expense reports, is an Excel file.
04:00So, we are going to say File is an XLSX file (Excel).
04:07If the answer here is no, we are going to stop the workflow, but if not, we're
04:10going to send an email to Accounts Payable - New Expense report Submitted.
04:24So, there we go!
04:25And again, if you're having any trouble seeing this, feel free to pump the
04:28volume up enough that you can actually see the text.
04:32But we also want to be able to see the icons. So, I am going to zoom in a little bit.
04:36I'm pretty comfortable with where we are right now, and I'm just going to zoom
04:40in so this fills the screen.
04:42Notice that we have different icons for the different actions.
04:44Here we're sending an email, here we are stopping a workflow, and here we're
04:48checking a file type.
04:49So, every single one of these actions and conditions have their very own
04:53iconography that goes with them.
04:55The last thing that I am going to need to do is to connect my steps.
05:00So remember that you have this red box that shows you're gluing.
05:03I am going to glue from here to here.
05:06I have a connection point here, the red box signals that I'm connected, here to
05:11here, two possibilities, one here, one there and then here.
05:20There's actually, technically, a step that is here if you stop the workflow that
05:24it goes down to terminate. It doesn't hurt for me to draw that in.
05:28I want to add a couple of other pieces of information.
05:31So, if the file is an XLS file, this is yes, this is a no.
05:39I'm going to go to process now, and I'm going to check my diagram.
05:42It says that there were no issues found that it's valid the way I've drawn it.
05:48That's a good thing to know.
05:50If I want to use this diagram, I need to save it because my next step is to export it.
05:56So, I am going to go ahead and save this, and I'm going to save this drawing
06:02as opposed to the workflow file, the drawing of the workflow in Visio, and
06:08we're going to give this a good name, so this is Email check filetype and
06:15notify AP, for example, or I could say that I'm going to Email the
06:22submitter - check filetype notify AP.
06:25This is going to end up being a name that I'm going to see later, so I want to
06:30choose carefully, and not just call it Drawing5 as I did up here where I had
06:34these brilliant file names.
06:35So I am all set, I am going to click Save, and now my workflow has been saved as
06:39a Microsoft Visio SharePoint diagram right here.
Collapse this transcript
Publishing the workflow as a web page for feedback
00:00We've created a workflow in Visio that we're going to ultimately export from
00:04Visio and import into SharePoint Designer, but in the meantime we'd like to make
00:10sure that there are some opportunities for folks to give us feedback about this.
00:13We're creating this workflow for a business segment and they need to take a look at it.
00:18So there are a variety of ways that you can share a document for feedback with Visio 2010.
00:24Let's go over and click File so that we can go to Office backstage.
00:29One possibility is to save this as an Adobe PDF.
00:33If we do that what we'll end up with is a PDF ready for annotation, so let me
00:38show you how that works.
00:39I'm just going to go ahead and click Continue, it's asking how it should
00:43render the document.
00:44And I'm going to say go ahead and Convert, and it will pick up the name of the
00:49workflow as the PDF name, and I'm going to click Save, and here's what the
00:55document looks like.
00:56So if I click Share, for example, it's all set up to use a sharing pane, but
01:01it's also set up for commenting so that someone can go in and highlight
01:06something if they wish and leave a comment right here.
01:14So this is how this works, if you're used to sharing Acrobat Pro documents then
01:20you'll be really skilled at this, if you're not, then this might be something that
01:24your introducing a team of folks about, how they could do this together.
01:28You can attach it to email, or you can place this in a location where people
01:32can get in and edit it.
01:33So that's our first method is to go ahead and have people mark up their changes,
01:37and whether they're sending these back to you all marking them up in one place--
01:41because this is a shared document that would be best--or they're making their
01:45own comments and bringing them to a meeting, or participating online in a
01:49conversation, doesn't really matter.
01:50This is a really good tool for a user to be able to go in and annotate this.
01:55I'm going to go ahead and close this, and let's go ahead and throw out the changes.
02:01The next tool you can use is you can actually publish your drawing, not as a PDF,
02:06but in one of a series of different types of formats.
02:10For example, if you choose Save to SharePoint, you have the possibility of just
02:15saving this diagram on a SharePoint site.
02:18You can save it as a Visio drawing so that other people can go open it and then
02:22make comments, or if you are using Microsoft SharePoint Enterprise Server
02:29running Visio services you can actually publish your workflow so that it can be
02:34served and people can comment on it, and as you change it, it will actually
02:38refresh what they are seeing on the web site.
02:41So two possibilities of how you might save this in SharePoint.
02:45I also want to show you another possibility.
02:48Using Save As, you have a choice to save, not as a Web Drawing--that's that Visio
02:54and SharePoint Enterprise Server option I showed you a minute ago--but as Web Page.
03:00This is not a new format, this is actually old, but I actually use this a fair
03:06amount today, because what I can do is I can create a custom web page.
03:11I can then save that web page on a SharePoint site and create a link to it and
03:16send people to look at it.
03:18So if I click Publish, I'll see my options so I can say I want to publish
03:23Details, I want to publish Go to Page, I want to be able to allow people to
03:28search, so if someone were to type in, for example, Accounts Payable, it would
03:32show them that it was listed here and take them to there.
03:35And again in a very large document I want to use Pan and Zoom.
03:39Now if I do that, I probably want to change my Page title to something like
03:44Proposed Expense Workflow - for Review.
03:51And what it will do is it will create a main page, all of the supporting pages
03:55will go in a folder with this exact same name, and then I can move all of those
04:00to SharePoint, or to any other web hosting environment.
04:04So if I click OK, this is the web page that just got created.
04:10Notice that the way Pan and Zoom works is it actually lets me select an area
04:14and zoom in or out.
04:16On the Search Pages I have the ability to search for something particular like
04:20the word stop, and it says you'll find that right here or the word submitter,
04:28and it says, well, this is where I found it right there.
04:31So this entire web page, and all of the parts were created pretty easily
04:35by Visio, and this has been functionality that's been present in the last
04:39two versions of Visio.
04:40Regardless of how you decide to share information with the users whether you're
04:45doing it in a PDF or using the Visio services in SharePoint Server Enterprise or
04:51whether you're simply saving the document on your SharePoint site and other
04:55people using Visio can open it.
04:57No matter how you choose to do it, Visio has the tools to make it easy for you
05:01to publish one or more versions that will allow easy user feedback.
Collapse this transcript
Importing a Visio workflow into SharePoint Designer
00:00We created our workflow in Visio, we've posted it for feedback, made whatever
00:04changes we need to make, and now we're ready to take this out of this
00:08environment, out of Visio, and put it into SharePoint.
00:11I really want you to wait until you're convinced that you know everything you
00:15need to know about this because you don't want to be republishing it.
00:18If I publish this once, and then republish it, I'm really overwriting my first publish.
00:23But I'm ready to go, so we're going to export this.
00:26We're going to create a Visio Workflow Interchange file, or VWI file, and we're
00:31simply going to give this a name.
00:33This is going to be originally Email submitter - check filetype.
00:37There's my HTML, and my PDF, that I've created.
00:40So it's good for these to have the same name, Email submitter - check filetype - notify AP.
00:46So let's go ahead and Save this.
00:48It doesn't look like much happened, and truly not much did except we created a
00:53file that we can move over to SharePoint Designer.
00:56Here in SharePoint Designer, we can go to the library that we want to put this
01:01on, the list or library, and import it, or I can go to Workflows, and I can
01:06say Import from Visio.
01:09So let's browse and go find that particular file.
01:12There we are, Email submitter - check filetype, and let's go ahead and click Open > Next.
01:18And we have two decisions to make.
01:20The first is, is this a good name for the workflow here in SharePoint?
01:24And it seems fine to me.
01:25The next thing is, is this going to be a reusable workflow that we can use in
01:29lots of locations, or is it specific to a particular library?
01:33In this case, we actually created this to go with Expense Reports.
01:38It's going to look for a very specific file type when we're done.
01:41So it doesn't make sense that we would use it in other places.
01:44I'm going to tie this then to the Expense Reports library and click finish, and
01:50here is our imported workflow.
01:52Notice that the description that we put in the shapes in Visio 2010 is here.
01:57Send an email to the submitter - file received, and then here is the actual
02:02action that we chose, Email these users.
02:06Then in the decision block we put File is an XLSX(Excel) file.
02:10Notice, if the file type is of a specific type do one action and then send this email.
02:15Else, do the other.
02:17So this is exactly what the workflow looked like in Visio, but now we have it
02:22here in SharePoint Designer.
02:23All we need to do is go in and fill in the blanks.
02:26The more specific information that tells us exactly what each of the actions is
02:30going to be doing, but the actions themselves and the conditions here they are,
02:34as well as the start and the end of the workflow.
02:37So you can see now how easy it is for you, or for other people, to create
02:41the workflow in Visio.
02:43Keep it there as long as you're getting feedback and then when you're ready to
02:46go simply throw it over the wall here to SharePoint designer and finish it off
02:51by entering the specifics for all of the actions and conditions.
Collapse this transcript
Conclusion
What's next?
00:00We've reached the end of the course, but that doesn't mean that you need to be
00:03at the end of what you can learn about creating workflows in SharePoint or
00:07working with SharePoint Designer.
00:09I want to make a few recommendations about directions that you might want to take.
00:13First, if you're interested in learning more about SharePoint, if you found that
00:18some of the time that we went back to lists and libraries you weren't as certain
00:21about what you saw there, or you'd just like to know more about how to quickly
00:25customize lists and libraries so that you can use them in workflows, then I want
00:29to encourage you to take a look at the SharePoint 2010 Essential Training course
00:34in the lynda.com online training library.
00:37This is a great course, and if you want to just start at the beginning of this
00:41course I want to recommend it, and the reason is that Simon is going to give you
00:46some great language to explain to your users how SharePoint works, and I don't
00:50want you to miss that.
00:51So if you haven't taken advantage of this course, give it a shot.
00:54If you'd like to learn more about SharePoint Designer, you like the tool, and
00:58you're thinking, wow, if I can do that with workflows what else can I do?
01:02Well, a couple of possibilities. One is take a look at SharePoint Designer 2010:
01:06Branding SharePoint Sites for how you can customize your site so that they will just sing.
01:11The second possibility is that creating data-driven web pages course, which is
01:16just absolutely incredible.
01:17So remember that in a couple of our workflows we were keeping track of performance indicators?
01:24These data-driven web pages use indicator data and other transactional data to
01:29create really smart business intelligence information.
01:33So I want to recommend those two courses for you as well.
01:36If you'd like to learn more about form development in InfoPath, I'd encourage you
01:41to take a look at my course in the lynda.com online training library, InfoPath 2010 Essential Training.
01:48This course covers InfoPath from the ground up, whether you're creating forms
01:51that are going to be completed in an InfoPath client or in the web, and you'll also
01:56learn about things like digital certificates and how you can protect data.
02:01Finally, if you want to learn more about Visio, if you want to learn about the
02:04core functionality of how Visio works, not specific to SharePoint workflows,
02:09but how to work with shapes and how to work with the different layers, how you
02:13might want to take your documents and dress them up for presentation, then take
02:18a look at the Visio 2010 Essential Training course also in the lynda.com online training library.
02:24I hope this has been a really great course for you, and you're going to go out
02:29and create lots of workflows to automate things in your business and take full
02:33advantage of what SharePoint can do for you. It's been an honor to be your instructor.
Collapse this transcript


Suggested courses to watch next:

Managing Documents with SharePoint 2010 (1h 14m)
Mark Abdelnour


SharePoint 2010 Essential Training (6h 58m)
Simon Allardice


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,141 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked