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.
During Package and Deployment, the workflow is failing to deploy and an error appears:
Index was outside the bounds of the array. System.IndexOutOfRangeException:Index was outside the bounds of the array.
ApplyFolioChanges(XDocument xmlWebProcess, ITypedItem item)
ApplyItemReferenceChanges(XDocument xmlWebProcess, ITypedItem item, ComplexType ct)at SourceCode.Runtime.Services.WebDesigner.WebDesignerRuntimeService.Deploy
(IDeploymentContext context) 00:00:04.4178132
This is a known issue in 4.6.11 that was resolved in version 4.7 and involves usage of the Folio field mapping during the Workflow Setting/Integration wizard and redeployment of the workflow/P&D package.
A coldfix can be provided for 4.6.11 by logging a support ticket and referencing internal reference ID #759328.
Alternatively, to workaround this issue in 4.6.11:
- Edit the workflow in the development environment, remove the folio mapping in the process design, deploy via designer and create a new package (.kspx). This will allow you to Package and Deploy to your staging environment.
- After deployment to your staging environment, edit the workflow in the designer in the staging environment and re-add the folio mapping if needed and redeploy via designer.