How to Configure AME in R12 –  Assign Roles & Create Grants for User
Oracle Approvals Management (AME) functionality is a self-service web application that allows users to
define rules for administering approvals of various types of transactions. Learn how easy it is to use this
powerful functionality to create complex approval scenarios that meet your unique business requirements.
Case studies of recent successful implementations will be presented for PO, AP and HR. Learn how to
accommodate individual employee signing limits, how to integrate workflow timeout functionality with AME.

Oracle Approvals Management (AME) is a self-service Web application that enables users to define business rules governing the process for approving transactions in Oracle Applications .This enables development of custom rules to manage transaction approvals that is integrated with multiple Oracle EBS applications such as HR, PO, AP and UMX.

If you want to migrate the AME setup like rules,conditions,approval groups etc. from one instance to another instance, you can use some of them by mean of FNDLOAD utility. The process is similar to what we are regularly using for other AOL Objects.

FNDLOAD will have such ldt file through which you can use.

Here are the details steps for each setup’s.

1. Condition:

The script that downloads AME conditions allows you to download all conditions for a given transaction type or only those associated with a particular attribute or group of attributes.

Download
FND_TOP apps/<apps password> 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesconk.lct <ldt filename> AME_CONDITIONS CONDITION_KEY=<condition key> TRANSACTION_TYPE_ID=<trans typs id> APPLICATION_SHORT_NAME=<application short name>

Upload
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesconk.lct <ldt filename>

Example:
FNDLOAD apps/<passwd>@sourcedb 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesconk.lct amecondition.ldt AME_CONDITIONS APPLICATION_SHORT_NAME=’PER’ TRANSACTION_TYPE_ID=’HRSSA’ ATTRIBUTE_NAME=’PROCESS_NAME’ CONDITION_KEY=’317772662:44552′;
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesconk.lct amecondition.ldt

2. Dynamic Approval group /Approver Groups:

An approver group can either be an ordered set of one or more approvers (persons and/or user accounts) or it can be a list, which is dynamically generated at rule evaluation time.

Download
FND_TOP apps/<apps password> 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesappg.lct <ldt filename> AME_APPROVAL_GROUPS APPROVAL_GROUP_NAME=<name of approval group> TRANSACTION_TYPE_ID=<trans typs id> APPLICATION_SHORT_NAME=<application short name>

Upload
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesappg.lct <ldt filename>

Example:
FNDLOAD apps/<passwd>@sourcedb 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesappg.lct ameapprovalgroup.ldt AME_APPROVAL_GROUPS APPROVAL_GROUP_NAME=’Dyn Apprv Hub Approval Group’ TRANSACTION_TYPE_ID=’HRSSA’ APPLICATION_SHORT_NAME=’PER’
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesappg.lct ameapprovalgroup.ldt

3. Dynamic Approval group config:

Download
FNDLOAD apps/<passwd>@sourcedb 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesaagc.lct ameapprovalgroupusage.ldt AME_APPROVAL_GROUP_CONFIG APPROVAL_GROUP_NAME=’Dyn. Post HROPs Approval Group’ TRANSACTION_TYPE_ID=’HRSSA’ APPLICATION_SHORT_NAME=’PER’

Upload
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesaagc.lct ameapprovalgroupusage.ldt

4. AME Rule:

An approval rule is a business rule that helps determine a transactions approval process. Rules are constructed from conditions and actions.

The AME rules can be downloaded for information about the rule (e.g. name, description, etc) along with associated conditions and rule type.

Download
$FND_TOP/bin/FNDLOAD apps/<apps password> 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesrulk.lct <ldt filename> AME_RULES RULE_KEY=<Rule Key > TRANSACTION_TYPE_ID=<trans typs id> APPLICATION_SHORT_NAME=<application short name>

#You can find Rule Key in AME_RULES table
Upload
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesrulk.lct amerule.ldt

Example:
FNDLOAD apps/<passwd>@sourcedb 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesrulk.lct amerule.ldt AME_RULES RULE_KEY=’317772662:54567′ TRANSACTION_TYPE_ID=’HRSSA’ APPLICATION_SHORT_NAME=’PER’
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesrulk.lct amerule.ldt

