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?
You should throw an
EventFailedException
from the body of your event handler'sexecute
methods on a failure. This will flag the orchestration as having failed. A failed orchestration will callcompensate
on all event handlers that have already completed, and then exit cleanly in FAILED status. (You can query theORCHPROCESS
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.)