When you use Package and Deployment to deploy a workflow to a SharePoint list or library, you receive an error message saying The value cannot be more than 128 characters in length as shown here:
The error is caused by a long workflow name and the full SharePoint URL. If the list or library has a long name or is located many levels down in the SharePoint hierarchy, you may see this error.
An example of a long workflow name that causes this error is if you create a workflow with a name more than 128 characters. You see the following message on the workflow creation page:
An example of a long name for a SharePoint list or library on a sub site is with a list name having 120 characters and the workflow name having 120 characters.
When you edit a workflow using the SharePoint K2 Application artifact page and then deploy the workflow, the deployment fails with the following error message in the Error Console.
This is a known error and limitation. Check that your workflow name is not too long. If you deploy a packaged workflow to a SharePoint environment, make sure that the location you are deploying to will not cause the URL path to exceed 128 characters.
The KB article KB002554: Item Naming: Known Restrictions and Limitations contains additional information about how workflow names are created. Please refer to this KB to learn more about how K2 might prepend a workflow name with additional characters, for example when you create a workflow with K2 for SharePoint.