6

I am trying to publish my workflow after a revision, but I am getting this error whenever I try to publish. There are no errors when I check for them, but I cannot publish. The error message I get is:

Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors: Activity 'DynamicActivity' has 51 arguments, which exceeds the maximum number of arguments per activity (50).

I am not sure what this means, and I am not getting any good search results. One of the changes I made before it gave me this error was adding another lookup in a custom task action. I am using sharepoint designer 2013.

If anyone can just let me know what this means, I would really appreciate it!

  • 1
    This error can also appear if you call out too many look up in an email or other field within the workflow. – user43977 Jul 7 '15 at 19:43
10

So in SPD Workflow there is limit of using 50 variables. There are following options to solve the issue.

  1. You can limit the number of variables to 50.

  2. Increase this limit. So to increase this limit there is no other way then to update the database directly, that we strongly not recommend this to be done.

    Update WorkflowServiceMaxArgumentsPerActivity row in WorkflowServiceConfig table in WFResourceManagementDB by default value is 50 and restart server.

You can refer following links for further details:

http://social.technet.microsoft.com/Forums/exchange/en-US/56ee857d-e211-4570-8901-cd86a54ebdad/spd-2013-wf-error-maximum-number-of-arguments-per-activity-50?forum=sharepointcustomization

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/3a08c175-1b3a-4a1c-beb0-b59c0a1b7a5d/2013-designer-workflow-with-lots-of-approval-processes-fails-to-publish?forum=sharepointcustomization#53454866-c87f-4704-ba08-964923012575

http://moresharepoints.blogspot.in/2014/01/sharepoint-designer-2013-workflow-error.html

  • Haha, didn't see your answer when I found mine. Thank you for the info, did not know that I could increase the limit either. I'll make yours the answer as soon as I can :) – Brandon C. Jun 6 '14 at 8:19
  • Can I use a dictionary instead of many variables ? Or each property of the dictionary will be counted individually as one variable ? – Tito Nov 5 '15 at 9:10
  • I don't think setting values directly in the database is a good idea, it is not supported either, as far as I know. Instead, I suggest to use the Set-WFServiceConfiguration PowerShell cmdlet as suggested by Aaron below. See described here: blogs.msdn.microsoft.com/feseca/2015/02/27/… – pholpar Mar 20 '17 at 8:57
3

Also you can increase the limit through powershell, run from an elevated prompt on the workflow manager server:

 Set-WFServiceConfiguration -ServiceUri https://wfserver.example.com:12290 -Name WorkflowServiceMaxArgumentsPerActivity -Value 75

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.