Is it supported to save a customized site as a template?

by AlexanderV » Fri Nov 14, 2014 7:35 pm

Hi!

Is this supported:
- make a site with custom actions and forms and look-ups built with Workflow Actions Pack and Form Designer
- save it as a template site for a project team and then reuse it creating new sities for every project?

I mean:
1) will everything be OK with custom actions, forms, and workflows?
2) if so, is there any way to update deployed sites when the template changes?

I plan deploying everything on an Office365 for Midsized Businesses Plan account.
In Office365 article (https://support.office.com/en-us/article/Create-and-use-site-templates-60371b0f-00e0-4c49-a844-34759ebdd989) they say it's generally OK to create such template, but I'd like to know for sure if this would work with your products in real implementation.

Best Regards,
Alexander
AlexanderV
 
Posts: 1
Joined: Fri Nov 14, 2014 7:19 pm

by Roman Rylov » Mon Nov 17, 2014 1:45 pm

Hello Alexander,

Thank you for your questions.
Currently Forms Designer doesn’t support such functionality but you can use workarround that was discussed on the following link Can I save created forms into site template?

As for Workflow Actions Pack yes, you can do it, but also with some workarounds. Out of the box SharePoint functionality doesn’t allow deployment of site templates with custom workflow actions as is.
There are two ways to deploy site template with workflows including custom actions:
  1. To deploy workflows separately
  2. To modify WSP package of site template manually after site template saving. Then you will be able to reuse the same template to create multiple sites.

The first way. You need to save workflows as templates using SharePoint Designer. Then remove them from the site (you always can restore them from saved templates). Deactivate feature of Workflow Actions Pack and save site as template. Thus, you will have site template and templates of workflows as separate WSP packages.

To deploy such site you need to create the new site using your template (created without workflows). Then activate feature of Workflow Actions Pack. Then deploy site workflow templates which you saved earlier.

The second way. You can save the site as template and manually remove workflow associations from the template for list level workflow (site level workflow will work correctly). A workflow association is defined by empty file in a template. For example such file could have such name: \HelpDeskTemplateModules\Files\wfsvc\1ee8d57965c042348f504796b9c0b725\WorkflowAssociation_b80f43beef074f61a1fce3e72ccc2e76).

You have to use tools like CabPack or WSPPacker to rebuild your WSP package. WSP package is just CAB archive and you can edit it’s content. Please, note that after creation of site by such template you will need to open workflows using SharePoint Designer and publish them manually, because the workflows are not published without association file.

Thus, you can save site template once, then edit it as CAB archive to fix the issue. Then you can reuse this package to deploy site with workflows.

Regarding your second question, SharePoint does not support site template updates. There two ways for you. The first one is to keep one empty site for template, modify it, save it as template and override older template. The second is to modify existing template using CabPack. None of this will modify existing sites created by old template. You will need to go through all sites and modify them manually. This is out of the box SharePoint behaviour.
You can export and import workflows. If you exported workflows separately you can deactivate WSP package, to upload new version, reactivate solution and feature. In that case your workflow will be updated.
User avatar
Roman Rylov
 
Posts: 335
Joined: Tue Nov 11, 2014 6:25 pm

by aliceoneill » Fri Feb 17, 2017 9:02 am

I have managed to save the site workflows as templates. However, I can't find any way to import the templates into another site. How would you import a site workflow template? I'm using SharePoint Online with SharePoint Designer 2013
User avatar
aliceoneill
 
Posts: 19
Joined: Mon Dec 19, 2016 10:32 am

by Roman Rylov » Mon Feb 20, 2017 4:15 pm

Alice,

When you select Save as Template button in SharePoint Designer it saves the workflow to assets library as wsp package.

You need to upload this wsp package to solution gallery on another site and activate workflow feature.

You can find more info in the following article:
[url]https://msdn.microsoft.com/en-us/library/office/jj819316.aspx?f=255&MSPPError=-2147217396
[/url]
User avatar
Roman Rylov
 
Posts: 335
Joined: Tue Nov 11, 2014 6:25 pm


Return to Workflow Actions Pack for Office 365