Friday, March 19, 2010

How to Add a New Field to AN OIM Connector (Step by Step Guide on OID Connector)

This document describes the steps needed to add a custom field to a OIM Connector. The steps provided are targeted to the OID connector. However, same concepts can be used to other connectors as well.

There are two sections, first describes the operations needed for provisioning. The second section describes how to add the field for synchronization.

Solution

Section 1: Provisioning

=================

Step1: Adding the new field to the OID Process Form
--------------------------------------------------------
1. In Design Console open Development Tools -> Form Designer
2. In Table Name field type UD_OID_USR and press Search
3. Click "Create new version" and enter the label and click Save
4. Select the new form version
5. Click Add and enter the details for the new field in the table.
In this example we will use:
NAME: UD_OID_USR_SOID
VARIANT TYPE: String
LENGTH: 100
FIELD LABEL: Sample OID Field
FIELD TYPE: TextField
ORDER: 16
6. Save the form
7. On the Properties tab, click Add, select the field and set Visible Field to true.
8. Save the form
9. Click "Make version active"

Step2: Create a process task for the Sample OID Field
--------------------------------------------------------
1. In Design Console open Process Management -> Process Definition
2. In the Name field type "OID User" and click search
3. Click Add
4. Enter the name as "Sample OID Field Updated"
The name of the connector must follow the following naming convention:
"<Field Name> Updated"
OIM calls the connector based on this naming rule.
5. Enter a description and also check "Conditional" and "Allow Multiple Instances"
6. Save the process task
7. On the Integration tab, click Add -> Adapter and select adpOIDMODIFYUSER adapter.
8. Click Save.
9. Map the adapter variables to the following values:


Adapter return value <-> Response Code
SSLFlag <-> IT Resources - Server Address - LDAP Server - SSL
ServerAddress <-> IT Resources - Server Address - LDAP Server - Server Address
ServerPort <-> IT Resources - Server Address - LDAP Server - Port
RootContext <-> IT Resources - Server Address - LDAP Server - Root DN
AdminID <-> IT Resources - Server Address - LDAP Server - Admin Id
AdminPwd <-> IT Resources - Server Address - LDAP Server - Admin Password
AttrLookupCode <-> IT Resources - Server Address - LDAP Server - Prov Attribute Lookup Code
OrganizationDN <-> Literal - String - Empty value
XLOrgFlag <-> IT Resources - Server Address - LDAP Server - Use XL Org Structure
PDataOrg <-> Process Data - Organization DN
UserID <-> Process Data - User ID
AttrName <-> Literal - String - Sample OID Field
AttrValue <-> Process Data - Sample OID Field
ProcessInstKey <-> Process Data - Process Instance

Step3: Adding the field to the provisioning lookup definition
-------------------------------------------------------------
1. In Design Console open Administration -> Lookup definition
2. In Code field type "AttrName.Prov.Map.OID" and click search
3. Click Add and enter "Sample OID Field" in the Code Key.
4. In Decode type the name of the field in OID, for example "description"
5. Click Save


Step4: Testing provisioning
---------------------------
1. Login to the Web Administration Console
2. Create a new OIM User
3. Provision an OID Account to the OIM user
4. Notice in the process form the new field "Sample OID Field"
5. Edit the process form, add a value for Sample OID Field and click Save
6. Check the description field on the account created in OID

Step5: Linking the field to an OIM User UDF (optional)
---------------------------------------------------------
If the scenario requires to link the field with a User Defined Field in the OIM user form:

Let's consider there a field defined in Users form like in the example below:
(In Design Console -> Administration -> User Defined Field Definition -> Users)
Label : Sample OID Field
DataType : String
Field Type : Text Field
Column Name : USR_UDF_S_OID
Field Sise : 100


1. In Design Console open Process Management -> Process Definition
2. In the Name field type "OID User" and click search
3. Click Add
4. Enter the name as "Change Sample OID Field"
5. Enter a description and also check "Conditional" and "Allow Multiple Instances"
6. Save the process task
7. On the Integration tab, click Add -> Adapter and select adpOIDMODIFYUSER adapter.
8. Click Save.
9. Map the adapter variables to the following values:

Adapter return value <-> Response Code
SSLFlag <-> IT Resources - Server Address - LDAP Server - SSL
ServerAddress <-> IT Resources - Server Address - LDAP Server - Server Address
ServerPort <-> IT Resources - Server Address - LDAP Server - Port
RootContext <-> IT Resources - Server Address - LDAP Server - Root DN
AdminID <-> IT Resources - Server Address - LDAP Server - Admin Id
AdminPwd <-> IT Resources - Server Address - LDAP Server - Admin Password
AttrLookupCode <-> IT Resources - Server Address - LDAP Server - Prov Attribute Lookup Code
OrganizationDN <-> Literal - String - Empty value
XLOrgFlag <-> IT Resources - Server Address - LDAP Server - Use XL Org Structure
PDataOrg <-> Process Data - Organization DN
UserID <-> Process Data - User ID
AttrName <-> Literal - String - Sample OID Field
AttrValue <-> Process Data - Sample OID Field
ProcessInstKey <-> Process Data - Process Instance

10. Navigate to Administration - Lookup Definition
11. Enter "Lookup.USR_PROCESS_TRIGGERS" in the Code field and click Search
12. Click Add and enter the follwing values:
Code Key - USR_UDF_S_OID
Decode - Change Sample OID Field
Note: Code Key is the database column name for the UDF (as assumed in the begining of Step5).
Note: Decode is the process task name (as assumed in Step5->point4).
13. Save the Lookup definition.

Section 2: Reconciliation

==================

Step1: Add the Reconciliation Field to OID User Resource Object
--------------------------------------------------------------------
1. In Design Console open Resource Management -> Resource Object
2. Type "OID User" in Name and click Search
3. On Object Reconciliation tab, click Add Field
4. Enter "Sample OID Field" in the field name and select the type as String
5. Click Save

Step2: Add the Reconciliation Field Mappings
-----------------------------------------------
1. In Design Console open Process Management -> Process Definition
2. Type "OID User" in the name field and click Search
3. On the Reconciliation Field Mappings tab, click Add Field Map
4. Select:
Field Name : Sample OID Field
Field Type : String
Process Data Field : UD_OID_USR_SOID
5. Click Save

Step3: Add the field to the reconciliation lookup definition
----------------------------------------------------------
1. In Design Console open Administration -> Lookup definition
2. In Code field type "AttrName.Recon.Map.OID" and click search
3. Click Add and enter "Sample OID Field" in the Code Key.
4. In Decode type the name of the field in OID, for example "description"
5. Click Save

Step4: Testing reconciliation
-----------------------------
1. Login to OID with Oracle Directory Manager (OIDAdmin)
2. Modify the description field for a specific user account
3. Run the reconciliation task
4. Check the process form for the specific user account in OIM Administration interface
5. The field Sample OID Field should be updated accordingly


Note: when a reconciliation event is received, the Reconciliation Update Received task is called and the process form is updated. If the requirement is to synchronize data further, a custom task can be linked to Reconciliation Update Received. However, the custom task implementation will probably require custom code.