Servigistics InService Deployment > Advanced Configurations > Mapping User Enterprise Attributes
  
Mapping User Enterprise Attributes
User attributes defined in the enterprise system can be used to automate part of the user provisioning process. For example, users can be automatically assigned to certain profiles and service groups based on the value of these enterprise attributes.
* 
Commas cannot be used as a delimiter in LDAP attribute values. Use semi-colons as a delimiter.
To map attributes from the enterprise identity management system to enterprise attributes in Servigistics InService, use the following procedure:
* 
The examples provided in this section use a PTC and Windchill LDAP system for demonstration purposes. Edit the commands and code as necessary for your environment.
1. Log in to the Info*Engine Administration utility. Select the JNDI adapter which is configured for the LDAP that contains the additional attributes you want mapped to users.
* 
The login identity used here is not necessarily the same as the Servigistics InService Administrator identity. Rather, the login is to the internal LDAP system and is set during installation. A typical login and password configuration would be cn=Manager/admin.
To use external LDAP users select the external JNDI adapter that is configured for external LDAP system. For more information see Configuring Servigistics InService to Use an External LDAP System.
2. Navigate to your JNDI adapter properties page and in the Additional Properties section add the following property:
<service.name>.windchill.mapping.user.attributes
3. Enter the attributes (comma separated) that you want mapped as values for this property.
4. Save the adapter.
5. Navigate to <InService_HOME>\InS_SW\SW\Applications\Windchill.ear\codebase.war and open the following file:
LogicalAttributes.xml
6. Search for any definition of the WTUser class name and append definitions for the attributes you created above to this section. For example, for an attribute name title the definition is shown below. Make sure the value in the LogicalForm tag is the same as the attribute you defined above. Attributes are case-sensitive.
<Property>
<LogicalForm>title<LogicalForm>
<ExternalForm>SCA|title.key</ExternalForm>
<Property>
7. In a resource bundle that is supported for customizing add the following:
All additional definitions for each attribute you created
All corresponding Server Calculated Attribute Functions (SCAF) that need to be invoked to retrieve these attributes.
For example, navigate to <InService_HOME>\SW\Applications\Windchill.ear\src\wt\org and modify the file orgModelRB.rbInfo to add entries similar to the following:
WCTYPE|wt.org.WTUser~SCA|title.key.value=Title
WCTYPE|wt.org.WTUser~SCA|title.key.abbreviatedDisplay=Title
WCTYPE|wt.org.WTUser~SCA|title.key.dataType=java.lang.String
WCTYPE|wt.org.WTUser~SCA|title.key.serverFunction=
com.ptc.core.foundation.org.server.impl.SACFLdapAttributeContainerFunction
WCTYPE|wt.org.WTUser~SCA|title.key.serverFunction.arg1=String{title}
* 
The value of serverFunction should remain the same as the one provided above, unless you write your own SCAF function. In addition, if the attribute was defined as a Boolean, then key.dataType should be java.lang.Boolean. Do not change the type in key.serverFunction. This must always be a String type.
8. In a command prompt, generate the corresponding .ser file by running the following command in the runtime location (for example, <InService_HOME>\InS_SW\SW\Applications\Windchill.ear\codebase.war\wt\org:
tools bundle -Dbundle.input=<Servigistics InService_HOME>\InS_SW\SW\
Applications\Windchill.ear\
src\wt\org -Dbundle.recurse=true
9. Navigate to Core/src/com/ptc/sc/resource/ and add the additional attribute entries to SCEnterpriseAttributesRB.java. For example, to add the attribute “Title” add the following:
@RBEntry("Title")
public static final String TITLE = "title";
10. Compile the java class by using the following command:
Javac -d <WT_HOME>/codebase.war/WEB-INF/classes ./SCEnterpriseAttributesRB.java
11. Log in to Servigistics InService as an administrator, and navigate to Attributes. Select User and add a new attribute with a name similar to the attribute added in the above steps. In this example, title. Click Create Attribute to add the attribute under User. The Mapping should be exactly as in the ExternalForm value in the file LogicalAttributes.xml. For example:
Internal Name: title
Data Type: String
Display Name: Title
Description: Job Title
Mapping: SCA|title.key
12. Restart the Servigistics InService server.