Share via


What Are the Rules for Orders Pipeline Adapters?

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

When you modify the OrdersPipelineMappings.xml file, you must follow these rules:

  • Weakly typed properties can be of any type that can be mapped to a variant type in COM. If a property is of a type that cannot be mapped to a variant type, such as int64, the adapter will throw an exception.

  • Weakly typed properties from the OrderForm class will be marshaled into the top-level order dictionary. If you want to marshal the weakly typed properties from the OrderGroup, the site code should copy these properties from the OrderGroup to the OrderForm.

  • Keys in the dictionary that you do not map to properties in the OrdersPipelineMappings.xml file are added to the object as weakly typed properties.

  • The dictionary key is populated only if the corresponding collection (on the managed-code side) has non-zero cardinality. The Orders System clears the managed collection property if the corresponding dictionary key is null.

  • All the child elements of the AdapterMap node are the names of classes in the Orders System assembly. If a class that has this name is not present, the pipeline adapter will throw an exception.

  • OrderForm has to be present as a child element of the AdapterMap node.

  • The data type for strongly typed scalar properties is picked up from the Orders System assembly at run time. Scalar property types include number, string, Boolean, and datetime.

  • All the collections that do not use a ReferTo key must implement the IEnumerable interface. For collections that are mapped to SimpleList, the collection class must implement the IList interface. For collections that map to the dictionary keyType, the class must implement the IDictionary interface.

  • All the collections that have the ReferTo key must implement the following:

    • An Add method that takes the ReferTo class type as an argument.

    • A Clear method without arguments.

    • A constructor that takes OrderForm as a parameter.

    • The GetEnumerator method without arguments and IEnumerator as the return type.

  • All ReferTo classes must implement a default constructor.

    The ReferTo attribute is valid only with collection elements. For property elements, either this rule is ignored, or the Orders System will generate a warning or error when reading the XML file.

See Also

Other Resources

Orders Pipeline Adapters