How to Create a Perfect Profile: A Hitchiker's Guide to A Smarter Workforce
-
Upload
mitch-cohen -
Category
Business
-
view
1.623 -
download
0
Transcript of How to Create a Perfect Profile: A Hitchiker's Guide to A Smarter Workforce
SHOW304: How to Create a Perfect Profile: A Hitchhikers Guide to A Smarter Workforce
Mitch Cohen, Colgate-PalmoliveChris Whisonant, Best Methods
Mitch
Software we are using in this session
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
Have to keep the lawyers happy
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
Our Cast of Characters
Want to talk about this session?
@curiousmitch@cwhisonant
#IBMConnect#SHOW304
About Us
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
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
Mitch then hand off to Chris
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
Chris
Our Demo Environment
Point out that the HR system is a non-IBM Comportment this is where most of our custom code comes in to play
Before we get started
Our Goal today is to show you how to create a Profile that makes sense for your organization
We will demoOut 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
Mitch
Before we get started
A profile populated by the population wizard with data from LDAP looks like this
Before we get Started
When we are done today it will look like this
Before we get Started
As long as Chris remembers who he reports to this should all be easy
ppt template divider slide 1c-01.png
Introduction to Tivoli Directory Integrator (TDI)
Mitch
Introduction to TDI
Please Note IBM has recently rebranded products in the Tivoli BrandTivoli Directory Integrator is now known as IBM Security Directory Integrator
IBM Connections 4.5 requires TDI 7.1This 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
Introduction to TDI
What is Tivoli Directory Integrator?
Introduction to TDI
TDI Terminology
ProjectsCollection of AssemblyLines and Resources
ConnectorsPre built templates to connect to different systems
Many installed with TDI
If you are adventurous you can write your ownConnections ships with custom TDI Connectors
AssemblyLine are made up ofFeeds and Data Flows
Workspace
Solution Directory
Introduction to TDI
When you install TDI select this option for your Solution Directory
Introduction to TDI
The TDI Configuration Editor
Introduction to TDI
Partial list of the many Connectors TDI Ships with
Introduction to TDI
AssemblyLines
AssemblyLines are where your TDI Code livesOne AssemblyLine can contain multiple tasks
One AssemblyLine can call another AssemblyLine
AssemblyLines are made up of two partsFeed
Data Flow
We will be showing you today
AssemblyLines that Ship with IBM Connections
Examples of custom AssemblyLines
Introduction to TDI
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 environmentsi.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
Introduction to TDI
Introduction to TDI
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
Introduction to TDI
TDI Connectors
In this session we will be working with Connectors that ship with TDILDAP Connector
JDBC Connector
File Connector
Connectors that ship with IBM ConnectionsProfile Connector
Photo Connector
ppt template divider slide 1c-01.png
The Profiles Population Wizard
Mitch
The Profiles Population Wizard
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
The Profiles Population Wizard
Where do I get the Profiles Population Wizard?
You download it from Passport Advantage
The Profiles Population Wizard
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
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
Point out 5378 was windows with current 4.5 version could be different on Linux/AIX and in future releases
The Profiles Population Wizard
If you guessed B you were right
Point out 5378 was windows with current 4.5 version could be different on Linux/AIX and in future releases
The Profiles Population Wizard
To launch the wizards run populationWizard.bat
You can also click on the batch file in Explorer
We like the command line
The Profiles Population Wizard
Click Next to continue
The Profiles Population Wizard
If you installed TDI to the default location c:\Program Files\ibm\TDI\V7.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
The Profiles Population Wizard
Use browse to point to the install
If you do not see this screen it means the wizard found TDI on its own
The Profiles Population Wizard
Select your Database Type
We are using DB2 for our demo today
The Profiles Population Wizard
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
The Profiles Population Wizard
Specify your LDAP Server hostname and port
If you are using SSL make sure you check the box
The Profiles Population Wizard
Specify the Login ID and Password for LDAP
The Profiles Population Wizard
Specify your LDAP search base and Filter
The Profiles Population Wizard
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 nullThis 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
The Profiles Population Wizard
In this example we are setting description to null
The Profiles Population Wizard
Next decide if you want to populate any of these other tables
You can always do these later
The Profiles Population Wizard
Review the summary of your configuration
If you are ready to go click Configure and watch the magic
The Profiles Population Wizard
Depending on the size of your directory this could take a while
The Profiles Population Wizard
When the wizard finishes you can view see the results or click to view the complete log
The Profiles Population Wizard
All of the Connection Properties we input in the wizard are saved to
profiles_tdi.properties
The Profiles Population Wizard
All of our field mapping are saved to
map_dbrepos_from_source.properties
The Profiles Population Wizard
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 LDAPName
Email address
Employee ID Number
This is fairly typical
We are going to show you later how we use TDI to add other dataTitle
Manager
Location
And others
The Profiles Population Wizard
ppt template divider slide 1c-01.png
Uploading Photos Into Profiles
Chris
Uploading Photos Into Profiles
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!
Point out here that what has been provided is the data flow section
We need to create the input file for the Feed section
Uploading Photos Into Profiles
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
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.jpguid:cwhisonant.photo:file:/c:/photosfolder/otherfile.jpguid:ahayes
After seeing that, the first thing you ask yourself is:
How in the world do I build a file in THAT format?
Uploading Photos Into Profiles
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
Uploading Photos Into Profiles
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.
Uploading Photos Into Profiles
Open your TDI Configuration Editor.
Under your project, create a New AssemblyLine
Uploading Photos Into Profiles
Name the Assembly Line
Remember to give your AssemblyLine and Components logical names
we named it build_collect_photos_in
Uploading Photos Into Profiles
After the new Assembly Line is created, Add a component
Uploading Photos Into Profiles
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.
Uploading Photos Into Profiles
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)
Uploading Photos Into Profiles
In the Data Flow section, Add another component.
Uploading Photos Into Profiles
Choose File System Connector
Choose AddOnly Mode
Uploading Photos Into Profiles
Specify the path.
You can just use collect_photos.in which will be in the relative path
Uploading Photos Into Profiles
On the next screen, you should be prompted for the parser type.
Choose Simple Parser
See, we told you this was simple!
Uploading Photos Into Profiles
This will be the next screen. Just choose Finish from here
Uploading Photos Into Profiles
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
Uploading Photos Into Profiles
Now, you can run this Assembly Line
Uploading Photos Into Profiles
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 \
Uploading Photos Into Profiles
If you were to search the Profiles Directory currently, you would see that there are no profile photos. This is quite bland.
Uploading Photos Into Profiles
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
Point out we chose to show the bat file method for running the AL but it can also be run through the Configuration Editor
Uploading Photos Into Profiles
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
Uploading Photos Into Profiles
ppt template divider slide 1c-01.png
Adding Custom fields toIBM Connections Profiles
Chris
Adding Custom Fields to Profiles
Out of the box, there are many available fieldsThis may be sufficient for some companies
Other companies may want to add other dataCan be populated from an alternate data source (which we will show you)
Can be maintained by employees via profile edits
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
Next, you launch wsadmin using the following commands:
wsadmin.sh (.bat) -lang jython -user -password -port 8879
You will see that you're connected to the SOAP port for the Deployment Manager
Adding Custom Fields to Profiles
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.
Adding Custom Fields to Profiles
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(, )
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
At the end of the section, add in your attributes.
Here, we are using simple attributes (text), but there are other options with various parameters.
One of our examples:
Adding Custom Fields to Profiles
Still in profiles-config.xml, find the empty section
Add in the name you will use for the bundle
This will be used later to assign a label for the fieldThis 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: customBundleBundle name is case sensitive be consistent
Adding Custom Fields to Profiles
Back to Linux - Switch back to the temporary directory on the Profiles server
Edit the profiles-types.xml file
Adding Custom Fields to Profiles
In the 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
Adding Custom Fields to Profiles
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:
/config/cells//LotusConnections-config/profiles/templates/resources/nls/template_en.properties
Adding Custom Fields to Profiles
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:
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
The order matters in this file, but in our example we have added the new form controls at the end of the
Example:
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
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.
Adding Custom Fields to Profiles
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
or , are
located as this controls spacing
and new lines.
Adding Custom Fields to Profiles
Find the section label for contactInformation as this will be where you make your next edits.
Adding Custom Fields to Profiles
Immediately after the ending tag for the secretaryName dataKey, we have added a new section used to display the AddressedAs and SSCodeName
Adding Custom Fields to Profiles
Now, you need to create the customBundle properties file referenced above.
This is under the directory:
/opt/IBM/Connections/data/shared/customization/strings
Create the file that was referenced in the slide above:com.whitehouse.resources.customBundle.properties
Adding Custom Fields to Profiles
The customBundle properties file only needs to have the labels as per below:
label.SSCodeName=Secret Service Code Name:
Adding Custom Fields to Profiles
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()
Adding Custom Fields to Profiles
Make sure that you clear out the temporary directory.
Adding Custom Fields to Profiles
The next file we need to modify is the general Lotus Connections configuration file.
First, let's create another temporary directory for wsadmin.
Adding Custom Fields to Profiles
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.
Adding Custom Fields to Profiles
Open the tmpcommon directory and edit the LotusConnections-config.xml file
Adding Custom Fields to Profiles
Go to the section.
Add in an entry for the customBundle that we will be creating.
Adding Custom Fields to Profiles
Now, you will check in the configuration file (just as before)
Adding Custom Fields to Profiles
Finally, don't forget to clear out the tmpcommon directory!
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
Expand System administration
Click Nodes
Select the Node and choose Full Resynchronize
Adding Custom Fields to Profiles
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
Adding Custom Fields to Profiles
Open the Profile into Edit Mode and you should see the Custom Attributes
We will actually populate them later!
Adding Custom Fields to Profiles
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:
\conf\LotusConnections-config directory
Edit tdi-profiles-config.xml
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
Adding Custom Fields to Profiles
Just as above, at the end of the section, add in your attributes.
Here, we are using simple attributes (text), but there are other options with various parameters.
One of our examples:
Adding Custom Fields to Profiles
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:
\conf\LotusConnections-config directory
Edit profiles-types.xml
Adding Custom Fields to Profiles
In the 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
We are about Halfway there now
Chris has been thinking about the Kitchen Sink at Beaches and Cream for the last 40 minutes
ppt template divider slide 1c-01.png
Creating a Custom AssemblyLine
Mitch
Creating a Custom AssemblyLine
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 afraidNot that afraid it all works
Creating a Custom AssemblyLine
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 ProfilesDepartment
Preferred First Name (If one exists)
Location
Office
Title
Reports To
Manager Status (Y or N)
Creating a Custom AssemblyLine
The first step is to define our properties for the HR System
Creating a Custom AssemblyLine
Next we are going to create a new AssemblyLine
Creating a Custom AssemblyLine
Next we will name our AssemblyLine
Try to use logical names for your AL and their components
Creating a Custom AssemblyLine
We now have a blank AssemblyLine just waiting for some code
Creating a Custom AssemblyLine
Next we Click on Add Component
The first Connector we are going to use is the JDBC Connector
Creating a Custom AssemblyLine
The Connection parameters were defined from our properties file
Remind people how to get there it is NOT Obvious
Creating a Custom AssemblyLine
We are now going to test the connection by clicking on Connect
Creating a Custom AssemblyLine
If your connection is working Next will be available to click to see the data
Creating a Custom AssemblyLine
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?
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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 FlowThis is where we establish a Link Criteria to match records and populate data
We are also going to build in some basic error handling
Creating a Custom AssemblyLine
We are going to add a component to the Data Flow
We are again using the JDBC Component connecting to the Profiles Database
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
Creating a Custom AssemblyLine
Next we are going to add our Connection Attributes from our already populated Properties
As a reminder the property names are clickable
Creating a Custom AssemblyLine
Click on Connect to check the connectivity to the Database
Creating a Custom AssemblyLine
Clicking Next allows you to browse data from the database
Creating a Custom AssemblyLine
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
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
Creating a Custom AssemblyLine
To define the Link Criteria switch to the Link Criteria Tab and click Add
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Link Criteria Dropdowns
Creating a Custom AssemblyLine
Our Completed Link Criteria looks like this
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Field in ProfilesField in HR
PROF_DEPARTMENT_NUMBERdepartment
PROF_IS_MANAGERismanager
PROF_JOB_RESPONSIBILITIEStitle
PROF_PHYSICAL_DELIVERY_OFFICEoffice
PROF_PREFERRED_FIRST_NAMEknownas
PROF_WORK_LOCATIONlocation
PROF_MGR_UID*reports_to**
PROF_MGR_UID_LOWER*reports_to**
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 managerWe 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
Creating a Custom AssemblyLine
Click Add to add fields to the Output Map
Creating a Custom AssemblyLine
Scroll down the attribute list to get to find the fields from the HR system
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Our selected fields
Creating a Custom AssemblyLine
Our Mapping now looks like this
We have to update the Component Attribute to map to the correct Profiles field
Creating a Custom AssemblyLine
Click in each field and use the dropdown to select the appropriate field
Refer back to our mapping table
Creating a Custom AssemblyLine
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 tabFor our demo we are simply going to use the Default on Error hook
We are going to log to the consoleYou can also write out log files
There are many hooks you can use for logging and error handling
Creating a Custom AssemblyLine
Navigate to the Hooks tab
Creating a Custom AssemblyLine
Scroll down and enable the 'Default on Error' Hook
This is we are adding our code
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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 Last Name
Remember this is our demo data your data might be different
Creating a Custom AssemblyLine
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 Last
And The UID_LOWER Fieldfirst last
We are going to place this component above the update_profiles component as they run in the order they are specified
Creating a Custom AssemblyLine
Click on Add Component
Hopefully this is starting to look familiar
Creating a Custom AssemblyLine
We are once again using the JDBC Connector
Note this time we are setting it in Lookup mode
Creating a Custom AssemblyLine
The Connection Properties are filled in using values from our Properties file
Creating a Custom AssemblyLine
By default the component was added to the end of the AssemblyLine
Creating a Custom AssemblyLine
Simply drag and drop the component to place it before the update_profiles component
Creating a Custom AssemblyLine
Next lets test the connection and add the attributes we need
We only need to retrieve PROF_UID, and PROD_UID_LOWER
Point out if we wanted we could only retrieve PROF_UID and use javacript to manupulate it in to lower case
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Link Criteria
Creating a Custom AssemblyLine
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 foundIf 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
Creating a Custom AssemblyLine
Error Handling
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
In the update_profiles component click on Add to assign the attributes
Creating a Custom AssemblyLine
The component now looks like this
We still have to complete the assignments of the new attributes
Creating a Custom AssemblyLine
Here are the completed attribute assignments
Creating a Custom AssemblyLine
We are now ready to run the AssemblyLine
To run the AssemblyLine click Run in console
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Turning on Global Detailed Logging
Click on Options and select AssemblyLine settings
Creating a Custom AssemblyLine
Check the Detailed Log box
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)
Creating a Custom AssemblyLine
To enable detailed logging for a specific component
Check the Detailed Log box on the Connection Tab
Creating a Custom AssemblyLine
Detailed Logging will
Dramatically increase the console output
Slow down your AssemblyLines
While useful for troubleshooting, use it only when needed
Creating a Custom AssemblyLine
Are we there yet?
Creating a Custom AssemblyLine
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
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
Creating a Custom AssemblyLine
We are going to create a new AssemblyLine and our feed component will use the File Connector and read the Secret Service input file
Creating a Custom AssemblyLine
We are using the File System Connector as an Iterator
Click Next to continue configuring the Connector
Creating a Custom AssemblyLine
Next we are going to pick the file we want to read
You can type it in or use Select to browse the filesystem
Creating a Custom AssemblyLine
Select a parser
We are using the CSV parser
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
We are now ready to connect to our data source and select the attributes we need
Creating a Custom AssemblyLine
We only need to select two fields
EmployeeID
codename
Creating a Custom AssemblyLine
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 informationThe 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
Creating a Custom AssemblyLine
We are going to add a JDBC Connector in Lookup Mode
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Test the connection and select the PROF_KEY attribute
Creating a Custom AssemblyLine
Next we define the Link Criteria using EmployeeID and PROF_EMPLOYEE_NUMBER
Creating a Custom AssemblyLine
Lets include some basic error handling
We will simply skip any entry that has no match
Creating a Custom AssemblyLine
We are going to add one more JDBC Component in Update mode to write the data to the profiles_extensions table of the database
Creating a Custom AssemblyLine
Fill in the database connection properties from the properties file
Note we are now connecting to the profiles_extensions table
Creating a Custom AssemblyLine
Next we are going to add our attributes
Creating a Custom AssemblyLine
The attributes have been added we now have to map them to the correct fields in the database
Creating a Custom AssemblyLine
We mapped PROF_KEY and PROF_VALUE
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
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
Creating a Custom AssemblyLine
Finally lets not forget our Link Criteria
In this case we are using PROF_KEY as the Link Criteria
Creating a Custom AssemblyLine
The completed component looks like this
Creating a Custom AssemblyLine
When the AssemblyLine is run the output is
Creating a Custom AssemblyLine
The profiles_extensions table looks like this with the data populated
Remember it is the PROF_KEY that ties a record to a profile
Creating a Custom AssemblyLine
Creating a Custom AssemblyLine
Creating a Custom AssemblyLine
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
ppt template divider slide 1c-01.png
Summary
Mitch
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.
Summary
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
Summary
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 profilesWith 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
Additional Resources
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
Additional Resources
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 Forumhttp://curi0.us/tdigroup
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/
Contact Us
Mitch
Email: [email protected]: @curiousmitchBlog: http://www.curiousmitch.com
Chris
Email: [email protected]: @cwhisonantBlog: https://www.socialbizug.org/blogs/lotusnut
ppt template thank you 1-01.pngAccess Connect Online to complete your session surveys using any:
Web or mobile browser
Connect Online kiosk onsite
Remember to Fill out your Evals
Hopefully you are not
But we would be happy to answer any questions
Remember to remind people about Session Evaluations
Copyright IBM Corporation 2014. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
IBM, the IBM logo, ibm.com, IBM Connections, IBM DB2, IBM Sametime, IBM Notes and Domino, IBM SmartCloud for Social Business, Tivoli Directory Integrator, and IBM Security Directory Integrator are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or ), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at Copyright and trademark information at www.ibm.com/legal/copytrade.shtml
Availability. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
Acknowledgements and Disclaimers
ppt template title slide 2-01.png 2014 IBM Corporation
IBM SP 8-bar pos_horizontal-01.png
ppt template content slide 2-01.png
ppt template content slide 2-01.png