Profiles are the center piece of IBM Connections and your social business. IBM Connections ships with scripts to connect to your LDAP Directory. However, most organizations also need to integrate HR data to build complete profiles and reporting structure.
In this session we will teach you step-by-step how to add custom fields to your Profiles configuration, and how to populate data from multiple sources including LDAP and HR systems.
2. Software we are using in this session
2
In the course of this session the following IBM Trademarked Software will be mentioned
–
Domino® 9.0.1
–
IBM Connections® 4.5
–
Tivoli Directory Integrator® 7.1
–
IBM Security Direcory Integrator®
–
DB2® 10.1
–
Lotus®
–
Lotusphere®
3. Agenda
About Us
Our Demo Environment
Introduction to IBM Tivoli Directory Integrator ®
The Profiles Population Wizard
Populating Photos
Creating Custom Profile Fields
Creating Custom Assembly Lines
Summary
Questions (and possibly answers)
Ice Cream
3
7. About Us
Mitch Cohen
–
3 crazy kids
–
Working with Collaboration Technology
for 15 years
–
NY Giants Fan
–
NY Mets Fan
–
Talks Fast / Runs Slow
–
2014 IBM Champion
7
Chris Whisonant
–
2 kids (1 of them is crazy)
–
Working with Collaboration Technology
for 13 years
–
South Carolina Gamecocks Fan
–
NY Yankees Fan
–
Talks Slow / Runs Fast
8. Please Note
We had nothing to do with the healthcare.gov roll out
–
The roll out might have gone better if the White House used IBM Connections ®
–
OK enough politics lets move on
8
10. Before we get started
Our Goal today is to show you how to create a Profile that makes sense for your organization
–
We will demo
●
Out of the box functionality to create Profiles
●
How to populate existing photos in to Profiles
●
How to extend Profiles for custom data requirements
●
How to use data that reside in other systems to populate Profiles
The systems we are using today are
–
IBM Lotus Domino ® LDAP
–
IBM DB2 ®
–
HR Data (stored in a MySQL database for demo purposes)
–
CSV Files
10
11. Before we get started
A profile populated by the population wizard with data from LDAP looks like this
11
12. Before we get Started
When we are done today it will look like this
12
13. Before we get Started
As long as Chris remembers who he reports to this should all be easy
13
15. Introduction to TDI
•Please Note IBM has recently rebranded products in the Tivoli
Brand
– Tivoli Directory Integrator is now known as IBM Security
Directory Integrator
– IBM Connections 4.5 requires TDI 7.1
● This version is still branded as TDI
● We will refer to it as TDI*
*Come back next year we will probably still be calling it TDI
15
17. Introduction to TDI
17
TDI Terminology
–
Projects
●
Collection of AssemblyLines and Resources
–
Connectors
●
Pre built templates to connect to different systems
●
Many installed with TDI
●
If you are adventurous you can write your own
– Connections ships with custom TDI Connectors
–
AssemblyLine are made up of
●
Feeds and Data Flows
–
Workspace
–
Solution Directory
21. Introduction to TDI
21
AssemblyLines
–
AssemblyLines are where your TDI Code lives
●
One AssemblyLine can contain multiple tasks
●
One AssemblyLine can call another AssemblyLine
–
AssemblyLines are made up of two parts
●
Feed
●
Data Flow
We will be showing you today
–
AssemblyLines that Ship with IBM Connections
–
Examples of custom AssemblyLines
22. Introduction to TDI
22
Property Files allow you to store your properties in a common file instead of manually
entering them in each AssemblyLine Component
–
Using Property Files will save you time
–
Allows you to change a parameter once regardless of how many times it appears in the
AssemblyLine(s)
–
Allows you to point an AssemblyLine at different environments
●
i.e Test/Dev/Production
When you run the IBM Connections Profiles Population Wizard your connection properties
are saved to a TDI Properties File for later use
24. Introduction to TDI
24
It is not obvious but all of these attributes are clickable to assign a property value
–
Trust me use Properties don't hardcode them you will regret it later
25. Introduction to TDI
25
TDI Connectors
–
In this session we will be working with
●
Connectors that ship with TDI
– LDAP Connector
– JDBC Connector
– File Connector
●
Connectors that ship with IBM Connections
– Profile Connector
– Photo Connector
27. The Profiles Population Wizard
27
The Profiles Population Wizard ships with IBM Connections
–
It requires Tivoli Directory Integrator v7.1 Fix Pack 2 to be installed
●
It does not install TDI you need to do that before running the wizard
●
Don't forget FP2
–
The Wizard will walk you through the initial configuration and save all of your
connection information to the profile properties file which we will use again later
28. The Profiles Population Wizard
28
Where do I get the Profiles Population Wizard?
–
You download it from Passport Advantage
29. The Profiles Population Wizard
29
After downloading the wizards installer, click on it to extract it
–
Pick a location to save the extracted wizard files
–
You can always move it later if you are not happy with your choice
30. The Profiles Population Wizard
Pop Quiz
–
What is 5378?
A. The Number of slides in this presentation
B. The number of files to be extracted
C. All of the above
D. None of the above
30
32. The Profiles Population Wizard
32
To launch the wizards run populationWizard.bat
–
You can also click on the batch file in Explorer
–
We like the command line
34. The Profiles Population Wizard
If you installed TDI to the default location “c:Program FilesibmTDIV7.1”
–
You will be taken directly to the Database Selection Screen
If you customized your TDI Install location
–
We don't think any less of you
–
You may be sent to the Steam Pipe Trunk Distribution Venue
–
You will see the screen on the next slide where you can tell the wizard* where TDI is
installed
*If it was really a wizard it would have known
34
35. The Profiles Population Wizard
35
Use browse to point to the install
–
If you do not see this screen it means the wizard found TDI on its own
36. The Profiles Population Wizard
36
Select your Database Type
–
We are using DB2 for our demo today
37. The Profiles Population Wizard
37
Fill in your DB Connection Properties
–
If you are not sure find a DBA and be nice to them they might tell you
–
You might need to copy the appropriate database drivers on to the TDI machine
38. The Profiles Population Wizard
38
Specify your LDAP Server hostname and port
–
If you are using SSL make sure you check the box
41. The Profiles Population Wizard
41
Next we are going to map the fields from LDAP to Profiles
–
The defaults will generally work well
–
As a best practice set any field you are not using from LDAP to null
●
This will prevent bringing over any garbage data
–
We will be showing you later how to write your own TDI Code to populate data from
other sources
If needed you can create your own custom functions with in the wizard to manipulate data
–
We are not going to cover that today but ask me if you need to know how
43. The Profiles Population Wizard
43
Next decide if you want to populate any of these other tables
–
You can always do these later
44. The Profiles Population Wizard
44
Review the summary of your configuration
–
If you are ready to go click Configure and watch the magic
45. The Profiles Population Wizard
45
Depending on the size of your directory this could take a while
46. The Profiles Population Wizard
46
When the wizard finishes you can view see the results or click to view the complete log
47. The Profiles Population Wizard
47
All of the Connection Properties we input in the wizard are saved to
–
profiles_tdi.properties
48. The Profiles Population Wizard
48
All of our field mapping are saved to
–
map_dbrepos_from_source.properties
49. The Profiles Population Wizard
49
Where are we?
–
We used the Profiles Population Wizard to create profiles for the users in LDAP we
specified
–
We only have basic information in our LDAP
●
Name
●
Email address
●
Employee ID Number
–
This is fairly typical
–
We are going to show you later how we use TDI to add other data
●
Title
●
Manager
●
Location
●
And others
52. Uploading Photos Into Profiles
52
Photos can be uploaded / edited by your users in the Profiles UI
If you have access to employee photos you might want to provide an initial photo for each
profile
Profiles ships with a TDI AssemblyLine to upload photos to Profiles
–
BUT, you need a way to easily build your input file – this is NOT included with the
Assembly Lines
–
Luckily, we will make this easy for you!
53. Uploading Photos Into Profiles
53
The out of the box AL used to upload photos is: load_photos_from_files.bat
–
This will iterate through the collect_photos.in file and load the photos into each
specified Profile
–
collect_photos.in is what we need to build
54. Uploading Photos Into Profiles
The first thing you need to know is the file format for collect_photos.in
Sample format:
photo:file:/c:/photosfolder/filename.jpg
uid:cwhisonant
.
photo:file:/c:/photosfolder/otherfile.jpg
uid:ahayes
After seeing that, the first thing you ask yourself is:
“How in the world do I build a file in THAT format?”
54
55. Uploading Photos Into Profiles
55
Luckily, you have TDI and this will be simple
In this section, you will primarily learn how to build the input file as expected.
–
The input file is collect_photos.in
You can also use the concepts explained here and later in the Custom AssemblyLine
section to build your own custom AL to suit your environment
56. Uploading Photos Into Profiles
56
The second thing you need to know is what format the files are in.
–
You will need to be able to match the file name to the profile
In our example, the files are firstname.jpg.
57. Uploading Photos Into Profiles
57
Open your TDI Configuration Editor.
Under your project, create a New AssemblyLine
58. Uploading Photos Into Profiles
58
Name the Assembly Line
Remember to give your AssemblyLine and Components logical names
–
we named it build_collect_photos_in
59. Uploading Photos Into Profiles
59
After the new Assembly Line is created, Add a component
60. Uploading Photos Into Profiles
60
Choose the Profile Connector.
This will know how to connect directly to the
Profiles Database without having to specify
DB Connectivity
–
It is using the properties defined
when we ran the Profiles
Population Wizard
You can change the name if you wish.
You'll be using Iterator mode.
61. Uploading Photos Into Profiles
61
After that is complete, you can select the attributes that you will need.
For this example, all we need to iterate are:
–
givenName (i.e. FirstName)
–
uid (i.e. “ShortName” field, which for us is FirstName LastName)
62. Uploading Photos Into Profiles
62
In the Data Flow section, Add another component.
63. Uploading Photos Into Profiles
63
Choose File System Connector
Choose AddOnly Mode
64. Uploading Photos Into Profiles
64
Specify the path.
–
You can just use collect_photos.in which will be in the relative path
65. Uploading Photos Into Profiles
65
On the next screen, you should be prompted for the parser type.
–
Choose Simple Parser
–
See, we told you this was simple!
66. Uploading Photos Into Profiles
66
This will be the next screen. Just choose Finish from here
67. Uploading Photos Into Profiles
67
This is where it gets a little tricky. For our requirements, we need to have output lines with
attributes of photo and uid.
We must parse in work.givenName to the file path to build the name of the photo file:
–
Return “file:/c:/path/to/photos/” + work.givenName + “.jpg” for photo
–
work.uid will be used for uid
69. Uploading Photos Into Profiles
69
Open the collect_photos.in file to validate that the values were built as expected.
With the file path, note that on Windows it must be “/” instead of the usual “”
70. Uploading Photos Into Profiles
70
If you were to search the Profiles Directory currently, you would see that there are no profile
photos. This is quite bland.
71. Uploading Photos Into Profiles
71
But now that you've built the collect_photos.in file, all you have to do is run the
load_photos_from_files.bat Assembly Line
72. Uploading Photos Into Profiles
72
Now when you search the Profiles Directory, you can see that the photos have been loaded
(hopefully properly!) and this will provide a much better experience!
Hey - there's the Jackyl!
–
Never talk to me during the Jackyl
75. Adding Custom Fields to Profiles
•Out of the box, there are many available fields
–
This may be sufficient for some companies
–
Other companies may want to add other data
●
Can be populated from an alternate data source (which we will show you)
●
Can be maintained by employees via profile edits
75
76. Adding Custom Fields to Profiles
76
You may need to add custom fields to maximize the value of Profiles in your environment
–
For our demo we will be adding two fields
●
Addressed As *to be edited by the employees
●
Secret Service Code Name *to be populated by a custom AL
You will want to prepare ahead of time to know the fields you want as well as being
consistent with the labeling
–
Use alllowercase?
–
Use AllCamelCase?
●
Both work just be consistent
77. Adding Custom Fields to Profiles
77
Steps to add a custom field
–
Use wsadmin to check out the properties files
–
Edit the properties files
–
Check the files back in
–
Full resynchronize the node
–
Restart profiles
78. Adding Custom Fields to Profiles
78
The recommended method for modifying (most of) the properties files is to check them out
using the wsadmin service.
The first step is to navigate to the WAS Deployment Manager's bin directory
79. Adding Custom Fields to Profiles
79
Next, you launch wsadmin using the following commands:
–
wsadmin.sh (.bat) -lang jython -user <wasadmin> -password <waspassword> -port
8879
You will see that you're connected to the SOAP port for the Deployment Manager
80. Adding Custom Fields to Profiles
80
The files we modify will need to be checked out into a temporary directory.
We are creating it using the command line because that's what POTUS recommends.
81. Adding Custom Fields to Profiles
81
The next step is to start the Profiles Administration task:
–
execfile(“profilesAdmin.py”)
Then check out the configuration files into the temporary directory:
–
ProfilesConfigService.checkOutConfig(“<tmpdir>”, “<CellName>”)
82. Adding Custom Fields to Profiles
82
Now, open the folder and you can modify the files using a text editor.
–
We recommend notepad++ (Windows) or gedit (Linux)
The first file we need to edit is profiles-config.xml
83. Adding Custom Fields to Profiles
83
At the end of the <profilesExtensionAttributes> section, add in your attributes.
Here, we are using simple attributes (text), but there are other options with various
parameters.
One of our examples:
–
<simpleAttribute extensionId=”AddressedAs” length=”64”/>
84. Adding Custom Fields to Profiles
84
Still in profiles-config.xml, find the empty <templateNlsBundles> section
Add in the name you will use for the bundle
–
This will be used later to assign a label for the field
●
This is what will appear in Profiles as the field name
●
Optionally you can use bundles to translate fields names into additional languages
–
We are using: customBundle
●
Bundle name is case sensitive be consistent
85. Adding Custom Fields to Profiles
85
Back to Linux - Switch back to the temporary directory on the Profiles server
Edit the profiles-types.xml file
86. Adding Custom Fields to Profiles
86
In the <type> section, add an entry for each
custom attribute.
Note the 3 options for each property:
–
Ref: use the same case you decided earlier.
–
Updatability: whether the user can modify this
–
Hidden: whether it can be seen
87. Adding Custom Fields to Profiles
87
On the Profiles Server, you need to edit a template properties file.
–
Note there are different properties files for various languages
–
In our example, the English file is edited
Edit the following file:
–
<WAS Dmgr>/config/cells/<cell>/LotusConnectionsconfig/profiles/templates/resources/nls/template_en.properties
88. Adding Custom Fields to Profiles
88
After all of the stock labels from Profiles, we are adding our two new labels under a
commented line stating that these are new Extension Labels
–
Note the label on the left must be consistent with the case as used before
–
The text on the right is what will render in the Profile UI screens
Example: label.SSCodeName=Secret Service Code Name:
89. Adding Custom Fields to Profiles
89
Switch back to the temporary directory on the Profiles server
Edit the profileEdit.ftl file
–
This controls what is visible when, you guessed it, the Profile is in Edit Mode
90. Adding Custom Fields to Profiles
90
The order matters in this file, but in our example we have added the new form controls at the
end of the <@util.renderSection>
Example:
–
<@util.renderFormControl ref=”AddressedAs” singleColumnLayout=false
nlsKey=”label.AddressedAs”/>
91. Adding Custom Fields to Profiles
91
Switch back to the temporary directory on the Profiles server
Edit the profileDetails.ftl file
–
This controls what is visible when the Profile is in Read Mode
92. Adding Custom Fields to Profiles
92
There is a lot in this file.
We have highlighted the first section in which you will add the edits on the next slide.
The “jobInformation” section is what you see above the Profile tabs. Also can be referred to
as the Business Card section of the Profile.
93. Adding Custom Fields to Profiles
93
In this section, order matters.
This actually has nothing to do with
the Custom Fields, but is the best
place to show this.
We wanted to add the street address
to the Job Information Section.
–
This is in the Address1 and
Address2 sections
–
Note where the <br/> or “,” are
located as this controls spacing
and new lines.
94. Adding Custom Fields to Profiles
94
Find the section label for “contactInformation” as this will be where you make your next
edits.
95. Adding Custom Fields to Profiles
95
Immediately after the </util.renderProperty> ending tag for the secretaryName dataKey, we
have added a new section used to display the AddressedAs and SSCodeName
96. Adding Custom Fields to Profiles
96
Now, you need to create the customBundle properties file referenced above.
This is under the <ConnectionsSharedData> directory:
–
/opt/IBM/Connections/data/shared/customization/strings
–
Create the file that was referenced in the slide above:
●
com.whitehouse.resources.customBundle.properties
97. Adding Custom Fields to Profiles
97
The customBundle properties file only needs to have the labels as per below:
–
label.SSCodeName=Secret Service Code Name:
98. Adding Custom Fields to Profiles
98
Now that we have modified many of the files in the temporary check-out directory, we need
to check them back in!
This is easy – just switch back to your command window where wsadmin is still active and
issue this command:
–
ProfilesConfigService.checkInConfig()
99. Adding Custom Fields to Profiles
99
Make sure that you clear out the temporary directory.
100. Adding Custom Fields to Profiles
100
The next file we need to modify is the general Lotus Connections configuration file.
First, let's create another temporary directory for wsadmin.
101. Adding Custom Fields to Profiles
101
As before, you will now start wsadmin.
This time, though, you will launch the Connections Configuration service:
–
execfile(“connectionsConfig.py”)
Check out the configuration into the new tmpcommon directory.
102. Adding Custom Fields to Profiles
102
Open the tmpcommon directory and edit the LotusConnections-config.xml file
103. Adding Custom Fields to Profiles
103
Go to the <resources> section.
Add in an entry for the “customBundle” that we will be creating.
–
<widgetBundle prefix=”customBundle”
name=”com.whitehouse.resources.customBundle”/>
104. Adding Custom Fields to Profiles
104
Now, you will check in the configuration file (just as before)
105. Adding Custom Fields to Profiles
105
Finally, don't forget to clear out the tmpcommon directory!
106. Adding Custom Fields to Profiles
106
If you are familiar with WAS, you will know that we were doing this work in the Deployment
Manager.
Now we need to log into the ISC and do a full synchronize on the Node(s) so that all of the
properties files are pushed out to all of the Nodes for use by the Applications
107. Adding Custom Fields to Profiles
107
Expand System administration
Click Nodes
Select the Node and choose Full Resynchronize
108. Adding Custom Fields to Profiles
108
The last thing is to restart the Application Server after the Full Resynchronize has
completed.
Expand Server Types and open Websphere application servers
Select the server and choose Restart
109. Adding Custom Fields to Profiles
109
Open the Profile into Edit Mode and you should see the Custom Attributes
We will actually populate them later!
110. Adding Custom Fields to Profiles
110
Optionally, we need to make a couple of changes in the TDI Profiles Configuration file
This is only if you plan on using TDI to reference these custom fields
In the extracted TDI Solution directory from the Wizard, go to:
–
confLotusConnections-config directory
–
Edit tdi-profiles-config.xml
111. Adding Custom Fields to Profiles
111
Just as above, at the end of the <profilesExtensionAttributes> section, add in your attributes.
Here, we are using simple attributes (text), but there are other options with various
parameters.
One of our examples:
–
<simpleAttribute extensionId=”AddressedAs” length=”64”/>
112. Adding Custom Fields to Profiles
112
Again, this is optional, but now switch back to the TDI Lotus Connections Configuration
This is only if you plan on using TDI to reference these custom fields
In the extracted TDI Solution directory from the Wizard, go to:
–
confLotusConnections-config directory
–
Edit profiles-types.xml
113. Adding Custom Fields to Profiles
113
In the <type> section, add an entry for each
custom attribute.
Note the 3 options for each property:
–
Ref: use the same case you decided earlier.
–
Updatability: whether the user can modify this
–
Hidden: whether it can be seen
114. We are about Halfway there now
114
Chris has been thinking about the “Kitchen Sink” at Beaches and Cream for the last 40
minutes
116. Creating a Custom AssemblyLine
116
A quick recap of where we are
–
We have run the Profiles Population Wizard creating a profile with very basic
information
–
We created a TDI AssemblyLine to help us populate photos in to Profiles
–
We added two custom fields in to our Profiles deployment
With all that completed we will now move in to more custom code
–
You are now being presented code developed by a couple of Admins
–
Be afraid... be very afraid
●
Not that afraid it all works
117. Creating a Custom AssemblyLine
117
The Profiles Population Wizard only got us started
–
We need to write custom code to integrate with our HR system and populate other data
–
For Demo purposes our 'HR System' is a MySQL Database
–
We are going to populate the following fields in Profiles
●
Department
●
Preferred First Name (If one exists)
●
Location
●
Office
●
Title
●
Reports To
●
Manager Status (Y or N)
118. Creating a Custom AssemblyLine
118
The first step is to define our properties for the HR System
119. Creating a Custom AssemblyLine
119
Next we are going to create a new AssemblyLine
120. Creating a Custom AssemblyLine
120
Next we will name our AssemblyLine
–
Try to use logical names for your AL and their components
121. Creating a Custom AssemblyLine
121
We now have a blank AssemblyLine just waiting for some code
122. Creating a Custom AssemblyLine
122
Next we Click on Add Component
–
The first Connector we are going to use is the JDBC Connector
123. Creating a Custom AssemblyLine
123
The Connection parameters were defined from our properties file
124. Creating a Custom AssemblyLine
124
We are now going to test the connection by clicking on Connect
125. Creating a Custom AssemblyLine
125
If your connection is working Next will be available to click to see the data
126. Creating a Custom AssemblyLine
126
If your connection fails
–
Remain Calm and keep your arms and legs in the vehicle
–
Check your Login Credentials
–
Look in the logs subdirectory of your solution directory for additional info
–
Remember to check network connectivity
–
Are there any firewalls that need ports open between TDI and the data source?
127. Creating a Custom AssemblyLine
127
Next we are going to add the fields that we need
–
We can do this by clicking Add or by simply dragging and dropping them over
128. Creating a Custom AssemblyLine
128
Our Feed is now complete
–
The Feed is where we read in the fields we are going to push in to Profiles
–
Next we are going to create our Data Flow
●
This is where we establish a Link Criteria to match records and populate data
●
We are also going to build in some basic error handling
129. Creating a Custom AssemblyLine
129
We are going to add a component to the Data Flow
–
We are again using the JDBC Component connecting to the Profiles Database
130. Creating a Custom AssemblyLine
130
Next we are going to add our Connection Attributes from our already populated Properties
–
As a reminder the property names are clickable
131. Creating a Custom AssemblyLine
131
Click on Connect to check the connectivity to the Database
132. Creating a Custom AssemblyLine
132
Clicking Next allows you to browse data from the database
133. Creating a Custom AssemblyLine
133
The next step it to define the Link Criteria
–
This is where we tell TDI how to match records between our HR System and Profiles
–
You need to find a unique key across your different data repositories
–
In our demo we are using Employee Number
134. Creating a Custom AssemblyLine
134
To define the Link Criteria switch to the Link Criteria Tab and click Add
135. Creating a Custom AssemblyLine
135
Use the Dropdowns to select the fields to Match
–
On the left we are using PROF_EMPLOYEE_NUMBER which is a field from the
Profiles Database
–
On the right we are using employeeid which is a field from our HR system
Note while we are only using one you can specify multiple Link Criteria
–
You can require them all to be met or any to met
–
You can also script Link Criteria
137. Creating a Custom AssemblyLine
137
Our Completed Link Criteria looks like this
138. Creating a Custom AssemblyLine
138
We are now going to add the fields from the HR System and map them to the correct field in
the Profiles database
–
The next slide contains our field mappings
–
I suggest before you start writing code you write out all your mappings
139. Creating a Custom AssemblyLine
Field in Profiles
Field in HR
PROF_DEPARTMENT_NUMBER
department
PROF_IS_MANAGER
ismanager
PROF_JOB_RESPONSIBILITIES
title
PROF_PHYSICAL_DELIVERY_OFFICE
office
PROF_PREFERRED_FIRST_NAME
knownas
PROF_WORK_LOCATION
location
PROF_MGR_UID*
reports_to**
PROF_MGR_UID_LOWER*
reports_to**
139
140. Creating a Custom AssemblyLine
* Manager UID is stored in two fields PROF_MANAGER_UID and
PROF_MANAGER_UID_LOWER
–
We will show you how to retrieve these values from the Profiles Database
** Our HR system contains the employee number of the manager
–
We will show you how we take the employee number and use it to retrieve the required
values (PROF_MANAGER_UID and PROF_MANAGER_UID_LOWER) from Profiles
140
141. Creating a Custom AssemblyLine
141
Click Add to add fields to the Output Map
142. Creating a Custom AssemblyLine
142
Scroll down the attribute list to get to find the fields from the HR system
143. Creating a Custom AssemblyLine
143
For now we are going to select everything except for
–
employeeid
–
reports_to
employeeid is our key and already exists in Profiles
–
Rememebr we specified this as our Link Criteria
report_to we will cover a little later on
145. Creating a Custom AssemblyLine
145
Our Mapping now looks like this
–
We have to update the Component Attribute to map to the correct Profiles field
146. Creating a Custom AssemblyLine
146
Click in each field and use the dropdown to select the appropriate field
–
Refer back to our mapping table
147. Creating a Custom AssemblyLine
147
Next we are going to add in some basic error handling
–
We can't assume that for every record in the HR system there is a matching profile
–
Without error handling the AssemblyLine would fail as soon as it could not match a
record
–
We are going to implement our error handling through the Hooks tab
●
For our demo we are simply going to use the “Default on Error” hook
●
We are going to log to the console
– You can also write out log files
●
There are many hooks you can use for logging and error handling
149. Creating a Custom AssemblyLine
149
Scroll down and enable the 'Default on Error' Hook
–
This is we are adding our code
150. Creating a Custom AssemblyLine
150
We are using 'task.logmsg' to write the error out to the console
We are using system.skipEntry to skip the unmatched entry
–
When dealing with larger amounts of data you probably want to write your errors out to
log files for later followup
–
You can write both to the console and a log file in one Hook
151. Creating a Custom AssemblyLine
151
Where are we?
–
Hopefully you are following along here
–
We are close to being done with the AssemblyLine
–
We just have that small matter of dealing with the reports to structure
152. Creating a Custom AssemblyLine
152
Why is reporting structure different than other fields?
–
In our HR system Managers are identified by their employee ID number
–
In Profiles Managers are identified by their UID
●
Usually First <space> Last Name
–
Remember this is our demo data your data might be different
153. Creating a Custom AssemblyLine
153
We are going to add another JDBC Connector to the profiles DB
Define an additional Link Criteria
Take the employeeid and translate it in to the managers UID
–
Remember Profiles wants both the UID Field
●
First <space> Last
–
And The UID_LOWER Field
●
first <space> last
We are going to place this component above the update_profiles component as they run in
the order they are specified
154. Creating a Custom AssemblyLine
154
Click on Add Component
–
Hopefully this is starting to look familiar
155. Creating a Custom AssemblyLine
155
We are once again using the JDBC Connector
–
Note this time we are setting it in Lookup mode
156. Creating a Custom AssemblyLine
156
The Connection Properties are filled in using values from our Properties file
157. Creating a Custom AssemblyLine
157
By default the component was added to the end of the AssemblyLine
158. Creating a Custom AssemblyLine
158
Simply drag and drop the component to place it before the update_profiles component
159. Creating a Custom AssemblyLine
159
Next lets test the connection and add the attributes we need
–
We only need to retrieve PROF_UID, and PROD_UID_LOWER
160. Creating a Custom AssemblyLine
160
Next we are going to rename the Work Attributes
–
We are doing this to keep things clear later on and not confuse it with PROF_UID in
Profiles in the update_profiles component
161. Creating a Custom AssemblyLine
161
Lets add our Link Criteria
–
We are using reports_to and PROF_EMPLOYEE_NUMBER again
–
Remember what we are trying to do here is take the Manager's employeeid out of the
HR system, use it to lookup in profiles and retrieve their PROF_UID and PROF_UID
LOWER values
–
We will then write the PROF_UID to PROF_MANAGER_UID and PROF_UID_LOWER
to PROF_MANAGER_UID_LOWER
–
This is what builds the reporting structure in Profiles
163. Creating a Custom AssemblyLine
163
Finally we need a little error handling
–
We are going to use the Default On Error Hook again but do things a little differently
–
We don't want to skip entries if a record is not found
●
If we did the President (who reports to no one) would not have his profile
populated
●
Would you want to skip your CEO's Profile? I didn't think so
●
If there is no match for the manager we will use the Hook to assign values to the
variables so that the update_profiles component will run
165. Creating a Custom AssemblyLine
165
One last detail to clean up
–
We need to add the MGR_UID and MGR_UID_LOWER in the update_profiles
component and map them to PROF_MANAGER_UID and
PROF_MANAGER_UID_LOWER
–
This is the same process we followed earlier to map the rest of the fields we are
populating
166. Creating a Custom AssemblyLine
166
In the update_profiles component click on Add to assign the attributes
167. Creating a Custom AssemblyLine
167
The component now looks like this
–
We still have to complete the assignments of the new attributes
168. Creating a Custom AssemblyLine
168
Here are the completed attribute assignments
169. Creating a Custom AssemblyLine
169
We are now ready to run the AssemblyLine
–
To run the AssemblyLine click “Run in console”
170. Creating a Custom AssemblyLine
170
This is the console output
–
Note that the HR Data included William Clinton but he was not found in Profiles
–
Also note the importance of logically naming your components
●
Each component name is displayed with its individual results in the console
171. Creating a Custom AssemblyLine
171
If you need to troubleshoot you can turn on detailed logging
–
Detailed logging can be turned on globally for the entire AssemblyLine
–
Detailed logging can also be enabled for a specific component
172. Creating a Custom AssemblyLine
172
Turning on Global Detailed Logging
–
Click on “Options” and select AssemblyLine settings
174. Creating a Custom AssemblyLine
174
To enable detailed logging for a specific component
–
Check the Detailed Log box on the Connection Tab
175. Creating a Custom AssemblyLine
175
Detailed Logging will
–
Dramatically increase the console output
–
Slow down your AssemblyLines
While useful for troubleshooting, use it only when needed
177. Creating a Custom AssemblyLine
177
Almost
We are going to create just one more AssemblyLine
–
If you recall in an earlier section we created a field for Secret Service Code Name
–
We are now going to populate that with data received from the Secret Service
The Secret Service would not give us access to their Database
–
They provided a CSV file with the information we needed
178. Creating a Custom AssemblyLine
Our input file looks like this*
*for West Wing fans some of these names appear in the show others we just made up
178
179. Creating a Custom AssemblyLine
179
We are going to create a new AssemblyLine and our feed component will use the File
Connector and read the Secret Service input file
180. Creating a Custom AssemblyLine
180
We are using the File System Connector as an Iterator
–
Click Next to continue configuring the Connector
181. Creating a Custom AssemblyLine
181
Next we are going to pick the file we want to read
–
You can type it in or use Select to browse the filesystem
182. Creating a Custom AssemblyLine
182
Select a parser
–
We are using the CSV parser
183. Creating a Custom AssemblyLine
183
The default separator in the CSV parser is a semi-colon, we need to change that to a
comma to support our file
–
Then click on advanced to define the fields
184. Creating a Custom AssemblyLine
184
Define the field names one per line
–
This matches the input file we showed earlier
–
These will also become the attributes in the AL Component
–
Click Finish to complete the configuration
185. Creating a Custom AssemblyLine
185
We are now ready to connect to our data source and select the attributes we need
186. Creating a Custom AssemblyLine
186
We only need to select two fields
–
EmployeeID
–
codename
187. Creating a Custom AssemblyLine
187
The Feed section is now complete we can move on to our Data Flow
We are going to use the JDBC Connector to write data to the Profiles DB
Custom Attributes are stored in the profiles_extensions table
–
To write to this table we need a few pieces of information
●
The user's PROF_KEY from the employee table
●
The PROF_PROPERTY_ID in this case SSCodeName (case sensitive)
– We defined this value earlier when we created the field
●
The value retrieved from the CSV file and to be written to the PROF_VALUE field
188. Creating a Custom AssemblyLine
188
We are going to add a JDBC Connector in Lookup Mode
189. Creating a Custom AssemblyLine
189
Define the connection properties using our properties file
–
Note for the lookup we connect to the employee table
–
Later we will write to the profiles_extensions table
190. Creating a Custom AssemblyLine
190
Test the connection and select the PROF_KEY attribute
191. Creating a Custom AssemblyLine
191
Next we define the Link Criteria using EmployeeID and PROF_EMPLOYEE_NUMBER
192. Creating a Custom AssemblyLine
192
Lets include some basic error handling
–
We will simply skip any entry that has no match
193. Creating a Custom AssemblyLine
193
We are going to add one more JDBC Component in Update mode to write the data to the
profiles_extensions table of the database
194. Creating a Custom AssemblyLine
194
Fill in the database connection properties from the properties file
–
Note we are now connecting to the profiles_extensions table
195. Creating a Custom AssemblyLine
195
Next we are going to add our attributes
196. Creating a Custom AssemblyLine
196
The attributes have been added we now have to map them to the correct fields in the
database
197. Creating a Custom AssemblyLine
197
We mapped PROF_KEY and PROF_VALUE
198. Creating a Custom AssemblyLine
198
Next we are going to click add to create a new attribute
–
We will assign it a value of SSCodeName and map it to PROF_PROPERTY_ID
199. Creating a Custom AssemblyLine
199
We are going to use substitution text to assign the value since it is the same for every record
–
Double click the Assignment value to edit it
–
Remember this is case sensitive
200. Creating a Custom AssemblyLine
200
Finally lets not forget our Link Criteria
–
In this case we are using PROF_KEY as the Link Criteria
201. Creating a Custom AssemblyLine
201
The completed component looks like this
202. Creating a Custom AssemblyLine
202
When the AssemblyLine is run the output is
203. Creating a Custom AssemblyLine
203
The profiles_extensions table looks like this with the data populated
–
Remember it is the PROF_KEY that ties a record to a profile
206. Creating a Custom AssemblyLine
206
A quick recap on what we covered in this section
–
Map out your data before you write code
–
Make sure to include error handling in all of your AL Components
–
Use detailed logging for debugging errors
–
Give all your AL and Components logical names
Use the examples here to pull data from various systems in your organization and populate
Profiles
The more information you can provide in Profiles the more value your organization will see
in Profiles
Don't be overwhelmed we covered a lot of information but once you get the hang of TDI it is
easy to move data around between systems
208. Shameless Plug for my Session on Wednesday
BP311 : Sunny Days, (Smart)Cloud-y Users
Date/Time : Wed, 29/Jan, 05:30 PM-06:30 PM
Room : Dolphin-S. Hem IV-V
Learn how you can leverage the data in your existing on-premises or
cloud systems (LDAP, Profiles, Active Directory, and others) to
automatically provision users in IBM Smart Cloud for Social
Business. This session will provide a basic introduction to Tivoli
Directory Integrator, and how to connect to multiple data sources to
create users in IBM SmartCloud.
208
209. Summary
209
What we showed you today
–
The cast of The West Wing
–
How to create Profiles using the Profiles Population Wizard
–
How to use the PhotoConnector to attach photos to Profiles
–
How to add custom fields to Profiles
–
How to incorporate data from other systems in to Profiles using Tivoli Directory
Integrator
210. Summary
210
What we didn't show you today
–
We spent quite a bit of time showing you how to put data IN to profiles
–
You can use the same tools and techniques we showed you here to take data OUT of
profiles
●
With user edited data and custom fields Profiles can become a valuable source of
information
●
You can use TDI to take data back out of Profiles and populate other systems with
that data
211. Additional Resources
211
IBM Connections Documentation
–
http://curi0.us/45doc
Tivoli Directory Integrator 7.1 Documentation
–
http://curi0.us/tdi71doc
IBM Data Studio
–
http://curi0.us/dstudio
Notepad++
–
http://curi0.us/noteplus
Softerra LDAP Browser
–
http://curi0.us/ldbrowser
IBM Tivoli Directory Integrator Users Group
–
http://curi0.us/tdiusers
212. Additional Resources
212
The West Wing on IMDB
–
http://www.imdb.com/title/tt0200276/
The West Wing Complete Series on Amazon
–
http://www.amazon.com/The-West-Wing-Complete-Collection/dp/B000HC2LI0
–
Available to view on Netflix and Amazon Prime
W3 Schools Javascript
–
http://www.w3schools.com/js/
Code Academy
–
http://www.codecademy.com/
TDI Google Group / Discussion Forum
–
http://curi0.us/tdigroup
213. Additional Resources
Beaches and Cream
–
Our Favorite Ice Cream at Lotusphere
–
Located between the Yacht & Beach Club
https://disneyworld.disney.go.com/dining/beach-club-resort/beaches-and-cream-soda-shop/
213
214. Contact Us
Mitch
Email: mitch@curiousmitch.com
Twitter: @curiousmitch
Blog: http://www.curiousmitch.com
214
Chris
Email: chris.whisonant@bestmethods.com
Twitter: @cwhisonant
Blog: https://www.socialbizug.org/blogs/lotusnut
215. Access Connect Online to complete your session surveys using any:
– Web or mobile browser
– Connect Online kiosk onsite
215
216. Hopefully you are not
But we would be happy to answer any questions
216
Point out that the HR system is a non-IBM Comportment this is where most of our custom code comes in to play
Mitch
Mitch
Mitch
Point out 5378 was windows with current 4.5 version could be different on Linux/AIX and in future releases
Point out 5378 was windows with current 4.5 version could be different on Linux/AIX and in future releases
Chris
Point out here that what has been provided is the data flow section
We need to create the input file for the Feed section
Point out we chose to show the bat file method for running the AL but it can also be run through the Configuration Editor
Chris
Can point out that TDI Properties only needs to be updated if you plan to use TDI to populate the field
(not even needed if using a custom AL/JDBC only need to us e custom field with profile connector
Mitch
Remind people how to get there it is NOT Obvious
Points to make
1. you can look at using the ProfilesConnector – using JDBC is a better more flexible teaching example
2. Show how we used Search to filter the Connectors
Point out TDI's ability to manipulate data, chance case, etc in order to make sure records match or are in the proper case
For example if you are going to use EMAIL you probably want to normalize case
Point out if we wanted we could only retrieve PROF_UID and use javacript to manupulate it in to lower case
Point out
This turns on detailed logging for all components
Can be extremely verbose
Might be better turning on logging for a specific components (next slide)
Point out some of the other options specifically Max Reads (iterator)
Mitch
Remember to Fill out your Evals
Remember to remind people about Session Evaluations