Beginning with SharePoint 2013 workflows are fully declarative irrespective of whether they are designed using SharePoint Designer or Visual Studio. Declarative indicates that no longer the workflows are authored in code and then compiled into managed assemblies. Instead workflows are described in Extensible Application Markup Language (XAML) and interpreted at the execution time for activities and sequences. Being the native building blocks, XAML representation of workflows comes real handy for developers in situations like below:
- Advanced debugging of workflow
- Copy of workflow between sites with some modification
- Integrating workflow in SharePoint app where workflow is not necessarily attached to any list within the app.
However while working with SharePoint Designer 2013 there is no direct method to export the workflow XAML and it is not intuitive. In this article we will explore one undocumented method to export a workflow in its XAML form.