Skip Headers
Oracle® Identity Manager Tools Reference
Release 9.1.0

Part Number E10366-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

3 Creating Adapters

This chapter describes how to create and define adapters. It contains the following topics:

Overview of Adapter Creation

Now that you have set up Oracle Identity Manager, you are ready to create the five types of Oracle Identity Manager adapters. These are:

See Also:

"About Adapters" for a detailed description of these adapters

Defining Adapters

To define an adapter:

  1. Log in to Oracle Identity Manager.

  2. Open the Adapter Factory form. This form is in the Development Tools folder in the Design Console.

  3. In the Adapter Name field, enter the name of the adapter, for example, Create Solaris User.

    Note:

    Although the adapter name can contain special characters, Oracle recommends that you do not use them because there might be run-time errors.
  4. Double-click the Adapter Type lookup field.

    The Lookup window is displayed, displaying the five types of Oracle Identity Manager adapters. These are:

    • Process Task

    • Rule Generator

    • Pre-populate Rule Generator

    • Entity

    • Task Assignment

  5. To enable the adapter to automate a process task, select Process Task (T).

    To incorporate business rules into an Oracle Identity Manager or user-defined form field, select Rule Generator (R). For example, for the User ID field of a form, you can configure Oracle Identity Manager to concatenate the initial letter of the user's first name with the user's last name.

    You can attach a type of rule generator adapter to a user-created form field, so that it can:

    • Display the data, which is generated by the adapter, automatically or manually.

    • Use criteria that enable Oracle Identity Manager to determine which adapter is applied to the designated form field.

    To attach the adapter to an Oracle Identity Manager or user-defined form field, and have Oracle Identity Manager trigger the adapter on preinsert, preupdate, predelete, postinsert, postupdate, or postdelete, select Entity (E).

    To allow the adapter to automate the allocation of a process task to a user or group, select Task Assignment (A).

  6. Select the type of adapter you want, for example, Process Task (T). Then, click OK.

    See Also:

    Oracle Identity Manager Administrative and User Console Guide for more information about the Form Designer form
  7. In the Description field, type a description for the adapter, for example, This adapter is used to create a new user for the Solaris environment.

  8. From the toolbar, click Save.

    The adapter is now stored in the Oracle Identity Manager database.

Disabling and Re-enabling Adapters

To disable an adapter so that it cannot be used with a process task or form field, select the Disable Adapter option, and then save the adapter.

To re-enable it, clear the Disable Adapter option, and save the adapter.

About Adapter Variables

For a newly-created adapter to work, you can map data to the parameters of the adapter tasks. For this reason, you create placeholders, also known as adapter variables, to map the data at run time.

Note:

An adapter variable can be reused for all adapter tasks.

Once an adapter variable is not needed for the adapter to run, you can remove it from the adapter. After you have deleted the adapter variable, ensure to recompile the adapter.

Creating an Adapter Variable

To create an adapter variable:

  1. Select the adapter to which you wish to add an adapter variable, for example, the Create Solaris User adapter.

  2. Select the Variable List tab.

  3. Click Add.

    The Add a Variable window is displayed.

  4. When you do not want Oracle Identity Manager to be able to change the adapter variable value after it is activated, select Final.

  5. In the Variable Name field, enter the name of the adapter variable, for example, SolarisUserID.

    Caution:

    The adapter variable name cannot contain spaces.
  6. From the Type menu, select the classification type of the adapter variable, such as String. The available items are:

    • Object

    • IT Resource

    • String

    • Boolean

    • Character

    • Byte

    • Date

    • Integer

    • Float

    • Long

    • Short

    • Double

  7. Within the Description text area, you can enter explanatory information about the adapter variable.

  8. From the Map To menu, you can map your adapter variable to one of the items listed in Table 3-1.

    Table 3-1 Items on the Map To Menu

    Name Description

    Literal

    This adapter variable is mapped to a constant (or literal).

    Resolve at Run time

    This adapter variable's mapping occurs later, at run time. Selecting this option increases the reusability of the adapter.

    Adapter References

    This adapter variable gives access to an Oracle Identity Manager database reference or an Oracle Identity Manager data object reference.

    System Date

    When this adapter variable is triggered by Oracle Identity Manager, it is mapped to the current date and time of the Server.

    Note: This option appears only when you select the Date type.


    Note:

    When you select the object type, a Qualifier menu is displayed within the Add a Variable window. From this menu, you can select either of the following:
    • Database Reference. If you select this item, then the adapter variable is mapped to the reference of the database that the Oracle Identity Manager is currently running against.

    • Data Object Reference. If you select this item, then the adapter variable is mapped to an Oracle Identity Manager data object.

    Note:

    If you select the IT Resource type, then a Resource Type menu is displayed within the Add a Variable window. From this menu, you can select one of the IT resource types that have been created by using the IT Resource Type Definition form. By doing so, you can map the adapter variable to a parameter of this IT resource type.
  9. On the toolbar in the Add a Variable window, click Save. The information for your adapter variable is stored in the Oracle Identity Manager database.

    Close the Add a Variable window to activate the main screen. The name, classification type, mapping selection, and description of the adapter variable you created appear in the child table of the Variable List tab.

This adapter variable now belongs to the adapter in the Adapter Factory form. It is saved to the Oracle Identity Manager database, and the adapter variable is ready to use.

Modifying an Adapter Variable

