Executing Stored Procedure Tasks in OIM 11gR2 Environment
- Ram Somavarapu
- Feb 2, 2015
- 2 min read
In OIM world, adapters are Java programs that enables OIM to be integrated with other applications. Adaptor Factory Form (From Design Console) is used to configure these adapters with OIM. Use Case : I am provisioning a user to OUD from OIM through Out-Of-Box OUD/LDAP Connector. I also configured this OUD with Enterprise User Security (EUS) to provision the same user to Oracle Database. So, in a nutshell if I provision a user in OIM to OUD, he/she will be moved to Oracle Database. After successful provisioning of the user, I need to execute certain stored procedures in Database. This all needs to be in single provisioning operation. Post processing operations in OIM can be done in either of the two different ways. Write a Post Process Event Handler as part of Orchestration Process, and execute database stored procedure call during that event handler. Write a Process Task Adapter which calls the stored procedure, and attach this Process Task Adapter to LDAP User Process. Since, the database stored procedure call needs to be done after successful provisioning of user to OUD, option 1 is not possible. Orchestration process mainly deals with OIM Entity Operations like (Creating, Modifying or Deleting OIM entities), and post process event handler is part of Orchestration, and might not work for my use case. So, I have continued with option 2 of creating a custom process task and associate this with any of the provisioning taks(create user, modify user etc). Steps : 1) Open Design Console, and open Adapter Factory Form.Create a new adapter called CallDatabase(adpCallDatabase), and add a new Function Task : Java. Lets call the Name of the Task as “processExecute”, and this task is mapped to the Custom Java Class “DatbaseProcessTaskAdapter”’s method execute. You can also map input and output variables of the adapter.( Java class can be a simple POJO, and should be able to make database calls. The compiled jar file needs to be placed under $OIM_ORACLE_HOME/server/JavaTasks directory to be accessible for Adapter Factory. 2) Once the Jask task is mapped to the Process Task, then build the adapter and check Compile Status is OK. 3) Now, go to Process Definition of LDAP User, and add a new task.Let this task be named ExecuteDatabaseTask.Open the Integration Tab of this new task, and integrate this with the created database adapter(adpCallDatabase). 4) Once the task(ExecuteDatabaseTask) is created in LDAP User Process Form, then attach this task after successful completion of any of the predefined process tasks. I have assigned this task to "Tasks to Generate" section of "Response" Tab. Prior versions of OIM lets you create stored procedure directly from Adapter Factory, but it looks like this functionality doesn't work from OIM 11g onwards.Though, this section was not taken from OIM documentation(https://docs.oracle.com/cd/E40329_01/dev.1112/e27150/creadp.htm#OMDEV2720) , and Design Console Adapter Factory screens still lets you chose stored procedure task, but fails when you call the adapter.
Recent Posts
See All1) If LDAP Sync is not enabled, then Update the USR table as follows for the user 'XELSYSADM' Update usr set USR_PWD_WARN_DATE=null,...
In one of our client's environment we have seen the following error while running ldapsearch on OUD as a service account user, who is...
Kommentare