After deploying a SharePoint integrated workflow with P&D, editing and deployment using the K2 Designer errors with 248/260 character limit

  • 16 February 2021
  • 0 replies
  • 3 views

Userlevel 5
Badge +20
 

After deploying a SharePoint integrated workflow with P&D, editing and deployment using the K2 Designer errors with a 248/260 character limit

kbt154695

PRODUCT
K2 Five 5.0 to 5.2
BASED ON
K2 Five 5.1
SEE ALSO
 
TAGS
Deployment
Workflow Designer
How to Document
Best Practices
Development Patterns and Standards
Workarounds
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

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 [WorkflowName] will be generated by appending [ListName + "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 [SiteName] and [ListName] 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 [SourceSiteName], [SourceListName], and [WorkflowName] 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 [K2InternalNameOfTargetSiteURLSiteNameListName] portion.

To shorten the [SourceSiteName], [SourceListName], and [WorkflowName] 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 [WorkflowName] 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 [SiteName] and [ListName] 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.

As such, it may be best to keep the Site Name, Site URL path, List Name, and List URL path as short as possible in all environments and always rename the workflow during initial creation as all of these value are used in the calculation of the workflow name during P&D Deployment.
This information is only applicable at the time this KB was written.

 


0 replies

Be the first to reply!

Reply