To modify an adapter variable:

  1. Select the adapter that contains the adapter variable you want to edit, for example, the Create Solaris User adapter.

  2. Click the Variable List tab and double-click the row header of the adapter variable you want to modify. The Edit a Variable window is displayed, showing information about the adapter variable.

  3. Make the necessary edits, for example, changing the adapter variable's data type from String to Character.

  4. On the Edit a Variable toolbar, click Save. The modified information about the adapter variable is stored in the Oracle Identity Manager database.

  5. Close the Edit a Variable window to activate the main screen. The adapter variable you modified appears within the child table of the Adapter Factory form.

    Note:

    Ensure that you check your data mappings and recompile the adapter, especially if you change the adapter variable's data type.

Deleting an Adapter Variable

When an adapter variable is no longer necessary for the adapter to run, you can remove it from the adapter. To do this:

  1. Select the adapter that contains an adapter variable you want to remove, for example, the Create Solaris User adapter.

  2. Select the Variable List tab.

  3. From the list of this tab, select the adapter variable you want to delete.

  4. Click Delete.

  5. Recompile the adapter after deleting any variable.

The adapter variable disappears from the child table. The adapter variable has been deleted.

Creating Adapter Tasks

After you construct the adapter and create its variables, you can create the atomic function calls of an adapter. These function calls are known as adapter tasks.

Oracle Identity Manager allows you to create the following adapter tasks:

You can create the following types of logic tasks:

See Also:

"Creating a Logic Task" for more information about the types of logic tasks you can build

For classification purposes, Oracle Identity Manager represents each type of adapter task by an icon. The icon, which precedes the task name, is a visual indicator of the type of task it is. For example, "J" represents a Java task, and "LT" represents a logic task.

To see a list of these icons, select the Adapter Tasks tab, and click Legend. The Legend window appears, displaying the following list of icons:

Creating a Java Task

Oracle Identity Manager can handshake with an external source through a Java API. To make this happen, you must add a task to an adapter, which, when triggered by Oracle Identity Manager, initiates communications with the external source. This type of task is called a Java task.

To create a Java task:

  1. Select the adapter to which you want to add a Java task, for example, the Update Solaris Password adapter.

  2. Select the Adapter Tasks tab.

  3. Click Add.

    After the Adapter Task Selection window is displayed, select the Functional Task option.

  4. From the display area to the right of this option, select the Java item, and click Continue.

    The Object Instance Selection window is displayed.

    Table 3-2 explains the options in the Object Instance Selection window.

    Table 3-2 Options in the Object Instance Selection Window

    Option Description

    New Object Instance

    When you click this option, you are creating a new Java object instance.

    Persistent Instance

    You can call the method on a persistent object by clicking this option, clicking the adjacent combo box, and selecting an object instance from the drop-down menu.

    Task Return Value Instance

    You can call this method on an object returned by an adapter task defined earlier by clicking this option, clicking the combo box, and selecting an adapter task from the drop down list.


    Note:

    When the Persistent Instance option is grayed out, you have not defined any persistent objects for your adapter. Similarly, if the Task Return Value Instance option is grayed out, none of the tasks have Java Object return values associated with them.
  5. Click an option—for example, New Object Instance—and click Continue. The Add an Adapter Factory Task window is displayed.

    Table 3-3 lists and describes the various regions of the Add an Adapter Factory Task window:

    Table 3-3 Regions of the Add an Adapter Factory Task Window

    Name Description

    Task Name

    This field displays the name of the Java task.

    Persistent Instance

    If this Java object is to be used again, the check box is selected, and the name of the task instance is entered in the adjacent field.

    API Source

    This combo box contains a list of all JAR and class files to which you have access.

    Application API

    This combo box contains a list of all class files to which you have access, and which belong to the JAR file that has been selected from the API Source list.

    Constructors

    This text area displays all the constructors, which are available for the Java object.

    Methods

    This text area shows a list of all the methods, which are available for the Java object.

    Application Method Parameters

    This area contains the parameters of the selected constructor and method. These parameters are mapped to the adapter variables and Oracle Identity Manager components.


  6. In the Task Name field, enter the name of the task you are creating, for example, Update Password.

  7. (Optional.) To make your Java object reusable, select Persistent Instance, then type the name of the instance of this task in the text field located to the right of the check box.

    Caution:

    Ensure that name of the instance contains no spaces.

    Note:

    To reference a session with the target resource multiple times during the life of the adapter, and not just once, select Persistent Instance.

    Tip:

    By setting the Java object to be persistent, the next time you create a Java object, it appears in the Persistent Instance list of the Object Instance Selection window. In addition, you do not have to map the constructor to all adapter tasks of the same Java object.
  8. Select the API Source. The JAR files appear, which Oracle Identity Manager references from the JavaTasks subdirectory of the OIM_HOME/xellerate folder path—for example, C:\oracle\Xellerate\JavaTasks.

    See Also:

    "Configuring Oracle Identity Manager to Reference JAR and Class Files" for instructions on how to enable Oracle Identity Manager to use third-party JAR files with a Java task
  9. Select the Application API. The class files, which belong to the JAR file you selected in the API Source, appear.

  10. From the Constructors area, select the method to be used to initialize the Java class you selected.

  11. From the Methods area, select the method that will be used with your Java task.

  12. From the toolbar, click Save.

    The information pertaining to the Java task is stored in the Oracle Identity Manager database. You can now access the parameters of your Java task's constructors and methods. These parameters appear in the Application Method Parameters region of the Add an Adapter Factory Task window.

  13. To display the Java class constructors and methods for which you must set mappings, click the plus icons displayed to the left of the Constructor and Method icons.

  14. Select the parameter of the constructor or method for which you must set a mapping.

  15. In the Description text area, you can enter a description for this mapping.

  16. Click the Map to combo box, and select an item that you can map to the parameter of the constructor or method, for example, Adapter Variables.

  17. Set the appropriate mappings.

    See Also:

    The "Adapter Mapping Information" section on Oracle Identity Manager Reference for more information about which mappings to set
  18. Click Set.

    The parameter of the selected constructor or method now appears in blue. This signifies that it has been mapped.

    Tip:

    To remove a parameter mapping, right-click the appropriate parameter, and select Un-Map Parameter from the popup menu that appears.
  19. Repeat steps 15 through 18 for all parameters of the constructors and methods that appear in the Application Method Parameters region.

  20. On the Add an Adapter Factory Task window toolbar, click Save. The information pertaining to the Java task is stored in the Oracle Identity Manager database.

  21. On the toolbar, click Close. The Add an Adapter Factory Task window disappears, and the main screen is active once again. The Java task that you created—for example, Update Password—appears within the Adapter Factory form.

  22. (Optional.) To create additional Java tasks for the adapter, repeat steps 3-21.

    Tip:

    You can create different types of adapter tasks, and add them to the adapter.

    If the adapter is logically complete, and all variables on the adapter tasks are mapped, you can compile it to use with a process task or form field.

  23. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and found no errors. You can now attach the adapter to a process task or form field.

  24. (Optional.) To see the code that Oracle Identity Manager generates, from the toolbar, click Notes.

    The Notes window is displayed, containing the code that Oracle Identity Manager generated.

    Note:

    If, after clicking Build, CODE GEN ERROR appears in the Compile Status field, it means that Oracle Identity Manager encountered one of two types of errors while validating and compiling the adapter:
    • Validation Error

      While Oracle Identity Manager is checking the adapter to verify that it is valid, an error is found. This error can result from a parameter of an adapter task not being mapped, a parameter being mapped improperly, or an adapter task being placed out of order.

      Because Oracle Identity Manager generates code for an adapter only after it is validated, if Oracle Identity Manager encounters a validation error, it does not create any code.

    • Java Compilation Error

      Oracle Identity Manager has verified that the adapter is valid. However, while Oracle Identity Manager is compiling the adapter, an error is found. This error can result from assigning an incorrect data type to an adapter task parameter.

      Because Oracle Identity Manager has validated the adapter, it generates code. However, Oracle Identity Manager stops building code at the point of the compilation where it encounters the error.

    Tip:

    Once you create a Java task, and add it to an adapter, you can see the following information by accessing the Resources tab of the Adapter Factory form:
    • The JAR and class files used to create the Java task.

    • The name, which represents the directory path that contains these JAR and class files.

