Oracle Identity Manager Basics: Creating a Custom Resource Object in OIM 11g

The process to create a custom resource object in Oracle IDM 11g is straight forward.  There are only a couple high level steps involved:

  1. Create a Resource Object
  2. Create a Process Definition
  3. Create a Process Form
  4. Create a Copy Adapter
  5. Create a Provision Task
  6. Create a Revoke Task

Breaking the creation of the resource object into these individual tasks simplifies the process.  For this example, we are going to create the Rubber Ball resource object which will have the fields: userName, firstName, lastName, and favColor.

1. Create Resource Object

In the design console, create a new resource object in resource management. (Name: Rubber Ball, Order for User, Type: Application, Allow Multiple, Allow All)

Your resource object is now created, so we now need to create the Process Form

2. Create Process Definition

In Process Management, Process Definition, create a new definition (Name: Rubber Ball, Type: Provisioning, Object Name: Rubber Ball, Table Name: UD_BALL)

Now, if you check in OIM, you should be able to see the new resource to add to a user.  If you add it at this point, the resource will be stuck on the status Provisioning and you will be unable to revoke it.  This is due to the fact that we have yet to create either a Provisioning or a Revoking task which will be our next steps.

3. Create Process Form

In Development Tools, Form Designer, create a new form. (Table Name: UD_BALL)

Click Create New Version

Create 4 Additional Columns

Column Name Variant Type Length Field Label Field Type Order
UD_BALL_USERNAME String 50 User Name TextField 1
UD_BALL_FNAME String 40 First Name TextField 2
UD_BALL_LNAME String 40 Last Name TextField 3
UD_BALL_FAVCOLOR String 20 Favorite Color TextField 4

Properties Tab – 4 properties should be there already after adding the columns

Administrator Tab – System Administrators should be there

Save the form and Select Make Version Active.  The process form is now created.

4. Create Copy Adapter

We need to create a copy adapter to take an input and output an output.  It’s a very simple adapter.

In Development Tools, Adapter Factory, create a new Adapter. (Adapter Name: CopyData, Adapter Type: Process Task)

In Variable List Tab, Add a new variable (Variable Name: Input, Type: String, Desc: Input, Map To: Resolve at runtime)

Save Variable, go back to Adapter Tasks tab, select CopyData and press Add.  Choose Logic Task, and SET VARIABLE. (Variable Name: Adapter return value, Operand Type: Variable, Operand Qualifier: Input)

Save, then close the popup and save the adapter and Build.  Now we can add the adapter to the process definition that we just created.

5. Create Provision Task

Back in Process Management, Process Definition, open the Rubber Ball Definition again. We are going to create the Provision Task first and call it Provision It.  In tasks, press Add.

Task Name: Provision It

Make sure Conditional is NOT selected

Verify that Required for Completion, Allow Cancellation while Pending and Allow Multiple Instances are all checked and save the task

Go to the Integration Tab, Add the CopyData adapter (should be adpCOPYDATA).  Two variables should pop up in the Adapter Variables section, Adapter return value and Input.

Map the Adapter return value to Response Code and Input to a Literal String with the Literal Value of OK.  Save

In the Response tab, Add a Response.  The response is OK and the Status is C (Make sure to doubleclick and select rather than type it in, it’s a little finicky). Save

Go to Task to Object Status Mapping tab.  At the entry for C Completed, double click the Object Status and select Provisioned.

Save and you should now be able to Provision the resource in OIM.  OIM should respond with the Provisioned status.

6. Create a Revoke Task

We are going to create a task called Revoke It and configure it to Revoke the resource object.

The process for creating the task is the exact same with two exceptions:

  1. Make sure that in the General tab, Conditional IS selected.  (Otherwise as soon as you provision an object, it will be revoked)
  2. In the Task to Object Status Mapping tab, instead of selecting Provisioned at the C Completed entry, select Revoked.

Save the entry.

There is one more minor step required:

You need to open the “Provision It” task, and in the “Undo/Recovery” tab, Assign Revoke It as an Undo Task. Save.
Now you should be able to Provision and Revoke the new resource object that you created.