Symptoms
Please ensure that the needed configuration node(s) are configured in your configuration file C:Program Files (x86)K2 blackpearlHost ServerBinK2HostServer.exe.Config.
Diagnoses
When attempting to deploy a Sharepoint 2013 Apps integration workflow, the below error is logged:
SourceCode.Configuration.ConfigurationNotInitializedException: Please ensure that the needed configuration node(s) are configured in your configuration file C:Program Files (x86)K2 blackpearlHost ServerBinK2HostServer.exe.Config. Please refer to the help documentation for further details.
at SourceCode.Configuration.ConfigurationManager.CheckIsConfigurationInitialized()
at SourceCode.Configuration.ConfigurationManager.get_ConfigurationFolder()
at SourceCode.Workflow.Authoring.Process.EnsureRequiredReferences()
at SourceCode.Workflow.Authoring.Process..ctor()
at SourceCode.WebDesigner.Authoring.Forms.GenerateProcess.Generate(String LocalHostConnection, String UserName, Int32 ProcessID, String InputData, String ProcessXML, String SqlConnectionString, String HostServerConnectionString)
Resolution
We added the missing section:
<sourcecode.configuration managerConfigFile="C:Program Files (x86)K2 blackpearlConfigurationConfigurationManager.config" productPath="C:Program Files (x86)K2 blackpearlBin" templateConfigFile="" />
right after the closing tag (so on the same level as the node) in the K2HostServer.exe.config file with the correct paths. After we restarted the K2 Service, we were able to deploy the workflow correctly.