Wednesday, April 2, 2014

Nintex Reusable Site Collection Workflows are Sweet

I'm not one to kiss and tell, especially when it comes to SharePoint, but I just made a really sweet workflow using Nintex and man, I want to tell you about it.

Why is it sweet? Let me count the ways.

  1. It's a site collection reusable workflow. This means that I can put this workflow on any list and content type within my site collection. This is great when I want to run the workflow on multiple lists and is available to me across all of my subsites.
  2. The sweetest thing about this approach is I can update the workflow in a single location and it propagates the changes to every list the workflow runs on
  3. It provides a uniform workflow experience to end users

Ok, so that's only three reasons, but those are three huge reasons IMO. First, this allows me to create a single workflow which minimizes the risk of fat-fingering something in the workflow and trying to hunt and fix the issue in the depths of my site collection. Second, I only have to hit Publish once and the new version will run next time the workflow starts. Lastly, a uniform workflow experience is a major win for governance pundits. It ensures that no matter what content is being created and approved, all users will interact with the workflow in the same way.

Are you sold on this yet?

So how do you design a site collection workflow? If you were to try and create a site collection workflow right now, you will be quickly disappointed that you don't have the luxury of many item properties. You get super-generic fields that really don't help you with any logic. To get around this, I suggest you develop the workflow as a list workflow first. In my case, all of the lists the workflow were developed for utilize common fields and content types and Nintex is smart enough to resolve the item properties when the workflow runs as a site collection workflow.

After developing and testing the workflow as a list-level workflow, you'll need to change the workflow template from a list workflow to a site template workflow. A simple import/export of the list to a reusable template won't work. How do you convert them then? By following this post: all you need to do is add an action set to your workflow drag your actions into it, then save your Action Set as a Snippet. Then Create a New Site Collection Reusable Workflow Template. You can find the workflow in the "My Snippets" section of the Workflow Actions.

Before you publish, be sure to set your workflow settings so the workflow starts under the correct conditions. Then publish and start adding it to lists and libraries throughout your site collection.

Reusable site collection workflows aren't for every list. For example, if I want the workflow to run in the Pages library and trigger based on the publishing status, that doesn't jive with the other lists the workflow runs on as there is not a publishing status field. Sure, I can build in some logic to accommodate this, but in the interest of time, you might as well create a list level workflow, reusing the workflow snippet and throwing a wait action at the start of the list's workflow.

Additionally, I had the luxury that all of my lists utilized a lot of the same fields and content type types. If you don't have a similar information architecture, the reusable workflow route may not be for you.

The last consideration with reusable site collection workflows is if you want to add a new item property to the workflow, you'll most likely need to switch back to developing a list-level workflow. When done, you'll have to save the workflow as a snippet and add it to the site collection workflow again and publish.

The reusable site collection workflow isn't a panacea for workflow development but it's fantastic in how easy it is to apply throughout a site collection and is a workflow developer's dream when it comes to source control and publishing updates.

To get started with your own reusable workflow, check out this guide from Nintex.