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 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:
- 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.
- 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.
- 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.
- 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:
- SQL Query
- Function Body
Participants will also be either named or role-based.
- 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.
- 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:
- 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.
- 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.
- 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.
- 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:
- 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.
- 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.
- 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.
- 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
- Send a reminder email to the Approver to approve the work phone.
- Push the Apex email queue to send the email.
- Update the work phone request status
There are several “On Event” options available for Apex Task Actions, including:
- 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.
- Complete: This option triggers the Task Definition action when a task is marked as completed.
- Delegate: This option triggers the Task Definition action when a task is delegated to another user.
- 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.
- Update Priority: This option triggers an action when the priority of a task is changed.
- Release: This trigger fires an action when the current owner releases an Assigned task and sets the task to Unassigned state.
- Cancel: This option triggers the Task Definition action when a task is canceled or deleted.
- Create: This trigger fires the action when the task is created.
- 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.
- 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.
- Before Expire: Trigger fired before a task is about to expire in order to keep the task progressing forward.
- 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:
- Easy implementation: Oracle APEX provides a set of pre-built workflow task APIs that can be easily customized and integrated into your application.
- 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.
- Improved productivity: Using built-in workflow tasks allows users to focus on their core business processes rather than spending time on workflow development.
- Consistent user experience: Oracle Apex provides a consistent user experience across all workflow tasks, which can help improve user adoption and reduce training time.
- 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.
- 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.