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

In this article, we will see the steps for implementing the AME solution, so that the data changes made from "Holiday Rejection Complaint Screen" will be sent for approval to your manager's manager. Before reading this article, you must read the following articles 

2.
 Understanding AME Concepts


This article also contains a video demo to demonstrate integration of AME,HRSSA Workflow, Screen and HR_API_TRANSACTIONS.

How will the AME calculate the Manager's manager of the person that complaints about holiday rejection?
In AME, the approver list is calculated using something known as Approver Group. The approver group can be a static list of people or a dynamic list of people. The dynamic list of approvers is calculated by executing a SQL statement. This SQL statement and its unit testing will be shown as a video demo in the next article.
In this case, we will write a SQL Statement that returns the name of the Manager's Manager of the person that created the Holiday Rejection Complaint record.



The AME is called from a specific screen, i.e. in this case Special Information Types screen. How will the AME get a handle to the original transaction/records for which AME is being called?
In AME, each AME Flow can be considered as an "AME Transaction Type". The SSHR screens passes a parameter to the AME Transaction Type. The name of the parameter passed by Self Service HRMS to AME is called TransactionId. This Transaction Id gives a handle back to the original transaction, which in this case is data entered via Holiday Rejection Complaint screen. Therefore by using the TransactionId, the AME Engine/AME SQL's can reference the originating transaction for which Approver List is being calculated.

While the Approval is in progression, the data remains in temporary tables named HR_API_TRANSACTION_VALUES [in case of SIT. Some other screens use XML CLOB in hr_api_transactions.transaction_document].  Therefore if your custom logic within the AME wants to access the original transaction data, that can be done by either querying HR_API_TRANSACTION_VALUES or by parsing the XML within the CLOB column. 
The primary key for table HR_API_TRANSACTIONS is Transaction_id. This Transaction Id is passed as a parameter to the AME Engine for SSHR AME Transaction Type. Therefore AME Trx Type will be passed the TransactionId using which it can get the handle to contents of HR_API_TRANSACTIONS



How do we know which AME Transaction Type will be called by our Custom Screen?
If you revisit Part-2 of this article, you will notice that the AME Transaciton Type and AME Trx Type ApplicationId are passed as parameters to the AOL Form Function. 
The parameters field in AOL Function definition contains AMETranType=SSHRMS&pAMEAppId=800



The same AME Trx Type is called in Self Service HRMS from other screens such as Personal Info update screen or from any other screen.  How will the AME know that it is being called from "Holiday Rejection Complaint" screen?
If you recollect from Article Part-3 in this series, we passed the name of the Custom Workflow process XXFT_HR_SIT_JSP_PRC as a parameter to the AOL Function for this screen. Effectively, the Workflow Process parameter to the screen tells Self Service HRMS the name of the WOrkflow Process within the HRSSA workflow that must be excecuted. Name of this process is captured in HR_API_TRANSACTIONS table.In the Self Service HRMS AME Transaction Type, Oracle delivers a pre-defined attribute named WORKFLOW_PROCESS_NAME. This attribute has a SQL attached to it which reads HR_API_TRANSACTIONS  via a pl/sql API. It means that, whenever the AME is used in SSHR, the value of the attributes within the AME Transaction type is calculated. This Attribute uses a SQL Statement to find the name of the workflow process from table HR_API_TRANSACTIONS. Needless to say, this SQL statement uses the TransactionId as shown below image



 
How do we build the logic for our solution?
We will be building a logic in AME that is similar to below
IF WORKFLOW_PROCESS_NAME='XXFT_HR_SIT_JSP_PRC' 
THEN
    Return Approver Name from AME Attribute XXFT_MANAGERS_BOSS_GROUP
END IF ;


What is XXFT_MANAGERS_BOSS_GROUP?
XXFT_MANAGERS_BOSS_GROUP will be a custom defined AME Approval Group that you can define. To this AME Approver Group, you can attach the following SQL Statement. This SQL statement returns the FND_USER.USER_ID of the Manager's manager for the employee that created a record in "Holiday Rejection Complaint" screen. 
select 'user_id:' || fu.user_id
  from hr_api_transactions         hat,
       per_all_assignments_f       paaf,
       per_all_assignments_f       paaf2,
       PER_ASSIGNMENT_STATUS_TYPES past,
       PER_ASSIGNMENT_STATUS_TYPES past2,
       fnd_user                    fu
 where hat.transaction_id = :transactionId
   and hat.selected_person_id = paaf.person_id
   and paaf.effective_start_date <= sysdate
   and nvl(paaf.effective_end_date, sysdate) >= sysdate
   and paaf.primary_flag = 'Y'
   and paaf.assignment_status_type_id = past.assignment_status_type_id
   and past.user_status = 'Active Assignment'
   and paaf.supervisor_id = paaf2.person_id
   and paaf2.effective_start_date <= sysdate
   and nvl(paaf2.effective_end_date, sysdate) >= sysdate
   and paaf2.primary_flag = 'Y'
   and paaf2.assignment_status_type_id = past2.assignment_status_type_id
   and past2.user_status = 'Active Assignment'
   and paaf2.supervisor_id = fu.employee_id




What are the AME Implementation Steps for this solution?
These are listed below
1. Create AME Condition that checks if the workflow process name = XXFT_HR_SIT_JSP_PRC
5. Create AME Approver Group XXFT_MANAGERS_BOSS_GROUP returns the name of Manager's Manager FND_USER.USER_ID
2. Create an AME Rule named "XXFT Holiday Rejection Complaint"
3. Attach this rule to the condition of Step 1
4. Add an action to this rule get the approver from XXFT_MANAGERS_BOSS_GROUP
6. When the end user initiates a "Holiday Rejection Complaint", then the custom HRSSA workflow process is instantiated. This calls the AME Engine to get next approver. 
The condition of Step (2) above is evaluated to be TRUE. Therefore the approver is returned by executing the SQL Statement against XXFT_MANAGERS_BOSS_GROUP


The above video also explains how to unit test your development for approval group.
Basically the above video joins different pieces like Workflow, Screen, AME and HR_API% tables together.


For in-depth AME hands-on practical training visit http://apps2fusion.com

In the next article you will see how to implement the above steps

Anil Passi

Comments   

0 #1 Chinna 2009-11-18 16:34
Hi,

Can you please tell me how can i get the transaction id or Item_Key and Item_Id from the controller using oaf ?
Quote
0 #2 Anil Passi- 2009-11-18 19:43
Please use the code below

import oracle.apps.per .selfservice.co mmon.SSHRParams ;
.
.
.
.
SSHRP arams sshrparams = new SSHRParams(oapa gecontext.getRo otApplicationMo dule());
String sTrxId = sshrparams.getT ransactionId();

Thanks,
Anil Passi
Quote
0 #3 zamora 2011-01-23 06:44
In which screen SSHR SIT screen passes parameter to the AME Transaction Type.
Because i have copied a SIT process and save it as another name and i am using this process for my new oaf page, which is called from sshr function.
I changed the node attribute value to my page. every thing is working upto review page, even flow is also working to and fro. But when i submit the reiw page, am getting error from the next attribute. and also when i check the activity details in the wf monitor.. no trasaction id . What should i do to integrate my custom page to ame.
Quote
0 #4 Dakshesh Patel 2011-05-18 01:34
Hi Anil,

i have integrated workflow with ame it is working fine when i am using approvers for hr people or fnd user, but when i try to retrive approvars based on position then it give me error parralization configuration problem.
so, please help me to solve this problem.


Rega rds,
Dakshesh Patel
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