1

Has anyone managed to package and successfully deploy a SharePoint 2013 Designer workflow as part of a Visual Studio Solution package?

I have created a SharePoint Designer 2013 workflow, performed a save workflow as template. Imported the workflow components (.vsdx, .xaml, association and customised Elements.xml) into visual studio which I am then adding to a Site Feature. This is working correctly (hint, set the xaml file to not be compiled). The site workflow is created and associated with any site where the feature is activated.

However the workflow will not start instead I receive an error: Microsoft.Workflow.Client.ScopeNotFoundException... The remote server returned an error: (404) Not Found

If I open then open the workflow in SharePoint Designer and publish it everything works correctly. This publish step is not required if I just add the exported workflow wsp to the solution gallery and activate.

So a couple of questions: 1. Has anyone got something similar working? I must be missing something but cannot for the life of me figure out what 2. Does anyone know how the SharePoint Designer Publish function works? Is this something which could be automated with CSOM or FeatureActivated code?

  • So the deployment is now working in my development environment. Upon creating a new site the workflow is added and associated by the feature and functions correctly. The fix in dev was to deactivate and reactivate the workflow feature (I am now doing this in code), I am not sure why this helped but I believe it must force the workflow to be recompiled. – Trev M Dec 16 '13 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.