When creating a template site in SharePoint Designer 2013 it is useful to be able to add template workflows. These steps explain how to go about this:
1. Open the site that contains the workflow in SharePoint Designer 2013
2. Navigate to the workflow
3. Klik on Save as template
4. A .wsp file is now automatically placed in the Siteactiva library
If the file is not visible in Siteactiva, refresh the page by pressing F5.
5. In the browser navigate to the Siteactiva library and download the .wsp file
6. Navigate to the site collection site
7. Go to Site settings, Solutions under Web Designer Galleries
8. Upload and activate the solution
The workflow solution is now added to the Site features.
9. Navigate to the template site
10. Activate the feature in the site which will be used as template
11. Create a template from the site
You can now create new sites based on the template with the workflow feature added.
Note: A workflow solution can only be activated succesfully if the same apps that are used in the workflow are also in the site where you activate it.