Unexpected server error at SharePoint

. I am getting an “unexpected error on server associating the workflow” at SharePoint Online. This is happening across multiple site collections and workflows for me right now. I did clear SPD cache but that did not help in any way. Help please!

Each workflow is associated with XOML. Please check the differences in the xoml settings in the new workflow. You can check the XOML file with the help of the SharePoint designer. As I understand that there are no such restrictions, there may be custom workflow activities that are not available after association.

Hi @Prince,

  1. Try to increase the UserDefinedWorkflowMaximumComplexity to 10000 using PowerShell script.
    indent preformatted text by 4 spaces
$app = get-spwebapplication http://WebAppURL
$app.UserDefinedWorkflowMaximumComplexity = 10000

Please refer this article for more information support.microsoft.com/en-us/help/2557533/sharepoint-designer-2010-errors-were-found-when-compiling-the-workflow

Let me know if above resolve your issue.