To Create a Remote Task

A remote task enables an adapter to invoke an API method by using the Remote Manager. This API resides on a computer that is external to Oracle Identity Manager. This section explains how to create a remote task.

Note:

Before creating a remote task, ensure that you define an adapter variable with a classification type of IT Resource, as well as select one of the IT resources that have been created by using the IT Resource Type Definition form.
  1. Select the adapter to which you wish to add a remote task.

  2. Click the Adapter Tasks tab.

  3. Click Add.

    The Adapter Task Selection window is displayed.

  4. Select the Functional Task option.

  5. From the display area to the right of the button, select the Remote item to create a remote task. Then, click Continue.

    The Object Instance Selection window is displayed.

    Note:

    To learn more about the choices of this window, refer to "Creating a Java Task".
  6. Click Continue.

    The Add an Adapter Factory Task window is displayed.

  7. In the Task Name field, enter the name of the remote task you are creating.

  8. (Optional.) If you want your remote task to be reusable, select the Persistent Instance option. Then, type the name of the instance of this task in the text field, located to the right of the check box.

    Caution:

    Ensure that the name of the instance contains no spaces.

    See Also:


    "Creating a Java Task" for more information about the regions of the Add an Adapter Factory Task window

    "Configuring Oracle Identity Manager to Reference JAR and Class Files" for information about how to enable Oracle Identity Manager to use third-party JAR files with a Java task
  9. From the Add an Adapter Factory Task window, select a JAR file, class file, constructor, and method. Then, set the mappings for the parameters of the constructor and method.

    Note:

    One of the input parameters will have a classification type of IT Resource. You must associate this parameter with an adapter variable of type IT Resource.

    See Also:

    The "Adapter Mapping Information" section in Oracle Identity Manager Reference for more information about which mappings to select
  10. From the Add an Adapter Factory Task window toolbar, click Save.

    The information pertaining to the remote task is stored in the Oracle Identity Manager database.

  11. From this window toolbar, click Close.

    The Add an Adapter Factory Task window disappears, and the main screen is active once again. The remote task that you created appears within the Adapter Factory form.

  12. (Optional.) To create additional remote tasks for the adapter, repeat Steps 3 through 11.

    You are now ready to compile the adapter, so it can be used with a process task or form field.

  13. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field, so Oracle Identity Manager can communicate with the external API.

To Create a Stored Procedure Task

Note:

Microsoft SQL Server is not supported in Oracle Identity Manager release 9.1.0. See ÒCertified ComponentsÓ in Oracle Identity Manager Release Notes for information about certified components.

Through Oracle Identity Manager, you can map to and execute SQL programs that are located within a particular database schema. These SQL programs are known as stored procedures. Stored procedures contain information, such as SQL statements, which are precompiled for greater efficiency.

For this to occur, you must add a stored procedure task to an adapter. When triggered by Oracle Identity Manager, this task incorporates stored procedures on any Oracle Database or Microsoft SQL Server database that is accessible on its network. This includes retrieving primitive values from stored procedures.

To create a stored procedure task:

Note:

The parameter values and server type for the database schema are set within the IT Resources form.

