Our customer has a site which he uses to create a new Site template (on O365). This template is used to create new sites. He want's to add Nintex Workflow in it, but doesn't seem to be able to provision this new site because he can't Save as Template when having the the Nintex Workflow app enabled.
What kind of approach do you suggest to automate site provisioning including the Workflows?
Can I create the entire site including workflow, then turn off the Nintex App, Saave as Template, Create a new site based on the template and just enable Nintex App Again? Would this work?
Or is there a workflow kind of approach in which I can import workflows that are create on my template site?
Or is there a Powershell option available?
Any suggestions on how to easily provision workflow would be very helpful.
Solved! Go to Solution.
Microsoft has always encouraged SharePoint admins to not use site templates, and especially when they include workflows or the Publishing features. This is because they are not based on a site definition found in a database and can cause performance issues on the site. The best practice for site provisioning has since been to use workflows to create these new sites for you, or object model code. Create a site collection based on a base template, like a team site, then begin activating features and adding lists and items as you need. You can also copy over items from a "template" or model site. There are ways of activating features using rest calls as well as PowerShell from a workflow also. I believe there are also web service calls with Nintex that will export and import, and publish workflows for you. I will try to find the references as soon as I get back from travel.
But I hope that helps with some places to start.
Thanks Andrew, for your reply. Hope you enjoy your traveling!
I agree on not using site templates, so that was my starting point. Unfortunately, I haven't been able to find a proper way to enable Nintex on a new site collection by code. Also, Nintex doesn't have the SDK for O365 ready yet, so no possibility is offered yet to export/import and publish workflows on the new site collection.
The only alternative I've found so far, is the use of Sharegate. They seem to be able to copy a site including Nintex and Workflow to another location. You don't have to 'save as template' but should create a model site. In the background, they might be using Nintex API's already since they are partnering on this with Nintex, which doesn't feel very stable. But I'll take the Sharegate road until more is known about releasing the SDK For O365.
Hey Arthur, had a break.
To activate features using rest calls:
https://<url to your destination site>/_api/web/features/add(featureId=guid'15a572c6-e545-4d32-897a-bab6f5846e18',force=false,featdefScope=2)
The Guid above for the feature is actually the Site Feed feature.
And I have done a few migrations with Sharegate, but not any yet to O365. And they have worked very closely with Nintex so they know all the web services required in order to do these kinds of copies. I think it is a very good idea to copy sites this way if it works with you. Otherwise, you can have a workflow do all the same work.
You can as well use Nintex Office 365 REST API to manipulate the workflows, publish them etc...