MemberRegistrationAttributes XML and DTD files

Roles are assigned based on the MemberRegistrationAttributes.xml file, which follows the format defined by the MemberRegistrationAttributes.dtd file. Both the DTD and XML files are located in the WC_installdir/instance/xml/member directory.

Upon member (that is, user, buyer, or reseller) registration, the MemberRegistrationAttributes.xml file is used to determine which roles should be assigned to members within the WebSphere Commerce system. This file is divided into four sections or elements:

UserRoles

The UserRoles section contains User nodes. The role assignment algorithm iterates through the list of User nodes, and returns the first one that matches. This process is based on the following:

When a role group is found that matches the outer criteria, WebSphere Commerce attempts to assign the roles in the group to the user or organization. Each role consists of the following:

The following is an example for UserRoles:

<UserRoles>
  <User registrationType="UserRegistration"
    memberAncestor="o=Default Organization,o=Root Organization"
    storeAncestor="o=Root Organization">
  <Role name="Registered Customer"
    roleContext="storeOwner"
    DN="o=Reseller Organization,o=Root Organization"/>
  <Role name="Registered Customer"
    roleContext="storeOwner"
    DN="o=Seller Organization,o=Root Organization"/>
  ...
</UserRoles>

In this example, the WebSphere Commerce scans down the list of User nodes until it finds one that matches. The matching is determined by the following:

Once WebSphere Commerce locates a matching role group, it attempts to assign the roles from that group. In this case, there are two roles defined in the group. Both are registered customer roles to be applied at the organization that owns the store to which the user is registering, but are qualified by the ancestor of the store (meaning that WebSphere Commerce only applies the role if the store is somewhere under the DN specified).

OrganizationRoles

The OrganizationRoles section is very similar to the user roles section, except that this is where the roles for new organizations are defined. The main difference is that the roles listed within the role groups for organizations are defined by name only; that is, once WebSphere Commerce locates a matching role group, it simply creates all roles defined in the list.

The following is an example for OrganizationRoles:

<Organization registrationType="ResellerRegistration"
    memberAncestor="o=Supplier Organization,o=Root Organization"
    storeAncestor="o=Root Organization">
  <Role name="Seller"/>
  <Role name="Category Manager"/>
  <Role name="Logistics Manager"/>
  <Role name="Marketing Manager"/>
  <Role name="Sales Manager"/>
  <Role name="Seller Administrator"/>
  <Role name="Registered Customer"/>
</Organization>

This example shows that if an organization that matches on the outer criteria (registrationType, memberAncestor, and storeAncestor) is created, then all of the roles listed will be created for that organization.

BusinessEntities

The BusinessEntities section follows the same structure as the OrganizationRoles section, and is used to list the organizations that act as business entities in the system.

The following is an example for BusinessEntities:

<BusinessEntities>
  <Organization registrationType=""
    memberAncestor="o=Supplier Organization,o=Root Organization"
    storeAncestor="o=Root Organization"/>
</BusinessEntities>

Note that roles are not defined in the BusinessEntities section, and this section is used simply to list organizations.

RegistrationParents

The last section is the RegistrationParents section. This is where WebSphere Commerce defines the parent organization for new users and organizations. Although many of the WebSphere Commerce commands will still allow the programmatic assignment of parent, certain business models require that the parent be fixed. IF this is the case, WebSphere Commerce fixes the parents in this file.

The following is an example for RegistrationParents:

<RegistrationParents>
  <Organization registrationType="ResellerRegistration"
    memberAncestor="o=Supplier Organization,o=Root Organization"
    storeAncestor="ou=Supplier Hub Organization,o=Supply Chain Management
  Organization,o=Root Organization"/>
</RegistrationParents>