< class="prominent-subhead ">

Code Fix: Unable to redeploy a workflow on a SharePoint List that uses a SmartObject from another List

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 Description

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.

Error Message
Error Message:
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.


  1. Ensure you have K2 4.7 installed.
  2. Install the K2 4.7 February 2017 Cumulative Update.
  3. Get the K2 4.7 February 2017 Cumulative Update FP6 from Regional Support.
  4. Install the K2 4.7 February 2017 Cumulative Update FP6 to apply the fix.
  5. Clear the Browser cache.