SharePoint Add-in Recipe - Workflows, Actions (Activities), Events, and Forms
custom workflow, SharePoint Add-in, site provisioning, Workflow
The approach you take to implement workflows and their associated components is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, workflows and their associated components were built with server-side code and deployed via SharePoint Solutions. The workflows and their associated components ran on the SharePoint server.
In a SharePoint Add-in model scenario, workflows and their associated components are developed with code that runs on remote servers. Workflows and their associated components are registered with the Workflow Service, but all code executes on remote servers.
You can read the rest of this Office 365 Patterns and Practices Guidance article on GitHub, here: https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/SharePoint-Add-In-Recipe-workflows-and-actions.md