ShowTable of Contents
Previous | Next
Now that we have configured the development environment, we are ready to create our first assembly line to populate the Profiles database with selected user profile attributes from the custom database table. The procedure is as follows:
- Create a project.
- Create an AssemblyLine.
- Add Tivoli Directory Integrator connectors.
- Configure mapping between external data and work entry.
Create a Tivoli Directory Integrator project
- After starting the TDI Configuration Editor, click the Tivoli Directory Integrator tab and then click Create Tivoli Directory Integrator Project.

- Enter the project name (for example, DB2toProfiles) and click Finish.

- Wait until the Configuration Editor creates the project. Make sure that the default development server is started.

Note: If the default server is not started, right-click on the server name, select Open Configuration, and check if the solution directory path for your environment is specified correctly in the Solution Directory field and then restart the Configuration Editor.

Import data from IBM Connections Solution Directory into the new project
IBM Connections installation files contains Tivoli Directory Integrator Solution Directory, which holds configuration and libraries that are necessary to make the IBM Connections Tivoli Directory Integrator connector work. In this step, we import artifacts from Solution Directory into our project so we can use IBM Connections Tivoli Directory Integrator connectors.
Follow this procedure to import data.
- In the Navigator section, right-click the project name and choose Import.

- Expand IBM Tivoli Directory Integrator, choose Configuration, and click Next:

- Choose the configuration file from your Solution Directory, for example, C:\TDIProject\15082011\TDISOL\TDI\profiles_tdi.xml.
Uncheck only AssemblyLines from the list of the objects which can be imported and click Finish.

- Configure the Profiles database connection properties. To do this, inside your project, expand Resources -> Properties and choose profiles.

- Change the values of the dbrepos_jdbc_driver, dbrepos_jdbc_url, dbrepos_password, and dbrepos_username properties, according to your environment and save the file using "Ctrl+s".

Note: Depending on the database type that you are using, you might need to copy JDBC drivers to the extension libraries directory of your Tivoli Directory Integrator installation, which is in <TDI_install_dir>\V7.0\jvm\jre\lib\ext and restart the Configuration Editor. For example, if you are using DB2, you have to copy db2jcc.jar and db2jcc_license_cu.jar from your DB2 installation directory to C:\IBM\TDI\V7.0\jvm\jre\lib\ext.
Creating an AssemblyLine
Now we are ready to create the first AssemblyLine. Perform the following steps.
- Make sure your project is highlighted in the Navigator section and click on the project name and then click New AssemblyLine on the top of the menu.

- Enter the name of your AssemblyLine (for example populateProfilesDB) and click Finish.

Adding and configuring the Profiles Connector in Iterator Mode
Now we start to create logic in our AssemblyLine. First we add ProfileConnector to iterate through the Profiles database as shown in the following steps.
- In the Navigator section under the project name, click on your new AssemblyLine name and then click Add component on the top menu of the tab.

- From the Select Type Filter pane on the left, choose Connectors then select ProfileConnector. Enter the name for your connector, for example, ProfileConnector_iterator. Select Iterator in the Mode dropdown list and click Finish.

- Test the added connector.
- Click the Connect button on the right side menu, as shown in the following figure. This initiates the connection to the Profiles database.

- Click Next.

- You receive the first record from your Profiles database, similar to the screen image below.
Note: If you have more then the default list of data attributes in the system that you are connecting to, this action will also update the list of accessible attributes for current connector and they will become available for mapping. If you still can not see some attributes, you can add them manually using an attribute name. You can find full list of out of the box attributes available for IBM Connections Profile Connector in this wiki article: http://www-10.lotus.com/ldd/lcwiki.nsf/dx/Profiles_attributes_ic301

- The Profile Connector is in Iterator mode, which means that it will work as a flow of user unique IDs, storied in Profiles Database. These UIDs will be used by other connectors to obtain the data for appropriate users, get the value of specified attribute and update the Profiles database with this value. In our scenario, we use the email attribute as UID, so we configure Profile Connector to get user's email and put it into the work object attribute (or work attribute).
Note: If you need to get only a subset of users from the Profiles database, you can do pre-filtering by rewriting the Profile Connector methods on the Hooks tab using JavaScript. We cover this mechanism later in the section 4.6 Creating custom AssemblyLine to synchronize updates from external database to the Profiles DB updates and use Hooks to process errors.
- To add a mapping between work attribute and user's email from Profiles database, click the Add button in the Input Map tab.

- Select email in the attribute selection menu and click OK.

- Now this attribute is available to other connectors in the AssemblyLine with the work attribute ID email.

- Save your configuration using Ctrl+s.
Adding JDBC Connector in lookup mode
In our example, because we use a custom table as a source for populating the Profiles database, we use a JDBC Connector with DB2 JDBC driver to connect to this table and retrive data from the database. If you use different source system such as another LDAP or Notes database, you have to use an appropriate connector for it.
Perform these steps to add JDBC Connector.
- Inside your assembly line, click the Add component button in your assembly line. From the Select Type Filter pane on the left side, select Connectors then select JDBC Connector from the Components pane. Enter the name for your connector, for example, JDBCConnector_lookup, Select Lookup in the Mode dropdown list and click Next.

- Enter values for the following fields and click Finish.
- JDBC URL: In our example, it is jdbc:db2://localhost:50000/peopledb.
- JDBC Driver: We use DB2, so it is com.ibm.db2.jcc.DB2Driver,
- Username: In our example, we use Administrator that has full access to the table.
- Password: Administrator's password,
- Table Name: In this example, it is EMPCUSTDATA which could be selected using the Select button.

