Share via


SharePoint 2013 Workflow Deployment Errors

I was recently working with some of the new capabilities in workflow with SharePoint 2013.  I was able to easily create some very simple workflows that read item properties and set them, but then as my workflow increased in complexity I hit an error.  I was getting a deployment error in the output pane within Visual Studio.  Four of them actually that all read the same.,  The error is shown below.

  @"Error 1
        CorrelationId: da069aa0-8f5a-4120-b5ac-1647ca6c0fe3
        ErrorDetail: There was a problem with activating the app web definition.
        ErrorType: App
        ErrorTypeName: App Related
        ExceptionMessage: System.InvalidOperationException: Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:
Cannot set unknown member 'LookupSPListItemStringProperty.ItemId'. HTTP headers received from the server - ActivityId: 0757f2f2-5e4b-43c2-904a-bc8ff92bef71. NodeId: SP2013-DEV-SP. Scope: /SharePoint/default/161fba91-758c-48f3-b2c0-b74fe5c3a3e6/d46f3422-9442-4de5-92c9-e7a516755aac. Client ActivityId : da069aa0-8f5a-4120-b5ac-1647ca6c0fe3. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
   at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)

I was really confused because the ItemId property of LookupSPListITemProperty is not required.  So why is my deployment trying to set it and why is that causing my deployment to fail?  I went back to the simple workflows that I had put together and redeployed those just to make sure something in my environment didn’t change.  I noticed that a console application, specifically c:\Program Files (x86)\Workflow Manager Tools\1.0\Microsoft.Workflow.TestServiceTest.exe, was being launched as part of deployment.  This wasn’t happening in my other project.

In the Visual Studio project properties there is a SharePoint tab that provides a checkbox to allow workflow debugging.  See screenshot below. 

image

This wasn’t checked in my project, but was for my other ones.  Checking that allowed me to deploy my application, but didn’t help though, the Microsoft.Workflow.TestServiceTest.exe module was still not loading.  I navigated to the Microsoft.Workflow.TestServiceTest.exe application and started it As an Administrator manually.  As long as I left that running I could deploy and test my workflows and as I ran them began seeing the workflow instance ID and other details logged to the console.

image

Problem once again averted, although it took more than a few hours to figure out what was going on here.

Comments

  • Anonymous
    March 23, 2013
    Excellent. Very nicely explained.Here is one more article explaining Sharepoint 2013 workflowsureshpydi.blogspot.in/.../sharepoint-2013-workflows.html
  • Anonymous
    April 01, 2013
    I faced same problem and take long time to solve. I decided to Re-register service into my side using command:Register-SPWorkflowService -SPSite 'https://myhost/mysite' -WorkflowHostUri 'https://workflowhost' -AllowOAuthHttp -ForceI reopened SharePoint Designer again and problem disappeared.Tarek Yehiasharepointserver-2007.blogspot.com
  • Anonymous
    June 11, 2013
    Hello,I am not able to deploy my SharePoint Hosted App having Workflow on F5 from VS2012.When I hit F5, the deployment fails with error:Error occurred in deployment step 'Install app for SharePoint': File contains corrupted data.But, the downloaded Workflow example from below link works fine with F5.code.msdn.microsoft.com/.../SharePoint-2013-Approval-f5ac5eb2If I compare the Workflow.xaml files of my workflow and one from above download, one noticeable difference is:The downloaded code workflow has:<Activity mc:Ignorable="sap sap2010 sads"Where as my workflow has only:<Activity mc:Ignorable="sap2010"Could you please guide?
  • Anonymous
    June 17, 2013
    I had this problem whilst using Visual Studio 2012 and after many hours of trying I forced the registration of the workflow service again and it worked!Thanks Tarek...