Error publishing a SharePoint workflow into Workflow Manager: exceeds the maximum number of arguments

Symptom You are trying to deploy into Workflow Manager a SharePoint Workflow 2013 from SharePoint designer, but you got the following error: “Microsoft.Workflow.Client.ActivityValidationException: Workflow XAML failed validation due to the following errors: Activity ‘DynamicActivity’ has XX arguments, which exceeds the maximum number of arguments per activity (50). HTTP headers received from the server – ActivityId:76d43779-6288-4623-bbc9-df7b33b33e21….

1