- Test the connection.
- Click the Connect button on the right side menu, as shown in the following figure. This initiates the connection to the specified database and table.

- Click Next to test that you can retrieve the data from the table.

- The tool retrieves the first record from the table.

- To retrieve user attributes using JDBC Connector, you must first make a selection of the appropriate attributes from a table row with specific user's unique ID.
- Go to the Link Criteria tab and click Add.

- Specify the link between the work object attribute and the column name, by which, the Connector selects from the table. In this example, the table has a column named PREMAIL, which contains the user's primary email and it should be same as the work attribute $email, which is coming from the Profile Connector.

- To make the JDBC Connector get the data from the table to AssemblyLine, you must specify a mapping between the table columns and the work attributes.
- Go back to the Input Map tab and click Add.

- Select the table column names that you want to get into work attributes. In this example, they are GRADCOUNRY, GRADFROM, IPTELEPONYNUMBER, SECMAIL, and SPECIALIZATION. Click OK.

- These attributes will be available to other connectors in the AssemblyLine with work object attribute IDs GRADCOUNRY, GRADFROM, IPTELEPONYNUMBER, SECMAIL, and SPECIALIZATION.
Note: You can change the name of your work object attributes to make them more readable. However, make sure that you use the same name of the work object attribute in all connectors.

- Save your work using Ctrl+s.
Add and Configure Profile Connector in update mode
The last stage in this AssemblyLine is to write the attribute values that you retrieve to the appropriate attributes in the Profiles database using the JDBC Connector. To do this, you can use the Profile Connector in the update mode, which means that this Profile Connector will first search for the user record in the Profiles database by user's email and and then write the data you have received from JDBC Connector into appropriate fields of the user's profile.
Perform the following steps to add a Profile Connector.
- Go back to your assembly line and click Add component. Choose Connectors from Select Type Filter on the left and select ProfileConnector on the Components pane. Enter the name for your connector, for example, ProfileConnector_update. Select Update in the Mode dropdown list and click Finish.
Note: You can change the name of your work object attributes to make them more readable. However, make sure that you use the same name of the work object attribute in all connectors.

- Test the connection and update the list of attributes as we have done before for the first Profile Connector and JDBC Connector.
Click on Connect and then Next . It should display the first record from the Profiles database.

- All modifications by this Profile Connector should be made for a specific user. Therefore, we have to provide a mapping between the work object attribute and the user record attribute in target system which holds user's unique ID.
- Go to the Link Criteria tab and click Add.

- Specify the link between email which contains user's primary email and the value that should be equal to the work object attribute $email.

- Now we need to define a mapping between the user's profile attributes and work object attributes from Assembly Line. In our example, we will map work.IPTELEPONYNUMBER to ipTelephoneNumber, work.SECMAIL to groupwareEmail. To populate the experience attribute, we will use a small script which will combine work.GRADCOUNRY, work.GRADFROM and work.SPECIALIZATION in a way that we want it to be shown on the Background tab of the user's profile.
- Go back to Output Map tab and click Add button.

- Select an attribute names you want to populate using the values from work attributes. In our example, the attributes are not populated by populating wizard because Domino LDAP has no such data. Since they are not populated, they will not be shown in the "Add attribute" dialog. We have to add them manually using the default attribute names from this article: http://www-10.lotus.com/ldd/lcwiki.nsf/dx/Profiles_attributes_ic301.
The attributes names are ipTelephoneNumber, groupwareEmail, and experience.
Note: If you add the attributes manually, you must click OK and repeat the current step for each attribute.

- To map Profiles attributes to the attributes from the work object, double click on a row of the output mapping table for each attribute you want to change.

- Change work.ipTelephoneNumber to work.IPTELEPONYNUMBER, then change work.groupwareEmail to work.SECEMAIL.

- Double click on the row with the experience attribute, delete work.experience, and add the following script, which is a simple string concatenation in JavaScript:
"Studied " + work.SPECIALIZATION + " at " + work.GRADFROM + " which is in " + work.GRADCOUNTRY + "."

- Save your work using Ctrl+s.
Running your first AssemblyLine in debug mode
For testing purposes you can run your AssemblyLine in Debug mode, which will show you how data is going from one connector to another. You can look at the values of work attributes on each step.
- Inside your assembly line, click the Start debug session button, as shown in the following figure.

- After the debug session started, click Step over to move to the first Connector in the AssemblyLine.

- Click Step over again to make the Profile Connector retrieve the first user's email, then expand the email attribute to see its value.

- Keep clicking Step over until it points you back to the first Profiles Connector. Now the appropriate attributes in user's profile should be updated, you can look the data in IBM Connections Profiles.
Here is how it looks for ipTelephoneNumber and groupwareEmail attributes.

The following image shows the experience attribute, which contains the text displayed on a Background tab.

- To stop the AssemblyLine running in debug mode, click Stop.

Note: You also can make an AssemblyLine to run unit it is complete from the Configuration Editor by clicking Run .

Note: The detailed logs is in the ibmdi.log file located in <your_TDI_solution_directory_root>/logs. For example: C:\TDIProject\15082011\TDISOL\TDI\logs.
Next steps
Continue with section 4.6 Creating custom AssemblyLine to synchronize updates from external database to the Profiles DB
Parent topic: 4.0 Tivoli Directory Integrator
|
|
|
|
| Version 1 |
November 21, 2011 |
12:28:31 PM |
by Amanda J Bauman  |
|
|