Code Fix: Deployment fails when a workflow contains User or Group fields from two or more SharePoint List SmartObjects as destination users
KB001850
PRODUCTIssue 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)
Resolution
- 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.