Oracle Apex workflows and automations help organizations streamline their processes, improve collaboration, increase efficiency, and reduce costs, all while ensuring compliance and better decision-making.

To review the built-in features that Oracle Apex provides, go to the Shared Components page of any Apex application

You will see two links under the Workflows and Automations section for Task Definitions and Automations.

In this article we will be diving into the functionality available in Oracle Apex Task Definitions.  In our example, we are using the latest version Apex 23.1 (not yet ready for production release at this time).

Task Definitions

Task Definitions are used to define and manage tasks within a workflow. They provide ways to describe what needs to be done in a specific task, who is responsible for completing the task, and when it needs to be completed.

Common uses of Oracle Apex Task Definitions can include:

  1. Creating workflows: Task Definitions provide a way to define the tasks that need to be completed in a workflow. By specifying the task type, due date, and responsible party, workflows can be created and managed more easily.
  2. Assigning tasks: Once a workflow is created, Task Definitions can be used to assign tasks to specific individuals or groups. This ensures that everyone knows what they need to do and when they need to do it.
  3. Monitoring progress: Task Definitions provide a way to monitor the progress of a workflow. This allows organizations to track which tasks have been completed and which are still outstanding.
  4. Reporting: Task Definitions can be used to generate reports on the status of workflows and individual tasks. This can help organizations identify areas for improvement and ensure that everything is running smoothly.

Let’s use the Oracle Sample Approvals application as a foundation and create a new Task Definition for requesting a work phone, something many employees wish they had, and many others wish they could give back!  

After importing the Sample Approvals application, navigate within APEX to the Shared Components page and select the Task Definitions link. Then click Create, to start our example.

After the Task Definition has been created, the next step is to create Participants to assign additional owners of the task and Parameters for the task. Task Definition Participants define the participants of a human task who can act on the task. 

The two participant types are either Potential Owner, or Business Administrator.  

  • Potential Owner is responsible for completing specific tasks assigned to them within a workflow, either as an administrator or end user.
  • The Business Administrator is responsible for managing the overall application and ensuring that tasks are assigned appropriately.

The Participant Value type can be one of the following options:

  • Static
  • SQL Query
  • Function Body
  • Expression

Participants will also be either named or role-based.

  1. Named participants: A named participant is a specific individual who is assigned to complete a task within a workflow. The named participant is usually specified by their username.
  2. Role-based participants: A role-based participant is a group of users who are assigned to complete a task within a workflow based on their role or responsibility within the organization. This can include roles such as manager, team lead, or executive, for example.

Task Definition Deadlines

After creating the task participants, a deadline can optionally be defined for the task.  Here are the options:

Overall, these deadline options in APEX provide flexibility in defining Task deadlines that can be customized to fit the specific needs of a workflow process.

Task Details Page

After creating the participants, a Task Details page is defined to display information related to a specific task within a workflow. It provides a centralized location for viewing and managing details such as task status, due date, priority, and assignee.

Some of the common uses of the Oracle Apex Task Details page include:

  1. Task management: provides a way to manage individual tasks within a workflow. This includes updating task status, adding comments, and assigning or reassigning the task to another user.
  2. Communication: used to communicate information related to a task to other team members. This includes adding comments, attachments, or links to related documents or resources.
  3. Tracking: provides a way to track progress on a specific task. This includes viewing the task status, due date, and any associated comments or updates.
  4. Workflow management: used to manage the overall workflow. This includes viewing the status of all tasks within the workflow, adding or removing tasks, and updating the workflow due date.

In our case, we are reusing a details page defined for other tasks.  

Adding Actions to the Task Definition

Actions are created and used to automate various tasks within a workflow. These actions are triggered by events such as task creation, completion, or reassignment. There are several types of Task Definition actions that can be created, including:

  1. PL/SQL actions: PL/SQL actions allow custom PL/SQL code to be executed as part of a Task Definition action. This can be used to perform custom data validation, execute database operations, or integrate with external systems.
  2. Email actions: Email actions can be used to send automated emails to task assignees, stakeholders, or other interested parties. These emails can include task details, attachments, or links to related resources.
  3. Assignee actions: Assignee actions are triggered when a task is assigned to a new user or when a task is reassigned to a different user. These actions can be used to automatically update task status, due dates, or other related data.
  4. Approval actions: Approval actions can be used to require approval from a designated approver before a task can be completed. This can be useful for tasks that require review or sign-off from a supervisor or manager.

To create an action for your task, click on Add Action

In our example, we are creating actions to 

  1. Send a reminder email to the Approver to approve the work phone.
  2. Push the Apex email queue to send the email.
  3. Update the work phone request status

There are several “On Event” options available for Apex Task Actions, including:

  1. Claim: Triggered when an unclaimed task is claimed by an owner. Once the task is claimed by a user, the Task transitions to Assigned state, and the actual owner of the task is set to the user who claimed the task.
  2. Complete: This option triggers the Task Definition action when a task is marked as completed.
  3. Delegate: This option triggers the Task Definition action when a task is delegated to another user.
  4. Update Comment: This action fires when an owner or business administrator of a Task adds comments to a Task. These provide additional information about a Task. 
  5. Update Priority: This option triggers an action when the priority of a task is changed.
  6. Release: This trigger fires an action when the current owner releases an Assigned task and sets the task to Unassigned state.
  7. Cancel: This option triggers the Task Definition action when a task is canceled or deleted.
  8. Create: This trigger fires the action when the task is created.
  9. Request Information:  Fired when a request for more information is requested. The owner of a task can request additional information regarding a Task from the initiator. The task then moves to the Information Requested state and can be acted on by the owner only after the initiator submits the requested information.
  10. Submit Information: This trigger is fired when the task initiator responds with additional information regarding a Task for which information has been requested. For example, an employee may need to provide information on a specific model of work phone or phone carrier in their area.
  11. Before Expire: Trigger fired before a task is about to expire in order to keep the task progressing forward.
  12. Expire:  This trigger is fired when a task has expired. It could be used to cancel the task or reassign it to the initiator or business administrator.

Advantages of Oracle Apex built-in Workflow Tasks

There are several advantages to using Oracle Apex built-in workflow tasks, including:

  1. Easy implementation: Oracle APEX provides a set of pre-built workflow task APIs that can be easily customized and integrated into your application.
  2. Reduced development time: By leveraging built-in Oracle APEX features, developers can significantly reduce the time and effort required to build custom workflows from scratch.
  3. Improved productivity: Using built-in workflow tasks allows users to focus on their core business processes rather than spending time on workflow development.
  4. Consistent user experience: Oracle Apex provides a consistent user experience across all workflow tasks, which can help improve user adoption and reduce training time.
  5. Integration with other Oracle products: Oracle Apex built-in workflow tasks can be seamlessly integrated with other Oracle products such as Oracle Database, Oracle Business Intelligence, and Oracle Integration Cloud.
  6. Flexibility: Oracle Apex workflow tasks can be easily customized to fit the specific needs of your organization, allowing you to create workflows that align with your business processes and goals.

Overall, using Oracle Apex built-in workflow tasks can help organizations streamline their business processes, reduce development time, and improve productivity while providing a consistent and flexible user experience.

In a future article, we will continue exploring the benefits of Oracle APEX by looking into the features available in Oracle APEX Automations.