Understanding User Hook in Oracle EBS R12

Understanding User Hook in Oracle EBS

In Release 11 Oracle has introduced API’s with User hook functionality is introduced to incorporate or execute additional customer specific business logic on standard API’s. Mostly it is used in Absence Management, EIT (Extra Information Types) & SIT (Special Information Types) to validate a request or to integrate a process to another after process e.g. creation /updation/deletion of element entry , updating assignment, contact information, personal information etc…

Business Case 1: Restricting Employees to submit multiple request for a specific process e.g. Advance Salary until one request is pending for approval

Business Case 2: Creating Element Entries upon approval of specific process e.g. Advance Salary

Business Case 2: Validating inputs like Emirate Id Expiry date can’t be greater than Emirate Id Issue date

 

USER HOOK:-

User Hook is a enhanced functionality  used to encapsulate additional customer specific Business Logic, when the API processing reaches a user hook, Standard API execution stops and any custom logic for that event is executed. Then, if no errors occur, the API processing resumes.

User Hook is a procedure call on a specific Business event(Create, Update, Delete API etc..) or Table event(Insert, Update or Delete), Specific business logic is executed within custom procedure registered to be called.

There are two types of User Hooks as given below,

1.Business Process API’s:-

Business Process User Hooks are event points on a Process which execute custom logic if event is triggered, Below are the Event points

  1. after process (AP)

    • Custom procedure will be called after execution of standard API, If no error then transaction will be omitted else roll-backed
  2. before process (BP)

    • Custom procedure will be called before execution of standard API, If no error then standard API will be process otherwise standard API will not be called

1.1 List of Business Process User Hooks:-

-----------Run below Query to retrieve all Business Process User Hooks------------------------------------------
SELECT AHK.API_HOOK_ID,
 AHK.API_MODULE_ID,
 AHK.HOOK_PACKAGE,
 AHK.HOOK_PROCEDURE,
 AHM.MODULE_NAME,
 AHM.API_MODULE_TYPE,
 AHK.API_HOOK_TYPE 
 FROM HR_API_HOOKS AHK, HR_API_MODULES AHM
 WHERE 1=1
 AND AHM.API_MODULE_TYPE = 'BP'
 AND AHK.API_MODULE_ID = AHM.API_MODULE_ID;

--------------------------------------------------------------------------------------------------------------------
Business Process

 2. Row Handler API’s:-

Row Handler User Hooks are event points on tables which execute custom logic if event is triggered, Below are the Event points

  1. after insert (AI)
    • after Insert custom procedure will be called
  2. after update (AU)
    • after update custom procedure will be called
  3. after delete (AD)
    • after delete custom procedure will be called

2.1 List of Row Handlers User Hooks:-

-----------Run below Query to retrieve all Row Handler User Hooks-------------------------- 
SELECT AHK.API_HOOK_ID,
 AHK.API_MODULE_ID,
 AHK.HOOK_PACKAGE,
 AHK.HOOK_PROCEDURE,
 AHM.MODULE_NAME,
 AHM.API_MODULE_TYPE,
 AHK.API_HOOK_TYPE 
 FROM HR_API_HOOKS AHK, HR_API_MODULES AHM
 WHERE 1=1
 AND AHM.API_MODULE_TYPE = 'RH'
 AND AHK.API_MODULE_ID = AHM.API_MODULE_ID;

---------------------------------------------------------------------------------------------
Row Handlers

 

Conclusion:-

Basic difference between Business Process & Row handler User Hook is event hook. Furthermore in Business Process User Hooks custom procedure containing additional business logic can be called upon the the hook type (before or after) selected which make the Business Process Hook best choice for applying Input validations or restrictions as mentioned in Case 1 & Case 2 above.While, In Row handler event standard API has to be processed prior to custom business logic (type of event could be insert, update or delete) which could be the best option for maintaining integrated processes as mentioned in Case 2 above.

0 responses on "Understanding User Hook in Oracle EBS R12"

Leave a Message

top
ERPWebTutor
2011-2017, All rights reserved © A part of the Orison Consulting Group
PO Box 16014 San Juan Puerto Rico 00908
Email: [email protected]
Terms of Use
Contact Us
close slider

Contact