Search code examples
event-handlingidentityidentity-managementoimidentitymanager

How to stop the Role Assignment on the basis of certain condition in OIM 11g r2 PS3


I have coded one event handler to intercept the role_assignment and role_revoke operation.

I need to run some webservice on remote server and if response is 200 _ OK I want to do nothing.

But if response is not 200 I need to fail role assignment.

How should I do it?


Solution

  • You should throw an EventFailedException from the body of your event handler's execute methods on a failure. This will flag the orchestration as having failed. A failed orchestration will call compensate on all event handlers that have already completed, and then exit cleanly in FAILED status. (You can query the ORCHPROCESS table to find the failed orchestration.)

    See the JavaDoc for this exception here: https://docs.oracle.com/cd/E52734_01/oim/OMJAV/oracle/iam/platform/kernel/EventFailedException.html

    And Oracle's documentation on developing custom event handlers here: https://docs.oracle.com/cd/E27559_01/dev.1112/e27150/oper.htm#BGBHBIFH

    (This is for an earlier version, but it's basically the same in later versions.)