Export SharePoint Designer 2013 Workflow XAML - Netwoven
Blog

Export SharePoint Designer 2013 Workflow XAML

By Pankaj Bose  |  Published on December 10, 2013

Netwoven Blog

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.

The Process

Launch the SharePoint Designer 2013 and connect to a SharePoint 2013 site. The site can belong to On Premise SharePoint 2013 installation or to Office 365. Once connected select an already existing workflow or create a new workflow.

Export SharePoint Designer 2013 Workflow XAML

Figure 1: Select a Workflow

Next save the workflow as template by clicking on the “Save as Template” button in the ribbon. This will save the workflow as WSP package and save in the Site Assets library under the current site. The file will be saved by the same name as that of the workflow.

Export SharePoint Designer 2013 Workflow XAML

Figure 2: Save as template

Open the site in the browser and select “Site contents” from under Settings icon. Then select Site Assets from the app list. You should be able to find the WSP file in there.

Export SharePoint Designer 2013 Workflow XAML

Figure 3: Workflow WSP file in Site Assets

Download a copy of the file to your local desktop. Then change the extension of the file from WSP to CAB. This will change the file icon to that of a zip file. Extract the file using Winzip or WinRAR. Navigate within the extracted folder and you will find a folder structure similar to as shown below:

Export SharePoint Designer 2013 Workflow XAML

Figure 4: Workflow.xaml location

You will find the workflow.xaml file in the location as shown in the picture Figure 4. You can open up the XAML file in any regular XML editor for review and update.

Figure 5: Workflow.XAML

Happy coding!!

By Pankaj Bose

Pankaj is passionate about extracting insights from all types of content be it structured, unstructured, binary and more. He specialises in Enterprise Search, Content Management, Data architecture and insights, Artificial Intelligence and Machine Learning. He is delivering enterprise solutions for over 20 years and leads the software development team in Netwoven.

Leave a comment

Your email address will not be published. Required fields are marked *

Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex