Another nice undocumented error that is returned by the workflow manager when activating a feature containing a workflow created with Visual Studio 2013 and released through a sandboxed solution.
The error returned by Visual Studio Deploy action is:
Error2Error occurred in deployment step 'Activate Features': Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors:The total size of the activity XAML including the referenced XAML is greater than the maximum allowed size of 51200 KB. HTTP headers received from the server - ActivityId: bb786961-d503-43a3-8841-f94ae479274f. NodeId: ZWFMANAGER. Scope: /SharePoint/default/30ab8bdf-af4b-4ab5-9a09-5ae27e8657ab/b3cdb013-96c2-4e29-b955-31ca505a21bc. Client ActivityId : fbf0a6e6-0c4a-46f0-b90d-8ba9fa7e64f8. ---> 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)
--- End of inner exception stack trace ---
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description, Boolean overwriteXClassName, Boolean terminateDependentInstances)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowManagementClient.PublishActivity(String serviceGroupName, ActivityDescription activity, Boolean overwriteXClass, Nullable`1 terminateInstances)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowDeploymentProvider.PublishActivity(FabricWorkflowManagementClient client, ActivityDescription activityDefinition, String serviceGroupName)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowDeploymentProvider.<>c__DisplayClass5.<PublishDefinition>b__4()
at Microsoft.SharePoint.WorkflowServices.WorkflowServiceContextExtensions.InvokeWithEcosystemRetry(WorkflowServicesContext context, EcosystemRequiredMethod method)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowDeploymentProvider.PublishDefinition(WorkflowDefinition workflowDefinition)
at Microsoft.SharePoint.WorkflowServices.WorkflowDefinitionStorageEventReceiver.PublishDefinition(SPItemEventProperties properties)
0 0ABB.ProAck.Workflows
Sniffing with fiddler the traffic from the SharePoint Server and the Workflow Server I can see the same error, with code 400.
HTTP/1.1 400 Bad RequestCache-Control: no-cache
Pragma: no-cache
Content-Type: application/xml; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.0
E2EActivity: YWl4uwPVo0OIQflK5HknTw==
Scope: /SharePoint/default/30ab8bdf-af4b-4ab5-9a09-5ae27e8657ab/b3cdb013-96c2-4e29-b955-31ca505a21bc
NodeId: ZWFMANAGER
Server: Microsoft-WF/1.0.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 10 Apr 2015 09:52:21 GMT
Content-Length: 565
<Error xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>ActivityValidationError</Code><Message>Workflow XAML failed validation due to the following errors:
The total size of the activity XAML including the referenced XAML is greater than the maximum allowed size of 51200 KB.</Message><Values><Item><Name>ScopePath</Name><Value>/SharePoint/default/30ab8bdf-af4b-4ab5-9a09-5ae27e8657ab/b3cdb013-96c2-4e29-b955-31ca505a21bc</Value></Item><Item><Name>ActivityName</Name><Value>WorkflowXaml_0985d0ee_9d5f_44dd_857c_3123094c1959</Value></Item></Values></Error>
Into the IIS Log of the workflow manager, I can see the same request with code 400.
2015-04-10 09:52:21 192.168.137.21 PUT /ActivityManagement/$Activities/WorkflowXaml_0985d0ee_9d5f_44dd_857c_3123094c1959/ $overwriteXClass=true 12290 - 192.168.137.96 Microsoft-WF/1.0.1 - 400 0 0 165
Obviously, the size of the xaml is definitely less than 50 mega bites, the fiddler request is about 288k.
Can anybody help me to solve this problem?
Thanks,
Sergio
Regards,
Bubu
http://zsvipullo.blogspot.it
Please mark my answer if it helped you, I would greatly appreciate it.