If someone give me an OIM environment and ask to find out all the event handlers deployed on it and their associated class, it is not that easy process to find out. In this article, I am going to describe how one can find all the event handlers (User, Role etc.) and their qualified class name deployed on OIM (PS3).
Before we start, we need to understand where we generally use event handlers in OIM. It is used normally during any OIM events like create/modify/delete/disable/enable of users or assign/revoke role etc. where create, modify, delete, assign are kind of operation and user, role are entities.
In order to find out how many event handlers are there, follow the below steps:
1. Login to weblogic EM console and expand Identity and Access -> OIM -> oim(11.1.2.0.0)
2. Right click on it and select System MBean Browser.
3. Now naviage to oracle.iam -> server:oim -> Application:oim -> IAMAppDesignMBean
4. Click on ConfigQueryMBeanName
5. From right hand window, click on Operations
6. Click on the getEventHandlers.
7. In the parameter section put the parameter as below:
P1 --> Entity Type (user, role etc.)
P2 --> Operation (create, modify, delete etc.).
8. Once done click on Invoke.
9. It will display the result in the same page.
10. The output list contains all the event handlers’ doc available in the MDS.
11. It contains validation, pre-process, action, post process along with out of band handlers.
12. Each row contains 5 columns as below
Stage: whether it is validation, pre-process, action or post process
Order: Order number of the handlers.
Name: name of the event handlers
Location: the document location in MDS
Conditional: true or false
13. Now pick the appropriate one you need to check further. Normally you can find out from the name.
14. Copy the MDS doc location.
15. Now navigate to oracle.mds.lcm -> Server:oim -> Application: OIMAppMetadata -> MDSAppRuntime
16. Click on MDSAppRuntime and from the right hand panel click on Operations
17. Now click on the first exportMetadata link as mentioned in the picture.
18. In the parameter section we have to provide 2 parameters as below:
toLocation: Location where file will be downloaded (in the server where OIM is installed)
docs: name of the MDS doc. In order to enter the doc, click on the pencil icon and add the doc like below. You can add more than one doc at a time. Click OK.
19. Once all the parameters are given click on Invoke.
20. If invoke is successful then success message will be displayed.
21. After this operation, login to the host machine and go to the mentioned output location.
22. You can find the directory structure as per the doc name and the file as below
23. Open the file in editor mode and check the list of event handler defined. You can find the list of event handlers like below:
<action-handler orch-target="oracle.iam.platform.kernel.vo.EntityOrchestration" class="oracle.iam.identity.usermgmt.impl.handlers.custom.CustomPostProcessHandler" entity-type="User" operation="CREATE" name="CustomPostProcessHandler" stage="postprocess" sync="TRUE" order="2000000"/>
24. Now you can get your desired event handler and their associated class name.
Note: if you want to change some of the existing event handlers functionality, simply change the class name and re-import.