5. AME Rule Action Type Usage:

Download
FNDLOAD apps/<apps pw> 0 Y DOWNLOAD amesactu.lct <download file name>.ldt AME_ACTION_USAGES APPLICATION_SHORT_NAME=<FND application short name> TRANSACTION_TYPE_ID=<AME transaction type short name> [RULE_KEY=<Rule Key>]

# Rule Key is found in AME_RULES table
Upload
FNDLOAD apps/apps 0 Y UPLOAD amesactu.lct usage<download file name>.ldt

Ex:
FNDLOAD apps/<passwd>@sourcedb 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesactu.lct ameactionusage.ldt AME_ACTION_USAGES RULE_KEY=’317772662:54567′ TRANSACTION_TYPE_ID=’HRSSA’ APPLICATION_SHORT_NAME=’PER’
FNDLOAD apps/<passwd>@destinationdb 0 Y UPLOAD $PER_TOP/patch/115/import/amesactu.lct ameactionusage.ldt

6. Transaction Types

An application that uses AME to govern its transactions’ approval processes is termed an integrating application. An integrating application may divide its transactions into several categories where each category requires a distinct set of approval rules. Each set of rules is called a transaction type. Different transaction types can use the same attribute name to represent values that are calculated in different ways or fetched from different places.

Download
FNDLOAD apps/<apps pwd> 0 Y DOWNLOAD amescvar.lct <download file name>.ldt AME_CALLING_APPS APPLICATION_SHORT_NAME=<FND application short name> TRANSACTION_TYPE_ID=<AME transaction type short name>

Upload
FNDLOAD apps/<apps pwd> 0 Y UPLOAD amescvar.lct <download file name>.ldt

Eg:
FNDLOAD apps/apps 0 Y DOWNLOAD amescvar.lct hubtrantype.ldt AME_CALLING_APPS APPLICATION_SHORT_NAME=SQLAP TRANSACTION_TYPE_ID=SBTRANSTYPE
FNDLOAD apps/apps 0 Y UPLOAD amescvar.lct hubtrantype.ldt

7. Attribute

Attributes are business variables with a single value for a particular transaction. 
Download

FNDLOAD apps/<apps password> 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesmatt.lct <ldt filename> AME_ATTRIBUTES ATTRIBUTE_NAME=<attribute name> TRANSACTION_TYPE_ID=<trans typs id> APPLICATION_SHORT_NAME=<application short name>

Upload
FNDLOAD apps/<apps pwd> 0 Y UPLOAD amesmatt.lct <ldt download file name>

Example:
FNDLOAD apps/apps 0 Y DOWNLOAD amesmatt.lct hubattributes.ldt AME_ATTRIBUTES APPLICATION_SHORT_NAME=SQLAP
TRANSACTION_TYPE_ID= SBTRANSTYPE ATTRIBUTE_NAME=SB_CUST_ATTRIBUTE
FNDLOAD apps/apps 0 Y UPLOAD amesmatr.lct hubattributeusages.ldt

8. Attribute Usage

Download
FNDLOAD apps/<apps password> 0 Y DOWNLOAD $PER_TOP/patch/115/import/amesmatr.lct <ldt filename> AME_ATTRIBUTE_USAGES ATTRIBUTE_NAME=<attribute name> TRANSACTION_TYPE_ID=<trans typs id> APPLICATION_SHORT_NAME=<application short name>

Upload 
FNDLOAD apps/<apps pwd> 0 Y UPLOAD amesmatr.lct <download file name>.ldt

Example:
FNDLOAD apps/apps 0 Y DOWNLOAD amesmatr.lct hubattributeusage.ldt AME_ATTRIBUTE_USAGES aPPLICATION_SHORT_NAME=SQLAP
FNDLOAD apps/apps 0 Y UPLOAD amesmatr.lct hubattributeusages.ldt

Follow the steps below to have access to AME.

Steps to AME configuration for any user:



