
Mastering Workflows in Oracle APEX: Part I
Discover how to create, configure, and manage workflows in Oracle APEX to automate your business processes. At Grixxo, we show you how to leverage parameters, activities, and roles to transform efficiency in your projects.
7 minutes read
Table of Contents
- Introduction
- Create a Workflow in Your Workspace in Oracle APEX
- 2.1. Workflow Versions
- Parameters
- Activities
- 4.1. Activity Variables in APEX Workflows
- 4.2. Options for Creating Activities in a Workflow
- 4.2.1. Connection Rules Between Activities
- 4.3. Roles in Workflows and Tasks in Oracle APEX
- 4.4. Workflow Views in Oracle APEX
- 4.4.1. Workflow Metadata Views
- 4.4.2. Workflow Runtime Views
- Conclusion
1. Introduction
A workflow is the way tasks are organized and executed within a process.
It allows you to automate activities and visualize their progress in real time.
In this blog, we will explore its importance and functionality.
2. Create a Workflow in Your Workspace in Oracle APEX
This guide is a continuation of Automation in Oracle APEX v24 - Part I, so we will use the Blog - Task Automation application. Once inside the application, access Shared Components and select Automations.


After clicking on Workflow, select Create to start the creation of a new workflow.

After creating our workflow, we must assign an identifier in the Name and Title fields. In our case, it is Blog - WorkFlow.
2.1 Workflow Versions
A workflow version can be in three states: In Development, Active, or Inactive.
- In Development: It is editable and can only be executed in the developer’s session. Only one version can be in development.
- Active: It is partially editable and only one active version is allowed. It cannot revert back to development.
- Inactive: It cannot be used for new instances, but running instances continue until completion. Inactive versions can be deleted or duplicated.
When a workflow is created, it starts as In Development.
When it is moved to Active, the previous active version becomes Inactive.

Section | Description |
---|---|
Identification | Workflow version: Defines the name of the specific workflow version. In this case, it is called Blog-WorkFlow. It is important for differentiating between different versions. |
Settings | State: Defines the current state of the workflow version. - In Development: Editable, only executable in development. - Active: Executable in production, but cannot revert to development. - Inactive: Not active, does not initiate new workflows, but inactive versions can be deleted or duplicated. |
Additional Data | Type: Defines how to obtain additional data for evaluating variables and conditions. - Table / View: Uses a table or view in the database. - SQL Query: Obtains data through a custom SQL query. |
Advance | Debug Level: Defines the workflow’s debug level. - Info: Default level, without specific details. - Warning: Logs warnings without interrupting the flow. - Error: Logs critical errors that halt the process. - Trace: Most detailed level, logs functions and procedures. |
Comments | Comments: Allows adding notes visible only in the App Builder. Useful for documenting the workflow. |
3. Parameters
It is important to note that a workflow can have several parameters of different data types.
These can be defined within the workflow by right-clicking on the workflow.

When creating a parameter, the available attributes for the parameter will appear on the left.

