# Activity 'DynamicActivity' has 51 arguments

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!

• 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

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:

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