Thursday, November 2, 2017

Read Promoted properties in Orchestration from XmlDocument Message


When the PropertySchemaBase property is set to MessageDataPropertyBase, it means that the value of the promoted property corresponds to data in the message, such as the value of some field. When the PropertySchemaBase attribute is set to MessageContextPropertyBase, it means that the value of the promoted property may be from somewhere else, such as an envelope, or that it may be set by a pipeline component.


So, change the PropertySchemaBase property to MessageDataPropertyBase for all Promoted fields in Property schema.

We can bale to read the promoted property value by assigning the untyped document (XmlDocument) to XLANGMessage.

Declare the varXlangMessage is an orchestration variable of type Microsoft.XLANGs.BaseTypes.XLANGMessage. Use below code to read the property value.

varXlangMessage= msgXmlDocument;
varValue = System.Convert.ToString(varXlangMessage.GetPropertyValue(typeof({YourPropertySchema}.{PromtedProperty})));

No comments:

Post a Comment