Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Functional Documents
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

When a Self Service HRMS user creates any data from the screens, such data goes and resides in some temporary tables. This data is retained within the temporary tables until the transaction is Completed. A transaction in this example gets completed when Holiday Rejection complaint is either Rejected or Approved. These temporary table names begin with name HR_API%. In reality, the data entered by the user is either stored within just one table i.e. HR_API_TRANSACTIONS or within HR_API_TRANSACTION_VALUES. When the data is stored in just the HR_API_TRANSACTIONS then the entire data entered by the user is captured in a CLOB column. This feature was introduced couple of years ago, whereby for performance reasons the temporary data is captured in a clob column named HR_API_TRANSACTIONS within HR_API_TRANSACTIONS. This CLOB column contains XML contents. By now, you might have the following questions 
1. What exactly is captured in CLOB column hr_api_transactions.transaction_document
2. How does Self Service HRMS decide whether the transaction data which is in-transit goes into CLOB or HR_API_TRANSACTION_VALUES.
3. How is this temporary data used by AME
4. How is the data transferred from temporary tables to base tables in HRMS.

In this article I will answer these questions, so that you can proceed with the AME bits that depends upon this information. In addition to this, you will also learn how the "SAVE FOR LATTER" feature works in HRMS.

As soon as you enter any data in Self Service HRMS screens and navigate to the next page, an entry is created in HR_API_TRANSACTIONS. Of course, the AME API's are called "during" the approval process which happens after the data has been submitted for approval. This means at the time of "AME Engine processing" the data entered by the Self Service HRMS Screen is in-transit, i.e. in temporary tables. In fact, within the AME, you will be passed the transaction_id from hr_api_transactions. Therefore the AME engine has a handle to the entire in-transit data via hr_api_transactions.transaction_id. Using this TransactionId handle, you can either query the CLOB XML in SQL or you can query HR_API_TRANSACTION_VALUES.


1. What exactly is captured in CLOB column hr_api_transactions.transaction_document
In this column the entire state of the Application Module is captured. Application Module in OA Framework manages the transaction state and also serves as a cache of the data in the memory. In this example, when the user enters a Holiday Rejection Complaint and submits for approval, then entry is created in table HR_API_TRANSACTIONS, HR_API_TRANSACTION_STEPS and HR_API_TRANSACTION_VALUES. This also serves the purpose of SAVE FOR LATTER. When you save a transaction for latter, effectively the entire data in the cache is dumped into temporary tables. If the self service user wants to restart the transaction after few hours/days, then entered data is re-queried from these HR_API temporary tables



2. How does Self Service HRMS decide whether the in-transit transaction data goes into XML CLOB HR_API_TRANSACTIONS.TRANSACTION_DOCUMENT or into HR_API_TRANSACTION_VALUES.
In the old version of Self Service HRMS, all the temporary information is captured in the following tables.
HR_API_TRANSACTIONS
HR_API_TRANSACTION_STEPS
HR_API_TRANSACTION_VALUES

This is show in SQL as below
select name, varchar2_value, date_value, number_value
  from HR_API_TRANSACTION_VALUES
 where TRANSACTION_STEP_ID IN
       (select TRANSACTION_STEP_ID
          from HR_API_TRANSACTION_STEPS
         where transaction_id = 76184)
   and (varchar2_value is not null or date_value is not null or
       number_value is not null)



In the latter versions of 11.5.10, "some" of the screens in SSHR have started dumping the Application Module state into CLOB column. Therefore, even in R12, you will notice that Special Information Types screen continue to use HR_API_TRANSACTION_VALUES as shown in image above. However some other screens like Talent Management Object Setting use HR_API_TRANSACTIONS.TRANSACTION_DOCUMENT in both 11.5.10 and R12. This is shown as below






3. How is this temporary data used by AME
Inside AME, you usually write SQL statements against AME Attributes and AME Approval Groups. In those SQL statements, you can reference HR_API_TRANSACTIONS.TRANSACTION_ID by using convention :transactionId




4. How is the data transferred from temporary tables to base tables in HRMS.
Oracle executes an API named hr_transaction_swi.commit_transaction which takes the transaction_id as parameter.
This transfers the data from temporary tables to the base tables.
DECLARE
  v_trans_api_result VARCHAR2(1);
BEGIN
  v_trans_api_result := 
                     hr_transaction_swi.commit_transaction
                     (
                     p_transaction_id => n_hr_api_transaction_id --pass the transaction_id here
                    ,p_validate       => hr_api.g_false_num
                    ,p_effective_date => sysdate
                     );
END;

The above API is usually called when Self Service HRMS Transaction is completed, for example when Approved. This is executed via one of the activities in HRSSA workflow after AME processing is completed.
In the event AME approval is not required, hr_transaction_swi.commit_transaction is called immediately after the user submits the data from Self Service HRMS screen


Anil Passi

Comments   

0 #1 Saurabh Sonkusare 2009-10-24 04:55
Hi,

Thank you for such a good post.

I have one question regarding HR_API_TRANSACT ION table. I noticed that after few period of time, records seize to exist in this table. Can we know in what conditions/even ts records are deleted from this table?

Regards ,
Saurabh
Quote
0 #2 Anil Passi- 2009-10-24 12:13
Hi Saurabh

When the workflow completes, the records disappear.
Howe ver in reality, this happens somewhere in between the flow once the transaction has either been applied to the base tables via commitAPI or rolledback

The refore I call this data in hr_api_transact ions as in-transit data

Thanks,
A nil
Quote
0 #3 Vikram 2010-06-30 06:16
Hi ,

I need a small info regarding""TRAN SACTION_DOCUMEN T\" in HR_API_TRANSCAT IONS table . For the some of the process like leave of absence application is creating transcation document in HR_API_TRANSCAT ION table. But for some processes like Special information type or New hire process system is not creating any transcation document. Can you please do let me know what is the functionality behind this !

Thanks in advance
Regards
Quote
0 #4 Anil Passi- 2010-06-30 08:42
Hi Vikram, You haven't read the entire series of these articles, otherwise you wouldnt be asking this question :)

Have a look at following two tables
HR_API_T RANSACTION_STEP S
HR_API_TRANSA CTION_VALUES

T hanks,
Anil :) :)
Quote
0 #5 mr reddy 2011-02-17 08:18
Hi friends.. in the hr_api_transact ions table.. i can see one column status.. can some one briefly explain me about the Column Status in the hr_api_transcat ions table.
Quote
0 #6 Dakshesh Patel 2011-05-11 02:12
Hi,
I have made a custom workflow for approval but i am not getting item_key in hr_api_transact ion of custom worklfow .
I want to integrate custom workflow with AME.
so please help me.

Regards,
D akshesh Patel
Quote
0 #7 Sushmita 2011-06-15 03:03
Hi Anil,

All your articles are very informative and useful. Thanks for sharing these with us.

Please let me know how the value in the field "api_name" populates (in the table hr_api_transact ion_steps) whenever a transaction is initiated in SSHR? Is there a setup somewhere linking the various Processes and the API to be used?

Would appreciate your response.



Th ank you,
Sushmita
Quote
0 #8 leo chen 2012-02-07 10:40
Is there API for AME Approval Groups? Thanks
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner