Thanks for staying with me as I walked you through the basics of workflow in our favorite intranet platform – Microsoft SharePoint (and I’ll see you at the Ignite Conference at the end of the month!).
To wrap up our series, I wanted to talk a little about some best practices with workflow then offer some ways that you can extend your workflows. Quick recap of where we are:
Part 1: Intro and Core Concepts
Part 2: Templates and Using Workflows
Part 3: SharePoint Designer and Creating Workflows
Part 4: Best Practices and Extending Workflows (this post)
Everything below I will cover here will be from the front end of SharePoint, for the power user / business user / site admin. There are other resources that go into detail for IT or server admins to troubleshoot the service itself like this blog on MSDN.
Let’s take a look at some ways that you can use and create workflows responsibly.
I’m mixing best practices and troubleshooting together, because for the power user, they go hand in hand and there’s only so much you have control over.
This is by far one of the biggest tips I can recommend. Unless all you want to do is send a one-line email, it will be helpful to write out your process beforehand. This can be as simple as a bullet-list on paper, OneNote, Word or a written out process with Visio flow diagrams.
This is usually in two parts:
A while back I helped a client build a workflow to automate their new position requests. The entire process involved getting a position requisition approved, getting candidates and interviewing them, making an offer, then on-boarding that candidate. They used an outside system to handle the interviewing process, and for on-boarding some emails had to be directed to IT to set up their accounts (as well as a few other things). Our workflow was primarily centered around the initial position request form and approval.
You can’t make any decisions about how you will technically write your workflow until you’ve thought through all the process, what will be involved, what data you need to collect and where you will need to use it.
If you jump right into SharePoint Designer, you can design yourself into a corner because you didn’t account for a particular requirement.
One thing you should know is that there is no way to really troubleshoot your workflow like being able to have it pause mid-run and see what it thinks values are, etc. So there’s an action called Log to History List. Use that action everywhere!
Once you’ve got your workflow good, you can always remove SOME of it, but everything you put here shows in the workflow history and lets you see from the workflow status.
This is only a requirement in some cases, but just good practice. Whenever you use the send an email action in workflow, you can define the person or group it goes to. Whenever you use a variable (or a Person field), you have control over what format you return.
For example, in our email action, let’s say I just want to email the person who create the file. I can choose the Current Item: Created By field. You will have a “Return field as” option. Normally, you would think use Email Address. Nope, that will not work. I know its counter-intuitive, don’t ask me.
Your best bet is to use Login Name instead. So my name is Doug Allen, which is the Display Name. But your login would be like “domain\username”. The thing here is that your login name is guaranteed to be unique in the system. Let’s say you had multiple accounts for John Smith. If you left it Display Name, it wouldn’t know which account to get, and would give an error. Using Login Name will always work.
Only read this if you have SharePoint 2013 or higher. I mentioned in part 3 that there were some differences between the actions in 2010 and 2013. So users always me:
“Which workflow platform do I use, 2010 or 2013?”
Well, it depends. I would say try 2013 but look at the actions to make sure they will do what you want. If you find something you need from 2010, you will have to use that. 2013 gives you a lot of great stuff like stages, looping, copy/pasting actions, but it take away some things.
So review the list of actions that were removed from 2013, then review the list of actions available in 2013.
Workflow can do a lot, but it’s not always the best tool for the job every single time. A good example of this is a reminder.
Say you want to remind someone of a due date 1 month, 2 weeks, 3 days than 1 day before, and every day after. If you do this in workflow, you could have your workflow start then just pause till each of those dates. That works, but it would require stay running for more than a month, which means you would have a workflow per item running for that long. That can eventually really over burden the system. I wrote up an example of this in a previous blog.
Workflows are best when they run for a short time, do their stuff, then stop. But there’s easy no out of the box mechanism to trigger your workflow without something custom. You can do some hackery to make a workflow that calls another workflow, but it’s not my favorite. You could use the built-in mechanism called Information Management Policies which would fire the workflow based on an expiration date. But you can’t make it do what you want for all your dates as it’s one and done trigger.
Here are a couple ways to solve the same problem without workflow or with help:
You can create an item in a list for example in a workflow, then use that item’s properties in the rest of your workflow. Sometimes, SharePoint goes too fast, and you will start getting errors because the workflow proceeded before the item creation finished.
So what you can do is define your create item action, then add a “Pause for Duration” action, like 1 minute.
In my final tip I just wanted to mention to forget to plan your security. This can come into play if you need to restrict who can complete approval tasks, update item metadata, or see content in a list or library by view. Just building a workflow is only part of the solution, you will need to create your lists, libraries, views, security as well to build a real-world solution.
Also, remember I mentioned workflows run as the context of the user who started them. If that’s low-privilege user, you might need to use an Impersonation Step (2010) or App Step (2013).
Workflows are pretty powerful and can do a lot, but there are places where they fall short.
To help fill those gaps, some companies like HarePoint, Virto Software and Plumsail make Workflow Extension tools. They’re similar in nature in that they both other like 270 more actions, and both offer a free option that includes basic additional actions for text manipulation and the like. I’ve only used HarePoint myself, but they offer a ton of additional functionality.
Where it gets crazy cool is where you can run PowerShell scripts or even execute compiled C# code inside your workflow! HarePoint offers PowerShell, and they both can execute code. That opens up just about anything you can imagine for your developers.
Compare their activities and see if which might best fit your needs (HarePoint, Virto Software, Plumsail).
If you so like, you can look at new workflow platforms like Nintex or K2. This can entirely augment or even replace the default workflow platform with their own.
This is really more of a instead of workflow tool. Business Process Management System tools are made to provide a platform is designed to interact with various data sources to complete a business process. Go get data from an HRIS system, send email, create an item in SharePoint, a new user account in AD and CRM, etc. There are many, but can include tools like AgilePoint, and now Microsoft PowerApps/ Microsoft Flow.
Thanks very much for spending your time with me during this series, I hope it was useful for you! Please reach out and contact us if you need any help with workflow or automating business processes!
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.