The server type of the schema must be set to Database. Otherwise, Oracle Identity Manager cannot reference the database schema during the creation of a stored procedure task, the execution of a stored procedure task, or both.

In addition, Oracle Identity Manager uses values, which are represented by parameters—for example, Database Name or URL—to connect to the schema. As a result, the stored procedures contained within the schema, can be executed.

  1. For Oracle Identity Manager Installations that use Oracle Database, copy the ojdbc14.jar file from the OIM_HOME/xellerate/ext/ directory to the OIM_DC_HOME/xlclient/ext directory.

    For Oracle Identity Manager Installations that use Microsoft SQL Server, you must obtain the following files from Microsoft and copy them to the OIM_DC_HOME/xlclient/ext directory:

    • msbase.jar

    • mssqlserver.jar

    • msutil.jar

  2. Select the adapter to which you wish to add a stored procedure task, for example, the Update User ID adapter.

  3. Click the Adapter Tasks tab.

  4. Click Add.

    The Adapter Task Selection window is displayed.

  5. Select the Functional Task option.

  6. From the display area to the right of the option, select Stored Procedure, and click Continue. The Add an Adapter Factory Task window is displayed.

    The following table lists and describes the regions of the Add an Adapter Factory Task window.

    Table 3-4 Regions of the Add an Adapter Factory Task Window

    Name Description

    Task Name

    Displays the name of the stored procedure task.

    Description

    Displays explanatory information about the stored procedure task.

    Database

    Lists the databases defined in the IT Resources form.

    Important: Only those IT resources with a server type of Database appear in the Database list.

    Schema

    Lists the schemas, which are associated with the database that appears in the Database list.

    Procedure

    Lists the stored procedures, which reside within the database schema that is displayed in the Schema list.

    Connection Status

    Displays the status of the connection between Oracle Identity Manager and the database that contains the target stored procedure.

    When Oracle Identity Manager can connect to the database, Connection Established is displayed in the Connection Status region.

    Note: If Oracle Identity Manager cannot connect, Connection Failed appears in the display area. In addition, the Notes button of the Add an Adapter Factory Task window is enabled. Clicking this button shows you why a connection could not be established, for example:

    Exception Type:

    java.lang.ClassNotFoundExceptionMessage:

    java.lang.ClassNotFoundException:

    oracle.jdbc.driver.OracleDriver

    In this example, Oracle Identity Manager could not connect to the designated database because it could not find a particular Java class.

    Parameters

    Contains parameters that can be mapped to the stored procedure. These parameters appear after you select a database, schema, and stored procedure and save this information to the Oracle Identity Manager database.


  7. In the Task Name field, enter the name of the stored procedure task you are creating (for example, Update ID).

  8. In the Description text area, you can enter a description for this stored procedure task.

  9. Click the Database list. The databases, which are defined in the IT Resources form, appear.

    Note:

    If Oracle Identity Manager cannot connect to the database you selected, Connection Failed appears in the display area. In addition, the Notes button of the Add an Adapter Factory Task window is enabled. Clicking this button shows you why a connection could not be established.

    Tip:

    Schemas and stored procedures appear only after you select a database to which Oracle Identity Manager can connect. Based on this selection, related schemas and stored procedures appear in the corresponding combo boxes.

    See Also:

    Oracle Identity Manager Administrative and User Console Guide for more information about using the IT Resources form to define the settings for databases that contain stored procedures
  10. Click the Schema list. The schemas appear, which are associated with the database you selected.

  11. Click the Procedure list. The stored procedures, which reside within the database schema that you selected from the Schema combo box, appear.

  12. From the Add an Adapter Factory Task window's toolbar, click Save. The information pertaining to the stored procedure task is saved into the Oracle Identity Manager database.

    You can now set the mappings for the parameter(s) of the stored procedure. These parameters appear in the Parameters region of the Add an Adapter Factory Task window.

    Note:

    Oracle Identity Manager automatically maps the database and schema of the selected stored procedure. However, Oracle Identity Manager enables you to override these mappings.

    See Also:

    The "Adapter Mapping Information" section in Oracle Identity Manager Reference for more information about which mappings to select
  13. From the Add an Adapter Factory Task window's toolbar, click Save. The mappings that you have set for the parameter(s) of the stored procedure task are stored in the Oracle Identity Manager database.

  14. From this window's toolbar, click Close.

    The Add an Adapter Factory Task window disappears, and the main screen is active once again. The stored procedure task you created (for example, Update ID) appears within the Adapter Factory form.

  15. (Optional.) Repeat steps 3 through 13 to create additional stored procedure tasks for the adapter.

  16. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field, so Oracle Identity Manager can map to and execute the stored procedure you selected.

To Create a Utility Task

The Adapter Factory is shipped with a library of utility classes and methods, which increase the efficiency of developing adapters.

These utility classes and methods are contained within the xlUtils.jar, xlIntegration.jar, and rt.jar files. A Java task you create by using a class or method from one of these JAR files is called a utility task.

See Also:

