![]() |
![]() |
In this example we will use ITIM's reconciliation function to query ITDI for entries that will be interpreted as people. ITDI will parse a comma separated (CSV) file and map the data found to the attributes that we want to import into ITIM's data store. Here ITIM acts as a DSMLv2 client and ITDI acts as a server.
ITIM includes a service type erDSMLv2Service, named ITDI Data Feed in the user interface. A service instance of this type can be used to perform an identity feed using the ITIM reconciliation mechanism.
To add a service instance for this example follow these steps in the ITIM user interface:
An example of this service instance is shown in Figure 1.
In this example we will not use the user id and password. However, the user id and password fields entered on this form may be used for authentication for both incoming and outgoing communication. It will be used later in an extension of this example.
Once you have configured and started ITDI you can come back to this screen and select the Test button to test connectivity to ITDI.
To configure ITDI several steps are required. The configuration file hrfeed_server.xml is supplied and configured for this example. You may use that file or follow the steps here to create the configuration. If you choose to use the given file you will need to modify certain parameters, including the host url of the server, authentication particulars, and the location of the CSV file.
Note: If you are upgrading from ITIM Express 4.6 you should use the versions of the xml files found in express subdirectory. This is true for all of the examples unless otherwise mentioned. |
The example data file is People1.csv, which is a comma separated file containing a single entry:
First;Last;Title
Barry;Manillo;70s Pop Singer
Although this document refers to the file as a 'comma separated variables' file, the delimiter is ';'. The first row of the table gives the attribute names of the fields.
Follow these steps in the ITDI ibmditk user interface to configure ITDI:
ret.value="uid=" + conn.getString("Last");
ret.value=conn.getString("First") + " " + conn.getString("Last");
ret.value="inetorgperson";or for express 4.6
ret.value="erexpressperson";
To run the example follow these steps:
Suggestions for extending this example for use in an enterprise deployment:
Use the DSMLv2 HR Load service instance created in the first part of this example. To allow this service to be recognized as the appropriate service when receiving a request from ITDI, make this change in the ITIM UI
This will correspond to the value for Search Base that we will set within ITDI.
The configuration file hrfeed_jndi_add_only.xml supplied is configured for this example. You may use that file or follow the steps here to create the configuration. If you choose to use the given file you will need to modify certain parameters, including the host url of the server and authentication particulars.
ret.value="uid=" + conn.getString("Last") + "," + JNDIFeed.getConnectorParam("jndiSearchBase");
ret.value = conn.getString("First") + " " + conn.getString("Last");
ret.value="inetorgperson";or for express 4.6
ret.value="erexpressperson";
ret.value = conn.getString("Last");
Name | Value | Notes |
JNDI Driver | com.ibm.dsml2.jndi.DSML2InitialContextFactory | |
Provider URL | http://localhost:9080/enrole/dsml2_event_handler/tenant | 'enrole' is a fixed parameter that is the name of the J2EE web module, 'dsml2_event_handler' is a fixed parameter that is the URL mapping of the Servlet that handles the DSML2 request. The 'tenant' is an optional parameter with the tenant name for the organization. |
authentication | Simple | |
Login username | agent | |
Login password | agent | |
Name parameter | $dn | |
Search Filter | (objectclass=*) | |
Search Base | dc=HRLoad | 'dc=HRLoad' must match the namingContexts value of the service instance |
When configuration completes, click the run button to run the assembly line.
People should be added to ITIM with names matching those in the People.cvs file. However, there is one row in the file that cannot be accepted. The entry 'Roger' cannot be imported into ITIM because it is missing a surname, 'sn', attribute. This is expected and is a valid error, however, if the Default On Error hook script was not added the error would prevent subsequent entries from being processed.
In this part, we will make a couple of changes to the comma separated file and synchronize the changes to ITIM. Copy the file People.csv to People2.csv and open it in a text editor. Make the following changes:
Change the line | To |
Bill;Sanderman;Chief Scientist | William;Sanderman;Chief Scientist |
Roger | Roger; Rabbit; Cartoon Character |
We need to make a few changes to the ITDI configuration. If you don't want to make the changes by hand, close the existing configuration and open the file hrfeed_jndi_update.xml.
To run this example, use the ITIM user interface to verify the service instance detail for the DSMLv2 HR Load service. Verify that 'uid' is specified as the Name Attribute for the service. This is the name of the attribute for each person entry to use for constructing a distinguished name to return to ITDI. Steps in the ITDI user interface to operate the example in update mode:
ret.filter="uid=(" + work.getString("uid") + ")";
Run the example by selecting the run icon in the ITDI assembly line. After the assembly line completes, check that Bill Sanderson's given name has been changed to William.
Suggestions for extending this example to an enterprise deployment:
To delete people from the ITIM data store using this approach the JNDI connector should be operated in Delete mode. The comma separated list file should contain a list of people to delete. An example of a file for this purpose in People3.csv and the ITDI configuration file hrfeed_jndi_delete.xml is provided. The steps below will create a similar configuration.
The user Mick Kamerun listed in the People3.csv file will be deleted. It is assumed that the reader added that person as described in part (i) of this example.
Continuing on from the example in part (ii) save the configuration file as hrfeed_jndi_delete.xml. Close the update configuration root in the ITDI user interface.
Change the JNDIFeed connector mode to delete. Run the assembly line. Check the ITIM People Management user interface and check that the person is gone.
In this section we will extend the example so that a person can be added to a position in the organization chart matching the name of their department in the CSV file. The person Mick Kamerun will be added back, but this time in the Sales organizational unit. The ITDI configuration file hrfeed_jndi_placement.xml contains the necessary configuration to run this part of the example, if the reader does not wish to follow the steps outlined here.
To prepare ITIM to accept the data, perform these steps in the ITIM user interface:
return "ou=" + entry.departmentnumber[0];Notice that the attribute name is all in lower case letters. This is necessary because although LDAP attribute names are case insensitive, the directory server returns them in lower case, which must then match the Javascript expression, which is case sensitive.
Copy the file People3.csv to People4.csv. Add an attribute for department with the value 'Sales' as shown below.
First;Last;Title;DepartmentFollow these steps from within the ITDI user interface:
Mick;Kamerun;VP Sales;Sales
To run the example click the run icon in the ITDI user interface. Check that Mick Kamerun has been added under the Sales organizational unit in the organization tree.
This part of the example will show how to set organizational role and supervisor attributes for people during the identity feed process. The person Mick Kamerun will be given the organizational role of 'Executive' and a new person, Harry Callahan, whose supervisor is Mick Kamerun will be added. The ITDI configuration file hrfeed_jndi_role.xml is provided to match the steps described here.
Add two static Organizational Roles to ITIM called 'Executive' and 'Manager'. This is shown in the screenshot in Figure 6.
Copy the file People4.csv to People5.csv. Add attributes for Role and Supervisor as shown below. Also add an additional line for Harry Callahan.
First;Last;Title;Department;Role;SupervisorTo map these attributes to corresponding values in ITIM follow these steps in the ITDI user interface:
Mick;Kamerun;VP Sales;Sales;Executive
Harry;Callahan;Director of Sales;Sales;Manager;Mick Kamerun
Organizational Role and Supervisor are different than most other attributes discussed so far because they have a special meaning within ITIM. The reason is that they represent relationships to other entities in the system. In the ITIM data store that are stored as pointers to those other entities. A lookup is done by ITIM based on the names in the imported data to set these pointers.
The entities that are pointed to must exist before the relationships are created. The practical implication of this is that the Organizational Roles must be defined before the data feed is performed. In addition, supervisors must appear in the data feed before the people that they are supervising.
After the test has run, check the data in the ITIM user interface in the People Management screens. Screenshots for Harry Callahan are shown in Figures 8 with the Role membership defined in the Personal Information tab and in Figure 9 with the supervisor attribute set to Mick Kamerun.
There are two problems to be overcome with locales other than English speaking ones:
Within ITIM all data is imported, exported, and stored as UTF-8. This includes data transported to and from ITDI. ITDI itself, however, is capable of handling more encodings. In this part of the example we will use a data file encoded in UTF-8 and shipped as PeopleDBCS.U8. A screenshot of the example as shown in a web browser is given in Figure 10.
For a file connector in ITDI the encoding should be set within the file connector parser tab as shown in Figure 11.
Other encodings that may be used here are given in the Java platform documentation at java.sun.com.
If the scripts in the previous examples were used for an Asian locale they would result in unusual values for the uid and cn attribute. The suggested practice for uid is to use an ASCII based phonetic description of the name. For the cn attribute (common name) the best approach may be to specify it explicitly in the data file rather than deriving it from a script.
The changes to address these problems are given in the PeopleDBCS.U8 file and the example ITDI configuration file hrfeed_jndi_dbcs.xml. It is a variation of the JNDI update example above.
Before attempting to run this assembly line, you need to remove the placement rule for the service instance that you defined in step Part (b) (iv) - 2 above. Go to the TIM user interface and in the service instance detailed information form, remove the placement rule:
return "ou=" + entry.departmentnumber[0];
uid attribute
Because many of the updates and deletes depend on the value of the person's uid attribute to lookup their existence
and previous data, it is useful to display the value of uid on the personal information form. However, this is
not done by default. Add it using the form designer.
Double byte character set data
The locale of ITDI is determined by the operating system or by Java environment variables. Therefore, double byte data may be displayed as '?' characters if the locale is not set to one that selects the right fonts. In this case you may change the ITDI startup script, ibmditk, to use the desired locale. For example, for Chinese, add the following options to the java command.
${ITDI_HOME}/java -Duser.language=zh -Duser.country=CN . . .
Binary attributes
Because XML is a text based markup language, binary attributes must be transported over the network using a base 64 encoding. Base 64 encoding is a method for representing binary data as text. ITIM will automatically base 64 decode any value provided by ITDI for a binary attribute. Therefore, any value for a binary attribute (such as a password) in the CSV file must be specified as a base 64 encoded string. Several freeware utilities and web sites exist for base 64 encoding values.