This post is mainly for those who want to achieve email sending from SharePoint Designer Workflows. (If you don’t want to read through all the drama, jump directly to the Falling Action section.)
In an enterprise environment developing SharePoint Workflows on the production environment might not be the best thing you can do. Of course if you are a superuser and you are developing a workflow for your small team, it might still be a solution, but if your solution is business critical... Well... You might wish to have some kind of Application Lifecycle Management (ALM) for your workflow.
With the introduction of SharePoint 2013 Microsoft introduced the interchangeability feature between SharePoint Designer and Visio 2013 Professional. What does it mean? It means that you are able to create your Workflow in Visio 2013, then import it into SharePoint Designer and the other way around. Sounds fancy, but what does it really mean to us?
It means two things:
- One does not need to be a SharePoint superuser to be able to create a business logic that is to be implemented in SharePoint.
- One can port their precious Workflows between environments with ease.
Too good to be true, you say? Well... Indeed there are some things you need to keep in mind.
First and foremost, the SharePoint 2013 style Workflows are bound to GUIDs. This post's target audience is the superusers so I won't go into the details on why and where. When porting your Workflow between DEV, TEST, UAT and PROD environments, you have to use the same GUID for :
- the actual list where you deploy your workflow to,
- the Workflow History List,
- the Workflow Task List.
Also, you have to make sure that:
- the association scope between the SharePoint site and the Workflow Manager farm is different, because that's another GUID.
So let's put it together. What steps do I need to make this thing work?
- Create the basic structure of your solution in your DEV environment, including the
- List(s) that you will use to store your data
- Workflow History List
- Workflow Task List
- Port your list to the other environments (TEST, UAT and PROD). For this you can use
- Content Database transfer
SharePoint solution that deploys the above lists with the same GUID throughout the environments. (This is the option you have to choose when you are in a Hybrid scenario, as you cannot just port the ContentDB to SharePoint Online.)
(Seems this is not an option unfortunately. Thanks to my colleagues Westin Kirebel who highlighted this, and Istvan Fabian, who helped with the clarification. Sorry.)
- Have your Business Champ create the Workflow in Visio 2013. (This is an optional step, if you are the Site Administrator and you know what you want to achieve.)
- Import the saved Workflow into SharePoint Designer - or create your own if you skipped Step 3 - and bound it to the List. Map the fields and do whatever other modifications are needed to make the Workflow working in SharePoint.
- Export the Workflow from SPD.
- Copy the VSDX file to your other environments.
- Import the VSDX file in your other environments and bound them to the same lists.
- Enjoy your solution.
Doing it once is not a big deal, since ALM is all about constant changes and updates, right? Yes, exactly. The beauty is that from this point whatever modification you do in your DEV environment can be easily ported to your other farms.
Those of you who paid attention so far might have noticed that I did not mention the columns so far. Indeed I did not, because the GUID of the columns are irrelevant. Only the internal name matters. How cool is that?
When you do subsequent export-imports between the environments, you will get a nice warning window in SharePoint Designer, reminding you that the VSDX file that you are about to import contains an update to an existing Workflow and asks you if you want to update it. Of course you do, since this is exactly why we are here, no? Of course we are.
The above described action works just fine with SP2010 and SP2013 style Workflows as well. Unfortunately it works with on-prem only as you cannot create lists with a specific GUID and you cannot port the ContentDB to the Cloud.
As you can see, the built-in SharePoint Workflow infrastructure is flexible enough to implement an Application Lifecycle Management easily. For how long? That we do not know, as - at the time of the writing of this post - Microsoft has no clear statement of the future of the built-in Workflow infrastructure, the only thing we know is both the 2010 and 2013 style Workflows are deprecated.
One thing we know for sure though; Future is the Cloud after all.