Mapping configuration file

Use the mapping configuration file to specify which mail templates are used for which roles.

The mapping is applied to the user who owns the subscription. So, for example, you might configure the mapping file so that any users in the development role who have subscriptions on items are sent a mail message based on the EMailTemplate.Development template when a subscribed-to item changes.

The configuration name for the mapping file must be "EMailMappings", and the file must be loaded into the Email Notification configuration type.

The governance enablement profile is pre-configured with a number of user roles, as follows:
  • Business
  • WSRRAdmin
  • SOAGovernance
  • WSRRUser
  • Development
  • Operations
You can assign users in these roles to different dashboard templates, according to their role. You can also define your own roles, if required.

You can specify different notification email templates for different roles, and then use the mapping file to specify which roles map onto which templates. You might have a single user with multiple roles, and you can map to a template for a user that has all of the specified roles, or alternatively, any of the specified roles. You can also map single roles to single templates.

Note: If the mapping file contains a mapping of one role to multiple email templates, there is no way to guarantee which email template will be selected.

The mapping configuration file has the following format:

<email-mappings>
    <email-mapping>
      <roles [mode="all" | "any"]> 
         <role>role1</role>
         <role>role2</role>
         <role>rolen</role>
      </roles>
      <template>EMailTemplate.template</template>
   </email-mapping>
</email-mappings>
email-mapping
Define one email-mapping section for each template you want to map to.
roles
Define a roles section for each role, or group of roles that you want to map to a template. When specify a group of roles, you can specify whether the template is for a user with all of the specified roles, or any of the specified roles. If you do not specify one of the options, then "any" is assumed. The "all" mode takes precedence over the "any" rules. If there is a user who satisfied an "all" mapping and one or more "any" mappings, then the "all" mapping is used.
template
Specify the name of the template that you are mapping user roles to.
In this example, the roles for various users are set up as specified in the following table.
Table 1.
User name Roles Template
Mandy Development, WSRRAdmin, SOAGovernance, Operations, Business EMailTemplate.Superview
William Development, SOAGovernance EMailTemplate.Development
Dotty SOAGovernance EMailTemplate.Development
Tully Operations EMailTemplate.Operations
This mapping of roles to templates is implemented by the following file:
<email-mappings xmlns="http://www.ibm.com/xmlns/prod/serviceregistry/7/5/EMailMappings">
    <email-mapping>
      <roles mode="all"> 
         <role>Development</role>
         <role>Operations</role>
         <role>SOAGovernance</role>
         <role>Business</role>
         <role>WSRRAdmin</role>
      </roles>
      <template>EMailTemplate.Superview</template>
    </email-mapping>
    <email-mapping>
      <roles mode="any"> 
         <role>Development</role>
         <role>SOAGovernance</role>
      </roles>
      <template>EMailTemplate.Development</template>
    </email-mapping>
    <email-mapping>
      <roles> 
         <role>Operations</role>
      </roles>
      <template>EMailTemplate.Operations</template>
    </email-mapping>
</email-mappings>