Blog

Approval workflows in Oracle APEX

How to model multi-step approvals in Oracle APEX so the history is auditable and a rejected request cannot be edited into an approval.

·
Oracle APEXWorkflowPL/SQL

APEX is a strong place for approvals that do not belong in Oracle Workflow inside EBS: material requests, vendor onboarding outside purchasing, petty cash, and access requests. The data model matters more than the page design.

Model state, do not infer it

Store the request and a separate action history. The request has one current status: draft, submitted, approved, rejected, cancelled. Each action row records who acted, when, the decision, and the comment.

Do not compute “approved” by checking whether the latest row happens to say so and the user is a manager. Write a package that is the only code allowed to change status. Pages call the package. The interactive grid does not update the status column directly.

Routing that matches the business

Keep the hierarchy in a table: role, amount band, department, or item category. Hard-coding approver usernames in a page process will be wrong the week someone changes jobs.

Rules that avoid arguments later:

  • The requester cannot approve their own request.
  • A rejection returns to draft or to a closed rejected state. It does not leave the row editable while status still says approved.
  • Skipping a step is an explicit action with a reason, not a deleted history row.
  • Delegation has a start and end date.

Notify by email with a link to the request, but treat the APEX page as the system of record. Mail is not an audit trail.

Hand-off to EBS

If approval creates a requisition, move order, or invoice, do that in the same database transaction as the final status change, or record a pending interface row and a job that finishes it. Showing “approved” when the EBS document was never created is how finance loses trust in the portal.

Checklist

  1. Status changes only through a package.
  2. History rows are insert-only.
  3. Approvers come from a maintained hierarchy.
  4. Self-approval is blocked.
  5. The EBS document number is stored on the request after creation.

Replacing email approvals with something you can audit? Contact Solution Markaz.

← Back to blog