Monday, March 15, 2010

Defining a Task Assignment Adapter in Oracle Identity Manager

Purpose
This article describes how to define a “Task Assignment” adapter in Oracle Identity Manager and Oracle Identity Manager Connectors.

Scope and Application
Task Assignment adapters can be used in Oracle Identity Manager for provisioning purpose and at the same time they can be used in Oracle Identity Connectors to extend the generic functionality provide by out-of-box connectors.
Defining a Task Assignment Adapter in Oracle Identity Manager
Task Assignment adapter is required to return at least following outputs:

key (user key or group key) and type ("User" or "Group")

And one may need to define a custom class to return these values. In order to define a custom class it is important to note that task assignment adapter needs at least a key (user key or group key and a type("User" or "Group") to be returned as its output so that it works correctly. Therefore customized class should implement at least these 2 methods: one method should return a key (can be usr_key of user whom you want the task to be assigned to) and another method should return type ("Group" in case you want to assign it to "Group" or "User" if you want it to be assigned to a user). Methods can take any input parameters and one can use desired logic to determine the correct user or group one wants but one of these methods should return a key as output while the other method should return type as output. Following is a sample only which one can use/refer to define a custom class which can be used in defining Task Assignment adapter:

import java.io.PrintStream;
public class TATest
{
public TATest()
{
}
public static void main(String args[])
{
}
public String getGrouporUserKey(String s, String s1)
{
String grpOrUserKey; //logic to determine correct group's or user's key you want task to be assigned to return grpOrUserKey;
}
public String getUsrOrGroupType(String s, String s1)
{
String getUsrOrGroupType; //can have value either "Group" or "User"
//logic to determine correct group or user type return getUsrOrGroupType;
}
}