Monday, June 23, 2014

What is adapters in OIM 11g? How it works?

Adapter:

An Adapter is a Java class that is created by an OIM user through the Adapter Factory.

Advantage:

Adapters are reusable components which is the biggest advantage.

Types:

Here are five types of Adapters in OIM:

1. Process Task Adapter
2. Task Assignment Adapter
3. Pre populate Adapter
4. Entity Adapter
5. Rule Generator Adapter

Process Task Adapter: As the name suggests, it can be attached only in task.

Example: Suppose in your provisioning workflow you have one task which is used for creating user then you can attach one Process task Adapter in this workflow which will create user.

Task Assignment Adapter: It is used for assigning the task to any particular user/group. Task assignment adapter is used when you want to perform some operation to find the user to whom you want to assign task.

Example: If you want to assign the request to some user based on target user’s attributes then we need task Assignment Adapter. In my OIM implementation user has an attribute Country. Client wants that if user is from Brazil the request should be approved by AMD01, if user is from INDIA then request should be approved by AMD02.. so .. on… In this case we’ll have to use Task Assignment Adapter.

Pre Populate Adapter: This adapter is used for populating any field on forms (Process/Object) with some data.

Example: I have a process form which has fields like First Name, Last Name, User ID. I want to fill these fields from User Data. Then we use Pre Populate Adapter which populates the value from user Profile to Process form Field. In general terms, it copies the User ID, First Name etc from user profile and paste it on the process form fields.

Entity Adapters: When you want to perform any operation on any Entity like user/group then we use Entity Adapters. It can be attached only with forms. These adapters can be used

1. Before inserting data into Database (Pre Insert)
2. After inserting data into Database (Post Insert)
3. Before updating data into database (Pre Update)
4. After updating data into database (Post Update)
5. Before deleting data into database (Pre Delete)
6. After deleting data into database (Post Delete)

Example: Client wants to generate default password say ‘User777’ while creating user. You will create entity adapter which will return a string “User777”. You’ll attach that adapter in Design Console > Data Object Manager > Users form on Pre-Insert i.e. before inserting data into Database of OIM.

Rule Generator Adapter - can populate fields automatically on an OIM form or a user-created form and save to the OIM database based on business rules


Regards,
Arihant