שתף באמצעות


Role Element

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

The Role element specifies the role played by the server for the staging of business data.

Put the Role element within the BusinessDataProjectProperties element.

The following table lists the attributes of the Role element.

Attribute

Data Type

Description

RoleType

String

The type of role played by the server for staging the business data. Valid values are as follows:

  • Source: The server is used to extract business data for export.

  • Destination: The server is used to import business data.

  • SourceAndDestination: Data is staged to the same server but to a different site.

  • Waypoint: The server is not use to export or import business data. Business data extracted for export will be copied to the waypoint server as part of the staging process.

Remarks

The Role element specifies the role for the project on the server where it is deployed.

When a business data project is defined, an XML configuration file that contains the business data configuration is created on the source staging server and the destination servers in the staging topology. The RoleType that is assigned defines the operation that the server will perform in the staging of the business data.

Business data can be staged from a source staging server to the following:

  • The same server but to a different site. This is known as same box replication. RoleType is set SourceAndDestination

  • An endpoint or single destination server or route.

  • An endpoint through one or more waypoints or routes.

  • Multiple endpoints through one or more waypoints or routes.

For a project whose RoleType is set to Source or SourceAndDestination, you must define the Source element to be a valid site on the server. When you create a project or load a project, a missing source attribute may not cause an error. However, deployment of the project will fail.

For a project whose RoleType is set to Destination or SourceAndDestination, you must define one or more Destination elements that specify the destination site names for the project. If there is a missing destination, the objects will not be imported into the Commerce Server system.

When the RoleType is Waypoint, no source or destination site names have to be configured. The presence of these attributes will be ignored.

For more information about how to stage business data, see Business Data Staging Topologies and How to Stage Business Data.

Example

The following example specifies a same box replication to be performed. It specifies to export the marketing, orders, and site terms data from the StarterSite, and import this data into the database associated with the StarterSite_123 destination.

<?xml version="1.0" encoding="utf-8"?>
<BusinessDataProjectProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" BusinessProjectName="">
  <BusinessProjectHeader MajorVersion="1" MinorVersion="1" Revision="1" Build="1" />
  <Source>StarterSite</Source>
  <Destination>C:\Inetpub\wwwroot\StarterSite_123</Destination>
  <Role>SourceAndDestination</Role>
  <BusinessData BusinessDataID="8d68916d-1f50-42ba-bbdf-281d0d6f5796" BusinessDataTypeName="Marketing">
    <ExportOption Name="PROMOCODE" Val="Full" />
    <ImportOption Name="PROMOCODE" Val="Full" />
    <ImportOption Name="REFRESHCACHE" Val="NO" />
  </BusinessData>
  <BusinessData BusinessDataID="be789a29-6ea2-446d-aec5-5341a72b25d6" BusinessDataTypeName="Orders" />
  <BusinessData BusinessDataID="cd4551e9-76ed-4aad-a179-03485368718d" BusinessDataTypeName="SiteTerms" />
</BusinessDataProjectProperties>

See Also

Other Resources

Business Data Staging Topologies

How to Stage Business Data

Business Data Staging Options

Source Element

Destination Element

BusinessDataProjectProperties Element

CSS Business Data XML Configuration File Syntax Elements