Java API Documentation for more information about the class files that contains the xlUtils.jar, xlAPI.jar, xlIntegration.jar, and rt.jar files.
  1. Select the adapter to which you wish to add a utility task, for example, the Update Solaris User Group adapter.

  2. Click the Adapter Tasks tab.

  3. Click Add.

    The Adapter Task Selection window is displayed.

  4. Select the Utility Task option.

  5. From the display area to the right of the option, select Utility, and click Continue. The Object Instance Selection window is displayed.

    See Also:

    "Creating a Java Task" to learn more about the choices of this window
  6. Click Continue. The Add an Adapter Factory Task window is displayed

  7. In the Task Name field, enter the name of the utility task you are creating, for example, Update User Group.

  8. (Optional.) If you want your utility task to be reusable, select Persistent Instance, then type the name of the instance of this task in the text field to the right of the check box.

    Caution:

    Ensure that name of the instance does not contain any spaces.

    See Also:


    "Creating a Java Task" for more information about the regions of the Add an Adapter Factory Task window

    "Configuring Oracle Identity Manager to Reference JAR and Class Files"
  9. Click the Application API list. The class files appear, which belong to the xlUtils.jar, xlIntegration.jar, and rt.jar files.

    Note:

    The xlUtils.jar, xlIntegration.jar, and rt.jar files contain all of the class files that you can use for a utility task. Therefore, you do not have to access the API Source list.
  10. From the Add an Adapter Factory Task window, select a constructor and method. Then, set the mappings for the parameters of the constructor and method.

    See Also:

    The "Adapter Mapping Information" section in Oracle Identity Manager Reference for more information about which mappings to select
  11. From the Add an Adapter Factory Task window's toolbar, click Save. The information pertaining to the utility task is stored in the Oracle Identity Manager database.

  12. From this window's toolbar, click Close.

    The Add an Adapter Factory Task window disappears, and the main screen is active once again. The utility task that you created (for example, Update User Group) appears within the Adapter Factory form.

  13. (Optional.) Repeat steps 3 through 12 to create additional utility tasks for the adapter.

    You are now ready to compile the adapter, so it can be used with a process task or form field.

  14. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field.

To Create an Oracle Identity Manager API Task

For greater portability of the adapter code, an Oracle Identity Manager API task enables Adapter tasks to call APIs published by Oracle Identity Manager. This is better than accessing Oracle Identity Manager data directly through hardcoded SQL statements.

The Adapter Factory is shipped with a library of utility classes and methods, which increase the efficiency of developing adapters that contain Oracle Identity Manager API tasks. These utility classes and methods are contained within the xlAPI.jar file.

See Also:

Java API Documentation for more information about the class files that contain the xlUtils.jar, xlAPI.jar, xlIntegration.jar, and rt.jar files

To create this type of adapter task:

  1. Select the adapter to which you wish to add an Oracle Identity Manager API task, for example, the Get User's Password adapter.

  2. Click the Adapter Tasks tab.

  3. Click Add.

    The Adapter Task Selection window is displayed.

  4. Select the Utility Task option.

  5. From the display area to the right of the option, select Xellerate API, and click Continue. The Object Instance Selection window is displayed.

    See Also:

    "Creating a Java Task" to learn more about this window
  6. Click Continue. The Add an Adapter Factory Task window is displayed.

  7. In the Task Name field, enter the name of the Oracle Identity Manager API task you are creating, for example, Retrieve Password).

  8. (Optional.) If you want your Oracle Identity Manager API task to be reusable, select Persistent Instance. Then, type the name of the instance of this task in the text field to the right of the check box.

    Tip:

    Ensure that name of the instance contains no spaces.

    See Also:


    "Creating a Java Task" for more information about the regions of the Add an Adapter Factory Task window

    "Configuring Oracle Identity Manager to Reference JAR and Class Files" to learn how to enable Oracle Identity Manager to use third-party JAR files with a Java task
  9. Click the Application API list. The class files appear, which belong to the xlAPI.jar file.

    Note:

    The xlAPI.jar file contains all of the class files that you can use for an Oracle Identity Manager API task. Therefore, you do not have to access the API Source list.
  10. From the Add an Adapter Factory Task window, select a class file, constructor, and method. Then, set the mappings for the parameters of the constructor and method.

    See Also:

    The "Adapter Mapping Information" section in Oracle Identity Manager Reference for more information about which mappings to select
  11. From the Add an Adapter Factory Task window's toolbar, click Save. The information pertaining to the Oracle Identity Manager API task is stored in the Oracle Identity Manager database.

  12. Close the Add an Adapter Factory window to activate the main screen. The Oracle Identity Manager API task that you created—for example, Retrieve Password—appears within the Adapter Factory form.

  13. (Optional.) To create additional Oracle Identity Manager API tasks for the adapter, repeat steps 3 through 12.

    You are now ready to compile the adapter, so it can be used with a process task or form field.

  14. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field, so Oracle Identity Manager can communicate with a third-party application.

Reassigning the Value of an Adapter Variable

Sometimes, for an adapter to accomplish its required objective, you must reassign the value of one adapter variable to another adapter variable, a different type of adapter task, or a constant (or literal). The task that enables you to reallocate an adapter variable value is known as a set variable task.

For example, you can create a set variable task to set the adapter variable return value to equal the output of an adapter task (UserName) if the User ID length is fewer than 11 characters.

To create a set variable task:

  1. Select the adapter to which you wish to add a set variable task (for example, the Check the Solaris User ID adapter).

  2. Click the Adapter Tasks tab.

  3. Click Add. The Adapter Task Selection window is displayed.

  4. Select the Logic Task option.

  5. From the display area, select SET VARIABLE, and click Continue. The Add Set Variable Task Parameters window is displayed.

  6. From the Variable Name list, select the adapter variable that has a value you want to reassign—for example, Adapter return value.

  7. From the Operand Type list, select the type of operand that will provide the value for the variable.

    Tip:

    You can reassign an adapter variable's value to another adapter variable, a different type of adapter task, or a literal.

    Use Table 3-5 to understand the various types of operands.

    Table 3-5 Types of Operands

    Operand Name Description

    Variable

    If you select this operand type, then adapter variables appear in the Operand Qualifier list. From this list, select the specific adapter variable that will provide the reassigned value.

    Note: The only adapter variables that will appear in the Operand Qualifier combo box will be those variables that have the same data type as the adapter variable that is displayed within the Variable Name combo box.

    Adapter Task

    By selecting this operand type, adapter tasks are displayed in the Operand Qualifier combo box. From this combo box, select the particular adapter task that will provide the reallocated value.

    Note: The only adapter tasks that will appear in the Operand Qualifier combo box will be those tasks that have the same data type as the adapter variable that is displayed within the Variable Name combo box.

    Literal

    When you select this operand type, types of literals appear in the Operand Qualifier combo box. From this combo box, select the type of literal that will provide the reallocated value. Then, type the specific literal into the field that appears underneath the combo box.


