Wednesday, 22 June 2011

Basic Steps Related To AME Implementation


AME Steps with an example:
-----------------------------
Responsibility : Approvals Management Business Analyst
---------------
*Rule   
*Name         : XXTEST_LEAVE_SUPERVISOR_APPROVAL
*Rule Type   : List Creation
Catagory      : Approver/FYI
*Priority       : 1
*Start Date   :
*End Date    :

## Setup
  I. Attributes
   ===========
     Name      : XXTEST_IS_EMPLOYEE_INITAITED_TXN
     Item Class    : Header
     Description   : This will check if the transaction is initiated by an employee.
     Data Type     : String
     Approver Type : None
     Usage Type    : Dynamic
     Value Set     :
     Value      : select 'YES' from hr_api_transactions
         where creator_person_id=selected_person_id
         and transaction_id=:transactionId
        
         union all
        
         select 'NO' from hr_api_transactions
         where creator_person_id !=selected_person_id
         and transaction_id=:transactionId
        
         union all
         select 'NO' from dual
         where not exists ( select 1 from hr_api_transactions where transaction_id=:transactionId )
     Category    : Others
     Action Types : None

  
  II.  Conditions
  ==========
    1. Condition Type : Ordinary
     Item Class     : Header
     Attribute Name : XXTEST_IS_EMPLOYEE_INITAITED_TXN
     Data Type      : String
     Condition      : XXTEST_IS_EMPLOYEE_INITAITED_TXN in (YES)
   
    2.  WORKFLOW_PROCESS_NAME in (HR_GENERIC_APPROVAL_PRC)
   
 III. Action Types
 ============
     approval-group chain of authority
    
 IV. Approver Groups
 ===============
     Name     : XXTEST_LEAVE_SUPERVISOR_APPROVER
     Description     : This will fetch the supervisor.
     Usage Type   : Dynamic
     Order Number   : 1
     Voting Method   : Serial
    
     Query     :   select 'person_id:'||supervisor_id
          from per_assignments_f paf,
            hr_api_transactions hat
          where hat.transaction_id=:transactionId
          and hat.selected_person_id=paf.person_id
          and trunc(sysdate) between effective_start_date and effective_end_date
          and primary_flag='Y'
     

No comments:

Post a Comment