Professional Documents
Culture Documents
Lab 04 Event Handler Development
Lab 04 Event Handler Development
Handlers
Contents
Lab 4: Customized On-boarding of Contractors using Event Handlers .......................................................... 1
1. Introduction ............................................................................................................................................. 1
2. Content ..................................................................................................................................................... 2
1. Introduction
If the employee is a Contractor, they must be registered in the Contractor Registration System, which is an external application. This application is
a database application. The database has the following structure
User ID Contractor ID First Name Last Name
After successful registration, their Contractor ID must be retrieved and updated in their OIM User Profile.
OIM 11g Workshop - Lab 3
This use-case will be developed as a plug-in and deployed on Oracle Identity Manager 11g environment.
The plug-in will be used for extracting “Contractor Id” or any configured column name from specified database table and update OIM User profile.
This event handler will be implemented as PostProcessHandler and registered for Create operation of User. It will be a conditional event handler,
executing for only "contractor" users. If the user type is Contractor then it will connect the external application to retrieve the Contractor Id (field
is defined in DB.table.column.to.retrieve) based on the OIM user id (defined in DB.Matching.OIM.User.Field) and updated the OIM User profile
with contractor Id.
2. Content
Import “ContractorIDConfiguration.xml” file located at “oim_objects/” in the package, which will be available in
/odrive/dummydata/Lab 4/ContractorIDEventHandlerPostProc.zip. It will create the following configurations
which will be used by the event handler.
lookup.externalDatabase.configuration
Custom Attribute “Contractor Id”
To import the above file into OIM login to the advanced console of OIM and click on Import Deployment Manager File as shown below
2
OIM 11g Workshop - Lab 3
Create the required Authorization Policy for the attribute “Contractor Id”. Create a new Authorization policy, add permissions as
“View User Details” (All attributes) and “Modify User Profile” (attribute “Contractor Id”), and add “System Administrators” role as the
assignee.
4
2. set view user details permission and select all.
OIM 11g Workshop - Lab 3
3. set Modify user profile permission and select Contracto Id attribute. click save
6
5. In Policy Assignment , select SYSTEM ADMINISTRATOR role
OIM 11g Workshop - Lab 3
8
6. View policy confirmation page and click finish
OIM 11g Workshop - Lab 3
7. Click Apply.
Connectivity parameters to the Contractor database (table) are stored in an IT resource. To create this IT resource from OIM web
console follow the steps below
10
OIM 11g Workshop - Lab 3
1. Provide the information given in the table below. Please note that the IT Resource Type must be selected as Database.
2. Click on “Continue”
12
3. Specify IT Resource Parameter Values for desired database
DatabaseName idm11gdb
Driver oracle.jdbc.OracleDriver
Password abcd1234
URL jdbc:oracle:thin:@//orclfmw.example.com:1521/idm11gdb
UserID fetrng3_oim
OIM 11g Workshop - Lab 3
4. Click on “Continue”
14
5. Set Access Permission to IT Resource and then click on “Continue”
OIM 11g Workshop - Lab 3
16
7. Click on create on below window
OIM 11g Workshop - Lab 3
8. Click on Finish
18
Contractor on-boarding process would use a flat file as a source of identities. In order to do so, a flat file Generic Connector named
“HR_FILE_GTC_CONNECTOR” is already created in the VM.
The current event handler has been developed considering a highly configurable design. Therefore, a lookup code has been
introduced so that developers can tweak values of various parameters and change the behavior. By default, they have the optimum
default values to make the event handler work as per the environment set in the VM. To find out more details on what can be
customized and configured better to your needs (and only if that is required), navigate to design console and check the lookup code
“lookup.externalDatabase.configuration” which would have been already created by the DM file import.
OIM 11g Workshop - Lab 3
20
3. Enter “lookup.externalDatabase.configuration” and then click on search query/ binoculars in the menu bar.
OIM 11g Workshop - Lab 3
22
5. Follow the description below to understand how these parameters could be tweaked. By default, they have the optimum
default values to make the event handler work as per the environment set in the VM.
26
7. Oimclient.jar is successfully added to the project.
OIM 11g Workshop - Lab 3
28
2.3 Post deployment Unit testing Procedure
Once the steps mentioned in "Deployment Procedure" are followed, the sample can be
Run against an existing OIM installation on the same host.
30
3. Click on “Create User”
OIM 11g Workshop - Lab 3
32
4. Fill the User details and then click on Save
6. Click on the User from the search result, the Contractor ID gets updated in the user profile.
OIM 11g Workshop - Lab 3
1. Login to the OIM “Advanced” console and click on “Search Scheduled Jobs”.
34
2. Search for the scheduled job created while creating the generic connector. Enter the name of scheduled job as
HR_FILE_GTC_CONNECTOR_GTC in the text box and click on the search arrow button as shown below.
OIM 11g Workshop - Lab 3
3. Click on the schedule job from the search result and then click on “Run Now”.
36
4. After clicking the Run Now below screen appears.
OIM 11g Workshop - Lab 3
38
6. Below screen appears.
OIM 11g Workshop - Lab 3
7. Search for any one user that was present in the flat file.
40
8. Click on the User from the search result, the Contractor ID gets updated in the user profile.
OIM 11g Workshop - Lab 3
42