The following task sets the adapter variable's return value to be equal to the UserName adapter variable.

  1. On the toolbar in the Add Set Variable Task Parameters window, click Save. The set variable task you created is stored in the Oracle Identity Manager database.

  2. On the Add Set Variable Task Parameters window toolbar, click Close. The Add Set Variable Task Parameters window disappears, and the main screen is active once again. The set variable task that you created, for example, Set Adapter return value = UserName, appears in the Adapter Factory form.

  3. (Optional.) Repeat Steps 3-9 to create additional set variable tasks for the adapter.

    You are now ready to compile the adapter, so it can be used with a process task or form field.

  4. To compile the adapter, click Build. The text in the Compile Status field changes from Recompile to OK. Oracle Identity Manager compiled the adapter and found no errors. You can attach the adapter to a process task or form field.

Adding an Error Handler Task

To add an error handler task:

  1. An adapter task can return errors. When this occurs, the process task or form field to which the adapter is attached gets rejected.

    You can attach your own customizable error messages, which will be displayed to the user. These messages are known as error handler tasks.

    For example, you can attach an error handler task to an adapter that will display an error message when the length of a User ID is greater than 10 characters.

  2. Select the adapter to which you wish to add an error handler task (for example, the Check the Solaris User ID adapter).

  3. Click the Adapter Tasks tab.

  4. Click Add.

    The Adapter Task Selection window is displayed.

  5. Select the Logic Task option.

  6. From the display area, select Handle Error, and click Continue. The Add an Adapter Factory Task window is displayed.

  7. Double-click this window's lookup field. The Lookup window is displayed, displaying the error handler tasks you can add to the adapter.

    Note:

    The only error handler tasks that appear in this Lookup window are the ones that begin with ADAPTER—such as ADAPTER.USERIDLENERR).

    If you do not see the error handler task that you want to incorporate into the adapter, you can create one by accessing the Error Message Definition form. Refer to Oracle Identity Manager Design Console Guide for information about the Error Message Definition form.

  8. Select the error handler task you want, for example, ADAPTER.USERIDLENERR.

  9. Click OK. The Lookup window disappears, and the Add an Adapter Factory Task window is active. In addition, the error handler task you selected appears in the field of this window.

  10. From the Add an Adapter Factory Task window toolbar, click Save. The error handler task you incorporated into the adapter is stored in the Oracle Identity Manager database.

  11. From this window's toolbar, click Close.

    The Add an Adapter Factory Task window disappears, and the main screen is active once again. The error handler task you added, for example, Handle Error.ADAPTER.USERIDLENERR, appears within the child table of the Adapter Factory form.

  12. (Optional.) Repeat Steps 3-10 to create additional error handler tasks for the adapter.

    If the adapter is logically complete and all variables on the adapter tasks are mapped, you can compile it to use with a process task or form field.

  13. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field.

See Also:

Creating a Logic Task

While defining the adapter, you can add conditional statements to the adapter to control its logic flow. These conditional statements are known as logic tasks. For example, you can create a logic task that will trigger an action if the length of a User ID is greater than 10 characters.

To create a logic task:

  1. Select the adapter to which you wish to add a logic task (for example, the Check the Solaris User ID adapter).

  2. Click the Adapter Tasks tab.

  3. Click Add. The Adapter Task Selection window is displayed.

  4. Select the Logic Task option.

  5. From the display area, select the type of logic task you want to create. Then, click Continue.

    Note:

    If you select a conditional expression, and click Continue, one of the following actions occurs:

    Oracle Identity Manager adds the conditional statement to the adapter directly; or

    A secondary window is displayed, containing fields about the conditional expression that you can configure.

    To see what happens when you select a particular conditional statement, refer to Table 3-6.

    Table 3-6 Actions Resulting from Particular Conditional Statements

    Conditional Statement Statement Is Added to the Adapter Directly Secondary Window Appears

    FOR

     

    X

    WHILE

     

    X

    IF

     

    X

    ELSE

    X

     

    ELSE IF

     

    X

    BREAK

    X

     

    RETURN

    X

     

    CONTINUE

    X

     

    Table 3-7 explains the various regions of the Add Adapter Factory Logic Task Parameters window:

    Table 3-7 Regions of the Add Adapter Factory Logic Task Window

    Name Description

    Operand Type

    These combo boxes contain types of operands, such as adapter tasks and adapter variables.

    Comparator Combo Box

    From this combo box, you can set the relationship between two operands (for example, <, =, >).

    Operand Qualifier

    These combo boxes contain the qualifiers for the operands.

    Literal Text Box

    When you select the Literal operand type, enter the specific literal into this field.


    Note:

    By selecting the FOR conditional statement, an Add Adapter Factory Logic Task Parameters window is displayed. However, it contains different text and combo boxes.

    For the FOR conditional expression, use Table 3-8 to understand the various regions of this Add Adapter Factory Logic Task Parameters window.

    Table 3-8 Add Adapter Factory Logic Task Parameters for FOR Conditional Statement

    Name Description

    Operand Type

    These combo boxes contain types of operands, such as adapter tasks and adapter variables.

    Comparator Combo Box

    From this combo box, you can set the relationship between two operands (for example, <, =, >).

    Operand Qualifier

    These combo boxes contain the qualifiers for the operands.

    Increment Combo Box

    Within this area, you can set whether the initial value will increase or decrease, and by how much.


    Note:

    If you select the ELSE, BREAK, RETURN, or CONTINUE conditional expressions, proceed to Step 8.
  6. Set the parameters for your conditional expression.

    This logic task will check to see if the length of the User ID is greater than 10 characters.

  7. From the Add Adapter Factory Logic Task Parameters window toolbar, click Save.

    The logic task you created is stored in the Oracle Identity Manager database.

  8. From this window toolbar, click Close. The Add Adapter Factory Logic Task Parameters window disappears, and the main screen is active once again. The logic task that you created—for example, If (Check ID Length > 10)—appears within the Adapter Factory form.

  9. (Optional.) Repeat Steps 3-8 to create additional logic tasks for the adapter.

    Caution:

    All adapter tasks that can be executed for a condition of a logic task should be nested properly under that logic task.

    See Also:

    "Changing the Order and Nesting of Tasks" for more information about nesting tasks

    You are now ready to compile the adapter, so it can be used with a process task or form field.

  10. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field.