1) Select the User Management responsibility.
2) Select the Users page.
3) Search for the user to whom you wish to grant AME roles.
4) In the results table, click Update. In the Update User page, you can view user details along with a list of roles available to the user.
5) Click Assign Roles.
6) Select following roles and click Apply.

1) Approvals Management Administrator
2) Approvals Management Analyst
3) Approvals Management System Viewer
4) Approvals Management System Administrator
5) Approvals Management Process Owner

7) Grant data access to users

1) Login as Administrator.
2) Select the Functional Administrator responsibility.
3) Select the Grants tab.
4) Click Create Grant.
5) Select Specific User as grantee type.
6) Select the user as grantee key.
7) Select AME Transaction Types as Object
8) Select AME Calling Applications as Set
9) Follow the screen and click on Finish

8) Run “Workflow Directory Services User/Role Validation”
9) Select Approval Management Business Analyst responsibility and check functionality.

Oracle Approvals Management or AME, as it is called in general, is a module of Oracle Applications that contains the hierarchy list for all seeded/standard workflows. We can configure individual approval lists for each workflow in this module. To enable the workflows to use AME hierarchy list a profile option, AME: Installed, has to be set. Just like any profile option it can be set at any of the flowing levels,
  • Site
  • Responsibility
  • Application
  • User 

AME profile option
Demonstration of setup and usage of AME
We shall look at setting up the AP Invoice Approval hierarchy in AME. This hierarchy has not been used in the instance as the customer does not use AME for AP.
Responsibility: Approvals Management Business Analyst
Navigation: Business Analyst Dashboard
Enter %invoice% and press tab
Attributes 
Click on Attributes
We are selecting Attribute, SUPPLIER_INVOICE_AMOUNT. Click Next on the attributes are to find the this attribute
Clicking on this attribute gives the details of the attribute,
You can see how Oracle derives the value of the attribute. Let us go back to the Attributes screen by clicking Return to Attributes link at the bottom left of the screen.
If you want to modify the logic that Oracle uses on this attribute you can click on Update icon (the pencil icon) for this attribute.
Note the input parameter for the query. The condition, ai.invoice_id = :transactionId, means that the input to the AME rule will be validated against the invoice_id from the ap_invoices_all table. Thus the input into AME rule for this transaction will be invoice_id. We shall use this for testing AME later on. Make the change to the query and press Apply button.
ConditionsWe shall now add a condition. Click on Conditions.
Click on Create button and select,
Condition Type: Ordinary
Attribute: SUPPLIER_INVOICE_AMOUNT
Let’s add the condition that an invoice should be sent to 1 selected approver if the invoice amount is between AED 1000 and AED 5000.

Use the drop down lists to create the condition. Click Apply.
You can see the confirmation message on top that the condition has been added to the list.
Action Types
Now we have created a condition, we have to create an Action Type. Click on Action Types link on the top menu.
We will select an existing Action Type. Click Use Existing Action Type button.
Click on the Next button until you see “Supervisory level“. Select this Action Type
Click on Continue button.
Click Finish button.
Rules
The Action Type is now created. We now need to create a Rule. Click on the Rules tab to the top right menu.
Click on Create button to create a new rule.
Enter a new name,
Name: Invoice test rule
Rule Type: List Creation is defaulted
Start Date: today’s date is defaulted
End Date: Defaulted as 31-Dec-4712
Click on Next
Click on Add Conditions button. Now we get to select which conditions are to be added to this rule.
Let us select the condition we created named, “SUPPLIER_INVOICE_AMOUNT is greater than 1000 and less than or equal to 5000,AED“. Select this condition and click Continue button.
Check the details and click on Next
Action Type is populated automatically as this is the Action Type that was selected earlier for this transaction type. Select an Action from the list of values. Select the Action from the List of Values.
We select “Requires approvals up to the first two superiors
Click Next
Review and click Finish
Now the rule is ready to be tested and deployed.
Test the AME setup
Let us test the rule before we start using it in the transaction.
First we shall create a test invoice for testing the AME rule.
Navigation: Payables Administrator
Navigation: Invoices > Entry > Invoices
We have put a condition in AME for currency, AED, and amount between 1000 and 5000. Hence we have created an invoice with the following details,
Invoice number: TEST-AME
Invoice currency: AED
Invoice amount: 1500
Go to back to Business Analyst Dashboard in Approvals Management Business Analyst responsibility.
Click on Test icon corresponding to Payables Invoice Approval transaction type.
Click on Run Real Transaction Test.
Enter the transaction id 720374. This is the invoice_id from the ap_invoices_all table (explained in Attributes section above). The invoice amount is between AED 1000 and AED 5000, (AED1500 for the invoice we have created) i.e. as per the condition we have set in AME.
Click Go
Now the AME transaction data is shown on this page. We also have a warning message from Oracle. The message is “The Line Item attribute SUPPLIER_INVOICE_DISTRIBUTION_ASSETS_TRACKING_FLAG has invalid usage for item 278866“. Approver listmay not be generated if this attribute used in conditions”.
We need to look into the attribute SUPPLIER_INVOICE_DISTRIBUTION_ASSETS_TRACKING_FLAG.
Let us check this attribute.
Click on Setup tab on the top menu. Then click on Attributes underneath the top menu. Select the attribute by entering the name in Search form in the middle of the form.

