When you use messaging activities in Windows Workflow Foundation 4.0, you can create a context-based correlation by using the data that passes through the messaging activities. The Windows Workflow Foundation 4.0 designer provides a combo box that you can use to select the properties of the message data. You can use these properties to configure the correlation. After you select the properties, an XPath query is generated as shown in the following image:
The combo box provides you a tree from which you can select the properties of the message data. You can also expand the tree node to select subproperties. However, not all CLR types and properties are expandable or are displayed in the combo box. Additionally, the auto-generation of an XPath query may fail for some of the types and properties.
The combo box shows a tree view of the message content or every parameter in the message content. You can expand the tree view to find the queries that you want. When you double click a property, the combo box will generate an XPath query for that property. The tree view also recursively shows subproperties of the message content of parameters. Whether a subproperty is shown is based on the following rules:
When the check is performed, the attributes and interfaces are given the following priority:
1. The IXmlSerializable interface
2. The ISerializable interface
3. The DataContract attribute
4. The Serializable attribute
Windows Workflow Foundation (WF) uses Windows Communication Foundation (WCF) as the underlying implementation for services. WCF does not allow the mixed use of an interface-based serialization programming model (the ISerializable interface or the IXmlSerializable interface) together with an attribute-based serialization programming model (the DataContract attribute).
The combo box does not support XPath query generation for properties of the ISerializable interface. This is because the serialization logic may be customized. Therefore, you must manually author an XPath query if you want to use the ISerializable interface. If you select properties of the ISerializable interface in the tree view, you will receive an error message.
Article ID: 2015389 - Last Review: 12/12/2015 05:52:24 - Revision: 1.0