Modifying Adapter Tasks

The following procedure will show you how to edit an adapter task, in case you must make changes to it. To modify an adapter task

  1. Select the adapter that contains the adapter task you wish to edit (for example, the Update Solaris User Group adapter).

  2. Click the Adapter Tasks tab.

  3. Double-click the adapter task that you want to modify.

    The Edit Adapter Factory Task Parameters window is displayed, displaying information that relates to the adapter task you selected. Within this window, make the necessary modifications.

  4. On the Edit Adapter Factory Task Parameters window toolbar, click Save.

    The information you modified is stored in the Oracle Identity Manager database.

  5. On the toolbar, click Close.

    The Edit Adapter Factory Task Parameters window disappears. The main screen is active again. The modified task appears within the child table of the Adapter Factory form. You must re-compile the adapter, so it can be used with a process task or form field.

  6. To recompile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field.

Caution:

You cannot modify the API call inside a Java, Xellerate API, or Utility task. The adapter task has to be deleted and re-created. In addition, if CODE GEN ERROR appears in the Compile Status field, Oracle Identity Manager encountered errors while compiling the adapter. Rectify the errors, if necessary re-do the adapter task modifications, and compile the adapter again.

Changing the Order and Nesting of Tasks

If you add multiple tasks to an adapter, you can either change the order in which the tasks are executed, or place one task inside of another task for the adapter to work.

The following procedure will show you how to change the order and nesting of tasks.

Caution:

You should not change the order and nesting of adapter tasks unless you understand the mapping dependencies of the adapter tasks.

To change the order and nesting of tasks:

  1. Select the adapter that contains tasks of which you want to change the order and/or nest (for example, the Check the Solaris User ID adapter).

  2. Click the Adapter Tasks tab.

    The tasks appear, which belong to the current adapter.

    In this example, the following changes must occur:

    • The error handler task must be nested inside of the IF (Check ID Length > 10) logic task.

    • The set variable task has to be nested inside of the ELSE logic task.

    • The IF logic task precedes the ELSE logic task.

    Therefore, you must first reorganize the logic tasks. Then, you must nest the error handler task and set variable task inside of the IF and ELSE logic tasks, respectively. To reorganize tasks:

  3. Select the task that must run before another task, and click the Up arrow button. The selected task will switch places with the task that precedes it.

    or

    Select the task that must be executed after another task, and click the Down arrow button. The highlighted task is displayed below the task that previously followed it.

    To nest tasks/remove task nestings:

  4. Select the task that must be placed inside of another task, and click the Right arrow button. The selected task will be nested inside of the task that appears above it.

    or

    Select the task that no longer be nested inside of another task, and click the Left arrow button. The highlighted task will not be nested inside of the task that is displayed above it.

  5. On the toolbar, click Save.

    The order and nesting of the adapter's tasks is stored in the Oracle Identity Manager database. If the adapter is logically complete and all variables on the adapter tasks are mapped, you can compile it to use with a process task or form field.

  6. To compile the adapter, click Build.

    The text in the Compile Status field changes from Recompile to OK. This indicates that Oracle Identity Manager compiled the adapter and did not find any errors. You can now attach the adapter to a process task or form field.

    Caution:

    If you see CODE GEN ERROR in the Compile Status field, Oracle Identity Manager found errors while compiling the adapter. Rectify the errors, if necessary re-do the adapter task modifications, and compile the adapter again.

Deleting Adapter Tasks

When an adapter task is no longer necessary for the adapter to run, you must remove it from the adapter. To delete an adapter task:

  1. Select the adapter that contains the task you wish to remove (for example, the Update Solaris User Group adapter).

  2. Click the Adapter Tasks tab.

  3. Select the task that you want to remove (for example, the CONTINUE logic task).

  4. Click Delete.

    The selected task is deleted and disappears from the child table.

  5. On the toolbar, click Save.

  6. Recompile the adapter.

Caution:

While deleting adapter tasks, ensure that the logic of the adapter is consistent and maintained.

Working with Responses

Adapters can have different outcomes, called responses. Based on these responses, adapters can trigger other process tasks.

For example, if the adapter returns a True response, the process task's status can be set automatically to Completed. However, if the adapter returns a False response, the process task's status can be set automatically to Rejected, and another process task can be triggered.

