Custom Workflow Using Oracle Approvals Manager(AME)

In most of Oracle standard workflows Oracle Approvals Manager(AME) is used to define approvers. At one of my projects, there was so many workflows that approvers of workflow could be changed. So, my functional consultant advised me to use AME for defining approval groups and rules on which user to send the notification.

I developed a custom method for my workflows that look fine at last.

Here we can see firstly we set the startup values and the first step approvals at set_startup_values.  I got a variable as current_notif_done which i keep for mentioning whether next approver exists or not.

If you are careful enough you can see i make a loop at approval_ntf. Here workflow loops at approval_ntf each time next approval exists. When there is no next approver i set current_notif_done attribute1 to break the loop.

I also make two more loops which does not need approval(FYI notifications at approval and reject).

I settled this structure in two main steps.

1- Getting approvers for current step

Here i use this code for asking AME which approver is the next

ame_api2.getNextApprovers4(applicationIdIn=>your_ame_setups_application_id,
transactionTypeIn=>your_ame_setups_transaction_type,
transactionIdIn=>your_ame_setups_transaction_id,–generally itemkey
flagApproversAsNotifiedIn => ame_util.booleanFalse,
approvalProcessCompleteYNOut => l_complete,–mentions if approval is complete
nextApproversOut=>l_next_approvers);–next approval table for current step

2- Telling approval status to AME

ame_api2.updateApprovalStatus2(applicationIdIn => your_ame_setups_application_id,
transactionIdIn => your_ame_setups_transaction_id,–generally itemkey
approvalStatusIn => AME_UTIL.approvedStatus,–approved_status_or_rejected_status
approverNameIn => approver_or_rejecters_user_name,
transactionTypeIn => your_ame_setups_transaction_type);

 

There are some more keypoints about this. First of all, this generic workflow can be implemented for any needs. So, creating a new workflow time would decrease so much by the help of this generic workflow.

Two AME transaction type is needed to implement both approval and FYI at AME. Because, if it is not done like this FYI notifications could not be sent.

Advertisement

6 Responses to Custom Workflow Using Oracle Approvals Manager(AME)

  1. Tushar Kumar says:

    Hello –
    Thanks for the post. I have to build a similar setup for my client, and I was looking for solutions. I guess what you have done is quite similar to what I am looking for. Can you please post a clearer image of the workflow diagram or maybe email me the same?

    Also, I would appreciate if you can send across your code for the calls to the AME APIs.

    Thanks
    Tushar

  2. Dakshesh says:

    Hi,
    i have made custom workflow and new transaction type for that workflow , but i am not able to integrate them and also i ma not able to find newly generated transaction_id in hr_api_transaction table.

    Regards,
    Dakshesh patel

  3. Engin ÖZER says:

    If you send me an email. There was an explination that i sent to someone else before. I will forward it to you.

  4. Zulfiqar Ali Mughal says:

    Hello,

    It was very informative post. I would be very thankful if you can help me in my area of concern. I have two scenarios where I have to create workflows for approvals:

    1. I have created workflow hierarchy using rules and attributes in AME for the approval of Work Order in Oracle EAM. My scenario is I want to send notification as a FYI to a person after the approval is done. How I can do that?

    2. I have created custom workflows using Oracle Workflow Builder for Shipping Transaction in Order Management, the workflow is working for approval but when I reject the workflow, I am unable to resend the document for approval.

    I would be very thankful if you can please help me with this.

    Regards,
    Zulfiqar Ali Mughal

  5. Ravi kumar says:

    Can we get source code file and documentation for this workflow
    Ravi
    ravik904@yahoo.com

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.