From this window toolbar, click Close.

Developing Adapters 2-23

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.

2.8.4 Creating a Stored Procedure Task

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. Take these steps to create a stored procedure task:

1. For Oracle Identity Manager Installations that use Oracle Database, copy the

ojdbc14.jar file from the OIM_HOMEext directory to the OIM_DC_HOMExlclientext 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_HOMExlclientext 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. 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. 2-24 Oracle Fusion Middleware Developers Guide for Oracle Identity Manager The following table lists and describes the regions of the Add an Adapter Factory Task window.

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. Table 2–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. 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.