📑

Creating Leave Approval Workflow in Oracle Apex

Apr 10, 2025

Workflow and Task Definition in Oracle Apex 23.2

Overview

  • Purpose: Create a sample leave approval application to demonstrate workflow functionalities.
  • Steps covered:
    1. Task definition creation
    2. Workflow definition
    3. Workflow console page creation
    4. Unified task list page creation
    5. Leave application page creation
    6. Leave approval page creation

Steps to Create Leave Approval Application

1. Task Definition

  • Create Approval Task:
    • Define task name, subject with substitution variable empore_name.
    • Assign potential owner and participants.
    • Use static value as approver.
    • Add task parameters: ID and empore_name.
    • Define task detail page number for completion.

2. Define Workflow

  • Create Workflow:
    • Name: Leave Request Workflow.
    • Title uses substitution parameter empore_name.
    • Define parameters: ID and empore_name.
    • First activity: Leave application submission initiated by the user.
    • Send email upon leave application (use default email settings or workflow parameters).
    • Create activity variable for approver name (use static value or SQL query).
    • Send push notification to manager.
    • Create human task activity post-push notification.
    • Add switch activity for decision-making (check leave approval status).
    • Define connections and activities for approval and cancellation emails.
    • Ensure all activities are connected to the workflow end.

Page Creation

3. Workflow Console Page

  • A dashboard to view all workflow statuses.
  • Modify to view workflows of the specific application.

4. Unified Task List Page

  • An inbox for pending tasks with the logged-in user.

5. Leave Application Page

  • Form based on the leave_detail table.
  • Set default values and create button settings.
  • Start workflow process upon form submission.

6. Leave Approval Page

  • Form for leave approval as a modal dialog.
  • Process to mark tasks as complete.
  • Computation to fetch leave details based on workflow parameters.

Testing and Execution

  • Create users for testing: approver and applicant.
  • Approver can view and approve pending leaves.
  • Workflow console allows approver to see all workflows.
  • Corrected parameter name for email notifications.

Push Notifications

  • Enable in application definition.
  • Configure settings for Progressive Web App.
  • Create new settings page for enabling/disabling push notifications.

Conclusion

  • The video covers detailed steps to create a workflow-based leave approval system in Oracle Apex 23.2.
  • Subscribe for more tutorials and updates.

Feel free to expand upon any section as needed for deeper understanding or more details.