Click Update

Select the query from the Value field and paste it in SQL.
1
2
3
4
5
6
SELECT   assets_tracking_flag
    FROM ap_invoice_distributions_all
   WHERE invoice_id = :transactionid AND invoice_distribution_id IN (SELECT invoice_distribution_id
                                                                       FROM ap_invoice_distributions_all
                                                                      WHERE invoice_id = :transactionid)
ORDER BY invoice_distribution_id
Execute the sql and pass the invoice_id, 130384 (that was being used for the AME test).
The output is ‘Y’. If you notice the Attribute Data Type in the Attribute screen in AME, it is Number. Hence there is a mismatch.
Let us change this query to return only 1. Change the query to the following and paste it on the Value field in the Attribute form in AME.
1
2
3
4
5
6
SELECT   1
    FROM ap_invoice_distributions_all
   WHERE invoice_id = :transactionId AND invoice_distribution_id IN (SELECT invoice_distribution_id
                                                                       FROM ap_invoice_distributions_all
                                                                      WHERE invoice_id = :transactionId)
ORDER BY invoice_distribution_id
Click on Validate button to validate the query
The message on top shows that the query is valid. Click on Apply. Go back to the Test Workbench page by clicking on Test Workbench tab on the top right menu. Click on Run Real Transaction Test (1) button.
Enter the same transaction Id, 130384, and click on Go.
Click on Run Test Case (2) button.
Oracle throws an error, “This transaction’s requestor lacks a person ID, so AME cannot locate the requestor’s supervisor to begin the chain of authority“. This means the requester_id field has to be populated in the table.
Let us populate the requester_id field for this invoice. For demonstration we shall perform this action using an update statement. Go back to the AP invoices form and query for the invoice. Click on Folder > Show field. Query for Re%
Select Requester from the value set.
Set the value for Requester. This can be any active employee. The hierarchy of this employee will be used up to 2 levels.
Save the form. Go back to Test Workbench in AME. Enter Transaction Id: 720374. Click on Run Test Case (1) button.
Now click on Run Test Case (2) button
Now the approver list comes up for AME as the requester has been set for the invoice.
We can get AME rule details by clicking on the + or Show buttons.
We get to see the AME rule information. Now by clicking Show button for the 2nd approver, i.e. the approver on top.
Now check the 1st approver
The AME rule is now setup. Once the Invoice is sent for approval after setting the requester name the flow will be similar to what we tested now. The same logic applies to all AME approval rules.
We have used a very simple example to illustrate setting up AME rules. The same method is used to create AME rules for all transactions. Certain setup options have not been used, like Approval Groups, etc. Once AME setup is clear using the extra options will be very easy.
We have tested the approval list for the AP invoice workflow through AME. Once we send the invoice for approval, the workflow will be executed and the approval notifications will be sent in the same hierarchy.