In this scenario, we have a workflow that begins by adding a list item to a SharePoint list.
After installing a Fix Pack (1-5) from K2 to resolve a different issue, the workflow now fails with the following error:
"The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."
More error detail:
"Type: SourceCode.SmartObjects.Client.SmartObjectException Source: SourceCode.SmartObjects.Client Method Base Member Type: Method Name: ExecuteScalar Module Scope Name: SourceCode.SmartObjects.Client.dll Declaring Type Full Name: SourceCode.SmartObjects.Client.SmartObjectClientServer Stack Trace: at SourceCode.SmartObjects.Client.SmartObjectClientServer.ExecuteScalar(SmartObject smartObject, DataTable inputTable) at SourceCode.Forms.AppFramework.FormRuntime.SmartObjectExecution(BrokerSmartObject brokerSmo, SmartObjectBrokerMetaData brokerMetaData, Boolean outputDependencies, SmartObjectClientServer smoClientServer, Queue`1 soInstances) at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(BrokerPackageCollection packages, SmartObjectClientServer smoClientServer) at SourceCode.Forms.AppFramework.FormRuntime.WorkXmlToApi(Stream input, Stream output) at SourceCode.Forms.Runtime.AJAXCall.ProcessRequestInternal(HttpContext context)"
This error will only occur if a K2 5.1 environment had Fix pack 1 to 5 applied, and if you have a custom list and added a column that stores managed metadata.
It can be any managed metadata service.
This issue was fixed in K2 5.1 Fix Pack 6.