These responses can be added, modified, or removed on the Responses tab of the Adapter Factory form.

The following procedures will show you how to create, modify, and delete responses.

Note:

Responses are used only with process task adapters, because these adapters are attached to process tasks. Rule generators, pre-populate adapters, and entity adapters are not connected to processes. In addition, task assignment adapters are not associated with responses. Therefore, if the active adapter is a task assignment adapter, rule generator, pre-populate adapter, or entity adapter, Oracle Identity Manager disables the Responses tab.

To Create a Response

  1. Select the adapter to which you want to add responses (for example, the Create Solaris User adapter).

  2. Click the Responses tab.

  3. Click Add.

    An empty row is inserted into the Responses tab.

  4. Click the field that appears within the Code Name column.

  5. Enter a code, which represents a response type that can be generated (for example, True).

  6. Click the field that appears within the Description column.

  7. Enter a description for this response (for example, The user was created successfully.).

  8. Double-click the field that appears within the Status column.

    The Lookup popup window is displayed, containing the different status levels that you can associate with the response.

    Note:

    For more information about Oracle Identity Manager's status levels, refer to Chapter 4, "About Process Task Adapters".
  9. Click the desired status level (for example, Completed (C)). Then, click OK.

    The Lookup window disappears, and the Responses tab is active once again.

  10. Create another response, by clicking the Add button, and entering False and The user was not created successfully. into the Code Name and Description fields, respectively. Then, access the Lookup window, and assign the Rejected (R) status level to this response.

  11. On the toolbar, click Save.

    The responses that you created for this adapter have been stored in the Oracle Identity Manager database. After you attach this adapter to a process task, these responses will appear in the Responses tab of the Editing Task window of the Process Definition form.

To Modify a Response

The following procedure demonstrates how to edit a response.

  1. Select the adapter that contains the response you want to edit (for example, the Create Solaris User adapter).

  2. Click the Responses tab.

  3. Double-click the field of the response, which contains information that you want to modify.

    1. If the field is a text field, Oracle Identity Manager enables it. You can now edit the contents within this field.

    2. When the field is a lookup field, the Lookup popup window is displayed, containing the different status levels that you can associate with the response. Click the desired status level, then click OK.

    For example, double-click the Status column of the False response, select the Suspended (S) status level, and click OK.

  4. On the toolbar, click Save.

    The information that you modified for the response is stored in the Oracle Identity Manager database.

To Delete a Response

When a response is no longer necessary, you can delete it from the adapter.

  1. Select the adapter, which contains a response that you want to remove.

  2. Click the Responses tab.

  3. Select the response that you want to delete.

  4. Click Delete.

The response disappears. This indicates that Oracle Identity Manager has deleted the response.

Scheduling Rule Generators and Entity Adapters

Oracle Identity Manager triggers a process task adapter or a task assignment adapter automatically if it is attached to a process task, and the process task's status is Pending. In addition, Oracle Identity Manager always triggers pre-populate adapters on pre-insert. Therefore, you do not schedule when process task adapters, task assignment adapters, or pre-populate adapters will be executed.

On the other hand, a rule generator and an entity adapter are attached to a form field. The only way that Oracle Identity Manager will be able to execute the rule generator or entity adapter is for you to specify when it will be triggered. You do this through the Execution Schedule tab.

Note:

If an entity adapter is attached to a process form or an object form for validation of field values, then these adapters will trigger if we edit data in these forms after completing direct or request provisioning.

Using this tab, you can determine that Oracle Identity Manager will trigger the rule generator or entity adapter on preinsert or preupdate. In addition, you can also schedule an entity adapter to be executed on predelete, postinsert, postupdate, and postdelete.

This procedure demonstrates how to configure Oracle Identity Manager to trigger a rule generator or entity adapter.

Scheduling Rule Generators and Entity Adapters

To schedule rule generator and entity adapters:

  1. Select the rule generator or entity adapter that you want Oracle Identity Manager to trigger (for example, Solaris User ID Generator).

    Note:

    When you work with process task adapters or pre-populate adapters, you do not use the Execution Schedule tab. As a result, this tab, as well as its contents, are grayed out.
  2. Click the Execution Schedule tab.

    The contents of the Execution Schedule tab appear.

    The following table will help you understand the various check boxes of the Execution Schedule tab:

    Name Description
    Pre-Insert By clicking this check box, Oracle Identity Manager can trigger the rule generator or entity adapter before the record is inserted into the database.
    Pre-Update When you click this check box, Oracle Identity Manager can trigger the rule generator or entity adapter before the record is updated in the database.
    Pre-Delete By clicking this check box, Oracle Identity Manager can trigger the entity adapter before the record is deleted from the database.
    Post-Insert When you click this check box, Oracle Identity Manager can trigger the entity adapter after the record is inserted into the database.
    Post-Update By clicking this check box, Oracle Identity Manager can trigger the entity adapter after the record is updated in the database.
    Post-Delete When you click this check box, Oracle Identity Manager can trigger the entity adapter after the record is deleted from the database.

    Note:

    By clicking the check boxes of the Execution Schedule tab, you are defining the times when Oracle Identity Manager can trigger the rule generator or entity adapter. The Data Object Manager form allows you to specify when Oracle Identity Manager will trigger the rule generator or entity adapter.

    For more information about the Data Object Manager form, refer to "Mapping Rule Generator Adapter Variables".

  3. Enable the desired check boxes. Then, from the toolbar, click Save.

    The criteria you set for Oracle Identity Manager to execute the rule generator or entity adapter is stored in the Oracle Identity Manager database.