Skip to main content
I am trying to figure out how to populate the XMLFields with data. I've loaded an XMLDocument with data. The problem is that the XMLField.MetaData property is readonly so the following does not compile. Ideas?

XmlDocument xmlConfigData;
string strFilePath = "C:ScrapMyXML.xml";

xmlConfigData = new System.Xml.XmlDocument();
xmlConfigData.Load(strFilePath);
Console.WriteLine("XML: " + xmlConfigData.InnerXml);
K2.ProcessInstance.XmlFields["SystemConfig"].MetaData = xmlConfigData.InnerXml;
Hi,

Try replacing your last line with:
K2.ProcessInstance.XmlFields["SystemConfig"].Value = xmlConfigData.OuterXml;

You should find that works without any problems.

Regards,
Carl
The problem seemed to be related to the Preview software. This now works for the 3.4138.1.0 build as long as it is set for InOut. Just setting it to Out does not seem to be enough.

Problem fixed. 🙂

Reply