Code Fix: Deployment fails when a workflow contains User or Group fields from two or more SharePoint List SmartObjects as destination users

  • 16 February 2021
  • 0 replies
  • 2 views

Badge +6
 

Code Fix: Deployment fails when a workflow contains User or Group fields from two or more SharePoint List SmartObjects as destination users

KB001850

PRODUCT
K2 blackpearl 4.7
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 Description
Adding user or group fields from two or more SharePoint List SmartObjects as destination users in a SharePoint User task will fail with an error at deployment.

 

Error Message
System.InvalidOperationException: The item can not be added to more than one collection.
   at SourceCode.Framework.PersistableObject.set_Container(PersistableContainerObject value)
   at SourceCode.Framework.PersistableObjectList`1.Add(T item)
   at SourceCode.Workflow.Design.Input..ctor(String name, String displayname, String type, Boolean isRequired, Boolean isList, Boolean isUnique, K2Field[] values)
   at SourceCode.Workflow.Design.Input..ctor(String name, String type, Boolean isRequired, Boolean isList, K2Field[] values)
   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)

 

Image

 

Resolution

  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.

 


0 replies

Be the first to reply!

Reply