Search 800 + Posts

Jul 20, 2011

How to design Approval Workflow based on Approval List generated in Oracle Approval Management (AME).

How to design Approval Workflow based on Approval List generated in Oracle Approval Management (AME).

Recently I was working on requirement to design custom approval workflow  based approval list generated by Oracle Approval Management (AME) module.

Approval List was based on 
1. Job level 
2. Approval Group
3. post-chain-of-authority approvals

To fulfill the requirement, I have designed a workflow Approval Sub-process to send notification to the approvers, generated by Oracle Approval Management (AME) module and then plug that sub-process in the existing customer’s workflow process.

Below is sample workflow to implement AME (Oracle Approval Management) based approval list 

1.Please make sure that you have required setup in approval management before you start working on your workflow (please refer my previous post on how to do the setup).Make sure that AME is integrated with calling Application ( application where you have your workflow).
2.Design your workflow Process and call AME APIs 
There are many other APIS available to generate approval list , above 2 works well for me , you can pick any of those based on your requirement.

In my Workflow I have activity

·         Start – to start the workflow.

·         Initial Approval – this activity will determine if approval is required or not .If it is required it then it call api Ame_Api2.Getnextapprovers1 to get the approval list from AME based on our setup and send the Approval Notification to the First approver in the list by calling Notify approver.

·         Notify Approver - if approver approve the Notification , this process send a FYI type of notification to the Requestor and execute the next activity ‘Get Next Approval’.

·         Get Next Approval  - this activity on execution first  update the status of the Approver (whom we send the notification) by mean of API  AME_API.updateApprovalStatus2 (please note that this status will be updated in the AME and not in your calling applications) and then call Ame_Api2.Getnextapprovers1 to get the next approver .If Ame_Api2.Getnextapprovers1 return any further approver , then as shown in workflow  we loop back to notification activity and perform same action , but in case there are no more approver , execute the End activity  and complete the sub process.


  1. I wrote a pl/sql block and am calling the Ame_Api2.Getnextapprovers1. I get a no data found error.. and am unable to debug it..
    Do you see anything wrong with this? Your help will be greatly appreciated. I'm try to do exactly what you've done but haven't hit scucess yet..

    x_nextapproversout ame_util.approverstable2;
    x_itemindexesout ame_util.idlist;
    x_itemclassesout ame_util.stringlist;
    x_itemidsout ame_util.stringlist;
    x_itemsourcesout ame_util.longstringlist;
    x_approvalprocesscompleteynout varchar2(100);
    Ame_Api2.getnextapprovers1( applicationidin => 201
    ,transactiontypein => 'PURCHASE_REQ'
    ,transactionidin => 1906001
    ,flagapproversasnotifiedin => ame_util.booleantrue
    ,approvalprocesscompleteynout => x_approvalprocesscompleteynout
    ,nextapproversout => x_nextapproversout
    ,itemindexesout => x_itemindexesout
    ,itemclassesout => x_itemclassesout
    ,itemidsout => x_itemidsout
    ,itemsourcesout => x_itemsourcesout
    dbms_output.put_line('x_nextapproversout(1).name: '||x_nextapproversout(1).NAME);

  2. Did you setup
    Rules etc for your Application or Transaction

  3. Will get back to you with Sample code

  4. Hi, Please also put the code here so its easy to understand the technical side.

  5. I am not sure if I have complete source code , I need to look into archives.But I can put code related to API to GET_APPROVER and GET NEXT APPROVER if you want.


  6. I am also stuck here. The no data found is because of transactionid, how do you correctly pass a transactionid. I am calling the AME from a custom module. I can successfully test the AME from the AME test screen. The problem I see is that somewhere we have to initialize the ame_api by passing mandatory attributes, transactionid and personid of the requestor. Was anyone able to solve this.

  7. Hi Could you please post the code here.

  8. i am getting no data found exception too

  9. Can you please validate if you have correct setup in AME for your Transaction Type.

  10. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle AME , kindly contact us Offer World Class Virtual Instructor led training on Oracle AME . We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023