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.
When a workflow on a SharePoint List is redeployed, and that workflow referenced an out-of-context SmartObject (a SmartObject from a different List), when it is packaged and deployed from one environment to another deployment fails and an error occurs.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at SourceCode.WebDesigner.Authoring.Forms.GenerateProcess.DoSPWrapping(Activity newActivity, XmlDocument inputData, String ConfigValues, String dynamicTypeForDestinationItem, K2Field currentField, SmartObjectFieldPart soFieldPart)
at SourceCode.WebDesigner.Authoring.Forms.GenerateProcess.CreateDestinations(XmlNode activity, Activity newActivity, XmlDocument xmlProcess, Process newProcess)
at SourceCode.WebDesigner.Authoring.Forms.GenerateProcess.CreateActivies(XmlDocument xmlInputData, XmlDocument xmlProcess, DefaultProcess& newProcess, String UserName)
at SourceCode.WebDesigner.Authoring.Forms.GenerateProcess.Generate(String LocalHostConnection, String UserName, Int32 ProcessID, String InputData, String ProcessXML, String SqlConnectionString, String HostServerConnectionString)
The packaged workflow had an ‘initialize data’ setting on the client event which consists of a concatenated string value that contains pipe “|” characters. This string value contains empty elements, Package and Deployment ignored the empty elements and compiled a faulty initialize string value for the workflow activity.
- Ensure you have K2 4.7 installed.
- Install the K2 4.7 February 2017 Cumulative Update.
- Get the K2 4.7 February 2017 Cumulative Update FP6 from Regional Support.
- Install the K2 4.7 February 2017 Cumulative Update FP6 to apply the fix.
- Clear the Browser cache.