You are currently offline, waiting for your internet to reconnect

Some properties cannot be selected from the combo box inside CorrelationInitializer


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:

Correlation Initializers Dialog

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:

  1. Properties that cannot be expanded:
    1. CLR built-in types.
    2. The Bytearray, DateTime, TimeSpan, GUID, Uri, XmlQualifiedName, XmlElement and XmlNode arrays. This includes the XElement array and the XNode array from Microsoft .NET Framework 3.5.
    3. Enumerations.
    4. Arrays and Collection classes such as the List<T>, Dictionary<K,V>, and Hashtable collections. Additionally, any object that implements the IEnumerable interface, the IDictionary interface, or is an array, is treated as a collection.
    5. Types that are marked with the CollectionDataContract attribute.

  2. Properties that do not show any subproperties.

    Note You can manually input these subpropertiesto the query string.
    1. Types that implement the IXmlSerializable interface.
    2. Types that implement the ISerializable interface.
  3. Properties that show all fields that do not have the NonSerializable attribute, regardless of accessibility levels:
    1. Types that are marked with the Serializable attribute.
  4. Properties that show all members the DataMember attribute:
    1. Types that are marked with the DataContract attribute.
  5. Properties that show all public fields and properties that do not have the IgnoreDataMember attribute:
    1. Types that are marked without the DataContract, CollectionDataContract or Serializable attribute but have a default constructor.

      Note The default constructor can be non-public.
    2. Types that  do implement the ISerializable interface or the IXmlSerializable interface but have a default constructor.

      Note The default constructor can be non-public.

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: 04/12/2010 23:23:00 - Revision: 1.0

  • Windows Workflow Foundation
  • KB2015389