Parameter | Description |
---|---|
Identification | Indicates whether the parameter must always be provided when executing the workflow. If required, it must be present for the workflow to function correctly. |
Label | The user-friendly name that will be displayed to identify the parameter in the interface. It should be easy to understand for end users. |
Additional Information | Type: Field to add additional information about the parameter, such as its purpose or instructions. Supported Substitutions: Dynamic substitutions can be used within the parameter, such as application values, page items, or system variables. |
Parameter | Data Type: Defines the expected data type. Options include:- VARCHAR2 : Text string- TIMESTAMP : Timestamp- NUMBER : Number- BOOLEAN : True/false value- CLOB : Large text Direction: How the parameter is used in the workflow:- In: Passed into the workflow.- Out: Only comes out of the workflow.- In/Out: Passed into the workflow and also retrieved.Value: The value assigned to the parameter, which can be dynamic or static. |
Default Value | The default value that will be used if no other value is provided when executing the workflow. It prevents errors if the parameter is not explicitly set. |
Additional Information | Type: Text field to enter additional information about the parameter. Supported Substitutions: Dynamic application values, page items, and system variables can be used within the parameter, providing flexibility. |
4. Activities
Workflows can have several activities, such as sending an email or a task definition. Below we present the available activities:
Activity | Description |
---|---|
Workflow Start | The initial activity that starts the workflow. It is placed at the beginning of the process and cannot be preceded by any other activity. |
Workflow End | Marks the end of a workflow or a branch of it. Once reached, the workflow terminates and no further activities are executed. |
Workflow Switch | Allows the definition of conditional branches within the workflow. Based on certain conditions, the flow can be redirected to different activities. |
Workflow Wait | Introduces a pause in the execution of the workflow. It can be configured to wait until a condition is met or a specified period of time has passed. |
Human Task | Creates a task that is assigned to a user for manual action. It is linked to a preexisting task definition in the system. |
Invoke API | Calls an external API to perform an action. |
Invoke Workflow | Executes another workflow within the same application, allowing the creation of complex flows that depend on previously defined workflows. |
Execute Code | Allows the execution of SQL or PL/SQL code directly within the workflow. It is used for specific operations or calculations during the execution of the workflow. |
Send Email | Sends an email as part of the workflow, useful for notifying users or systems about specific events. |
Send Push Notification | Sends a push notification to an associated application or mobile device. It is used to alert users in real time about actions or changes in the workflow. |
4.1. Activity Variables in APEX Workflows
Each activity in a workflow can handle Activity Variables, which are values associated with the activity and can be used to:
- Temporarily store information, such as the status of a task.
- Pass data between activities, such as the user assigned to a task.
- Determine conditions in a Workflow Switch, allowing the definition of which path to follow.
4.2. Options for Creating Activities in a Workflow
When designing a workflow, APEX allows you to add new activities at different positions within the diagram:
- Create Activity Below
- Allows adding a new activity after the selected activity.
- It is used to continue the normal flow of the process.
- It cannot be used on Workflow End, as this activity ends the flow.
- Create Activity After
- Similar to Below, but places the new activity as an independent step.
- Useful when an activity may branch into two different paths.
- Create Connection
- Allows connecting activities to define the execution order.
- Cannot be connected to Workflow End, as this activity does not allow subsequent connections.
4.2.1 Connection Rules Between Activities
From → To | Is it possible? | Notes |
---|---|---|
Workflow Start → Another activity | ✅ Yes | The start activity always connects to another activity. |
Any Activity → Workflow End | ✅ Yes | Marks the end of the flow. |
Workflow End → Another activity | ❌ No | Cannot be connected after the End. |
Workflow Switch → Multiple activities | ✅ Yes | Conditional routes can be defined. |
Invoke Workflow → Another activity | ✅ Yes | Secondary workflows can be executed before continuing. |
Send Email → Another activity | ✅ Yes | After a notification, the flow can continue. |
Execute Code → Another activity | ✅ Yes | The flow continues after executing PL/SQL code. |
4.3. Roles in Workflows and Tasks in Oracle APEX
In Oracle APEX, roles in workflows determine what actions each user can perform within a workflow instance.
Main Roles:
- Workflow Owners
- They can start, end, and retry a workflow if an error occurs.
- Workflow Administrators
- They have advanced permissions to suspend, resume, and modify variables of a running workflow.
4.4. Workflow Views in Oracle APEX
Workflow views in Oracle APEX allow access to information about the definition, execution, and monitoring of workflows in the database.
They are divided into:
- Metadata Views: Contain information about the structure and configuration of workflows.
- Runtime Views: Provide data about the execution and current state of running workflows.
4.4.1 Workflow Metadata Views
View | Description |
---|---|
APEX_APPL_WORKFLOWS | Contains the definitions of workflows in the application, including the static workflow ID. |
APEX_APPL_WORKFLOW_VERSIONS | Stores the versions of each workflow definition, allowing for change management. |
APEX_APPL_WORKFLOW_ACTIVITIES | Saves the definition of activities within a workflow (e.g., human tasks, email sending). |
APEX_APPL_WORKFLOW_TRANSITIONS | Defines the transitions between activities within the workflow (how the steps are connected). |
APEX_APPL_WORKFLOW_BRANCHES | Contains the decision branches in switch-type activities, directing the flow according to conditions. |
APEX_APPL_WORKFLOW_VARIABLES | Stores the variables defined at the workflow level (e.g., statuses, dates, responsible parties). |
APEX_APPL_WORKFLOW_ACT_VARS | Saves the variables associated with specific activities within the workflow. |
APEX_APPL_WORKFLOW_PARAMS | Contains the definition of parameters used in workflows (e.g., dynamic values). |
APEX_APPL_WORKFLOW_PARTICIPANT | Defines the participants of the workflow (users or roles that can interact with it). |
APEX_APPL_WORKFLOW_COMP_PARAMS | Stores the component parameters used in the Page Designer to configure workflows. |
4.4.2 Workflow Runtime Views
These views store information about the execution and current state of the workflows in the application.
View | Description |
---|---|
APEX_WORKFLOWS | Contains the active workflow instances, with references to the flow definition. |
APEX_WORKFLOW_ACTIVITIES | Saves the instances of activities in execution, with references to their definitions. |
APEX_WORKFLOW_PARAMETERS | Shows the parameter values in execution, including data type and format. |
APEX_WORKFLOW_VARIABLES | Contains the values of variables used during the workflow execution. |
APEX_WORKFLOW_ACTIVITY_VARS | Stores the variable values within specific activities of the workflow. |
APEX_WORKFLOW_PARTICIPANTS | Shows the users or roles assigned to active tasks in running workflows. |
APEX_WORKFLOW_AUDIT | Records an audit history of workflows, including changes and transitions. |
5. Conclusion
In summary, Workflows in Oracle APEX allow us to automate and structure business processes, facilitating the management of workflows with:
- Human tasks, assigned to specific users.
- Conditional transitions through
Workflow Switch
, enabling dynamic paths. - Code execution, integrating business logic within the workflow.
This improves operational efficiency and the traceability of processes within the organization.