After deploying a SharePoint integrated workflow with P&D, editing and deployment using the K2 Designer errors with a 248/260 character limit
kbt154695
PRODUCTIssue
After deploying a SharePoint integrated workflow from environment A to environment B, attempting to redeploy this workflow in environment B using the K2 Designer errors with:
"The specified path, file name, or both are too long. The fully qualified name must be less than 260 characters, and the directory name must be less than 248 characters."
Symptoms
When creating a "K2 Application" workflow on a list/library, the workflow name will be generated as:
"SiteName] "ListName]"WorkflowName]
sitea listalista Workflow
The eWorkflowName] will be generated by appending gListName + "Workflow"]. The workflow name should always be shorten whenever possible, such as:
Leave Request Workflow ->"Leave Req WF", "LRWF", etc.
If possible, also shorten the eSiteName] and dListName] using an abbreviation before creating or deploying any K2 artifacts. Site URL path and list URL path should also be short during its creation.
When deploying this solution using P&D to a target environment, the name will deployed as:
"SourceSiteName] "SourceListName] "K2InternalNameOfTargetSiteURLSiteNameListName]"WorkflowName]
sitea lista portaltest denallix com Lists listaurlpathtestlista Workflow
If after P&D, this workflow's name now should exceed 128 characters, editing and attempting to redeploy this workflow via the "K2 Application > Workflow Designer" in your target environment will error with:
"The specified path, file name, or both are too long. The fully qualified name must be less than 260 characters, and the directory name must be less than 248 characters."
As the eSourceSiteName], ,SourceListName], and dWorkflowName] is static when deploying this solution to another environment with P&D; the only variable that can be controlled in the target environment before activating the K2 App and deploying the solution is the eK2InternalNameOfTargetSiteURLSiteNameListName] portion.
To shorten the eSourceSiteName], ,SourceListName], and dWorkflowName] portion; this will have to be done in the source environment, the artifacts and workflow re-factored/re-created, and the P&D package also recreated.
Resolution
To keep the workflow name under 128 characters after deploying via P&D may require combinations of the following actions/considerations:
- Renaming the workflow in the source environment to shorten the eWorkflowName] portion; this will essentially create a new workflow with the new name and you will need to reconfigure the workflow start integration and any user tasks that use SmartForms integration. As well as cleaning up of rules referencing the previous workflow name.
Renaming Workflow Considerations
- Shortening the hSiteName] and nListName] portions in the source environment. Although, only the creation of a new workflow or recreation of existing workflow will see this change. You will also need to consider if this root site collection or a subsite, as it will create a new group provider if it is a root site. Renaming the list will prompt for the renaming of the SmartObjects, Views and Forms' display name.
- In the target deployment environment, shorten the site URL and list URL path or possibly moving the site/list to a parent site or root site.