Calling next approver from AME

Oracle Approvals Manager(AME) can be used to define approvers for Oracle Workflow.

The following procedure could be used for getting the Next Approver from AME:


l_next_approver AME_UTIL.approverRecord;
Ame_Api.Getnextapprover ( 20003, —applicationId
   1325, — transactionId
   L_Next_Approver —Out Parameter
   ) ;

After the 1st level of hierarchy is got we need to call the following code to delete the present Approver:

Note  : without calling this we will not be able to get the  next level of approver even when we call the getnext approver again

  L_Next_Approver Ame_Util.Approverrecord;
  L_Next_Approver.person_id :=23907; 
  Ame_Api.Deleteapprover(20003, –applicationIdIn
                           1325, –transactionIdIn
                           ‘ASSET’ —transactionTypeIn
  —   Dbms_Output.Put_Line(L_Next_Approver.Person_Id);

 Process Flow :

call getnextapproverto get 1st  level of approver–> call deleteapprover —> call getnextapprover to get 2nd level of approver

The following code could be used to get all approvers

  L_Next_Approver Ame_Util.Approverrecord;    
    approversOut ame_util.approversTable;
  Ame_Api.Getallapprovers(20003, — application_id
                            1324,–  transactionId,
                             ‘ASSET’,– Transactiontype
                              approversOut );
  for i in approversOut.first..approversOut.last
  end loop;
End ;

Note: Set the default Attrtibute in AME for delete present approver.This delete approver only works for the present transaction.



7 thoughts on “Calling next approver from AME

  1. Could you please advice about these fields mentioned in the document.

    1325, — transactionId

    where are they mapped in the tables.
    i tried with transaction id, itemkey, itemtype, transaction type fields in the table. But no record found was coming.

  2. From which field i can get AME transaction type from, Could you please guide me.
    FOR Hrms, Passport approval. I have issue in implementing the HR approval.
    We are doing a mobile apps integration with Oracle HRMS.
    I would like to map with the fileds from tables. I tried to take the trasnaction type and transaction id from hr_api_transaction table but it was not working.

  3. Could you please advice following:
    1. by approval through AME, we could be able to send notifications.
    2. What are the steps to send notifications through AME.

  4. Currently for Leave approval, i am using the existing work flow. I am able to initiate the work flow successfully.
    The following are the steps followed in the application –
    1. Get Next Approver from the AME parallel process API
    2. Call AME Parallel Process – Update approval process API.
    I am not getting any exceptions during the call. I can see the records in the AME history tables. But the record is not getting deleted from hr_api_transaction tables nor the records are not available in the wf_notifications table.
    Not able to figure out what went wrong.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s