Administering Flows for APEX
Configure an APEX Human Task
APEX provides an APEX Human Task which can be used as an Approval Task or a Action Task to run as a standalone task or as part of an APEX Workflow or a Flows for APEX workflow. APEX Human Tasks provide a quick, simple, and visually attractive way to generate a task details page that can be used to implement the task. APEX also manages these tasks, and provides several task services, including task assignment, scheduling, notes, requests for further information, and task history logging.
This section covers how to configure an APEX Human Task (previously called APEX Approval Tasks and APEX Action Tasks) as a BPMN User Task.
To use an APEX Human Task as a BPMN User Task, you need to:
- create and configure the APEX Human Task
- create and configure the BPMN User Task in your process diagram.
Pre-Requisites
If not already installed, install the Flows for APEX - Return APEX Human Task State and Outcome
process plugin into your application. This can be copied or subscribed from the Flows for APEX application, individually or as part of a Flows for APEX Component Group โ installation from a separate file is no longer required. For earlier releases, see Instructions.
Note that this is a new plugin in Flows for APEX 25.1. The older plugin, Flow for APEX Return to Flows Process
plugin was used in Flows for APEX 22.1 to 24.1, and is now deprecated. The old plugin only returned task outcome from an approval task. It is still supported but will be removed after 2026. Migration to the new plugin is straightforward
Create and Configure an APEX Human Task (APEX Approval or APEX Action Task) for Flows for APEX
Task Parameters:
-
Add task parameters
PROCESS_ID
,SUBFLOW_ID
andSTEP_KEY
to hold the Flows for APEX task identity. These will be set when the APEX task is created, and used when the task returns state or outcome to the Flows for APEX engine. -
Add any other task parameters required for your application.
Participants / Task Assignment:
Task assignment can be defined either locally in the APEX task definition, or from the Flows for APEX workflow.
To use task assignment from the Flows for APEX workflow, you must define assignment rules in the APEX task that get the potential users and potential business administrators from the Flows for APEX engine. Do this as follows:
- Set the Potential Owners
flow_api_pkg.get_task_potential_owners( p_process_ID => :PROCESS_ID, p_subflow_id => :SUBFLOW_ID, p_step_key => :STEP_KEY)
- Set the Business Administrator
flow_api_pkg.get_task_business_admins( p_process_ID => :PROCESS_ID, p_subflow_id => :SUBFLOW_ID, p_step_key => :STEP_KEY)
Your Participants section of your APEX task definition should now look like this:
Task Actions:
As a minimum, you should define a Task Action on the Complete Event. If this is an Approval, it will return the Approval Outcome (APPROVED
or REJECTED
) to Flows for APEX, and move the workflow forwards. You should also return the task state on other events that cause the APEX task to finish executing - these are from task cancelation, task expiry (if you have defined expiration rules in the task), and on task error (not possibkle until > APEX 24.2).
Defining and configuring the Task Actions is simple, using the Flows for APEX - Return APEX Human Task State and Outcome
process plugin.
- In the APEX Task Definition, click Add Action.
- Name your Task Action (e.g., โReturn Outcome to Flowsโ ).
- Type: Selectthe
Flows for APEX - Return APEX Human Task State and Outcome [Plug-in]
from the pull down list. - On Event. Set this to the required action (
Complete
,Expire
,Cancel
,Error
* ) * not yet available - Action Settings. Set to match your task parameters containing
PROCESS_ID
,SUBFLOW_ID
, andSTEP_KEY
). - Click
Create
Note: If you are using APEX < v24.2.6, the plugin will not work properly on the Expire action due to an APEX bug - see GitHub issue 812 for instructions on how to work around this problem using custom PL/SQL in place of the plugin. This only applies to On Expire.
Create and Configure your BPMN User Task in Flows for APEX
Add a user task into your BPMN diagram by adding a task ( the symbol). Then, using the spanner tool , convert the task to a User Task ( ).
Name. On the Modeler properties panel, in the General section , give your task a descriptive name.
ID. By default, this generates a random name like โโActivity_0d5gtyhโ. You can change this to something more descriptive, but it should be short and not contain any spaces.
Task Type. Select APEX Human Task
and open the APEX Human Task section.
Use APEX Meta Data The Modeler can make use of APEX metadata already stored in the database about your application and its tasks. You can toggle the Use APEX metadata
switch on or off as you configure the task link.
APEX Human Task
These settings control the APEX Approval Task that is called, the Task Parameters that are set and their values, and the Flows for APEX process variable to return the task outcome into.
Use APEX meta data The Modeler can make use of APEX metadata already stored in the database about your application and its defined tasks. You can toggle the Use APEX metadata
switch on or off as you configure the task.
Application If you are using APEX meta data, pick the application containing the Task Definition from the pull down menu. If you are using manual input, specify the Application ID.
Task Definition If you are using APEX Meta data, select the Task Definition from the pull down menu. If you are using manual entry, enter the taskโs static ID.
Subject Specifying this overwrites the task subject specified in the APEX task definition. If specified in Flows for APEX, the subject can contain both Flows for APEX iprocess variables (using the &F4A$var_name.
syntax), as well as APEX Task parameters (using the ¶meter.
syntax).
Business Reference This can be used to pass the primary key of the subject record from Flows for APEX to the APEX Task Primary Key. In Flows for APEX, the subject primary key is normally kept in the BUSINESS_REF process variable to link a process instance to its systems of record. In APEX Tasks, this becomes the APEX$TaskPK
.
Parameters. This is where you specify the parameters to be passed into the APEX Task. These should include the Flows for APEX state parameters PROCESS_ID
, SUBFLOW_ID
, and STEP_KEY
. In addition, you should pass any other parameters required for your application.
Short Cut: If you click on the green Load Parameters
button, Flows for APEX will get load all the required parameter names and definitions from the APEX task definition; you then need to map these to Flows for APEX process variables. The parameter list should include PROCESS_ID
, SUBFLOW_ID
, and STEP_KEY
.
Result Variable Specify the Flows for APEX Process Variable that the task outcome will be returned into. This is required for an APEX Approval Task; an Action Task returns no outcome. For an Approval Task, the contents will be โAPPROVEDโ or โREJECTEDโ after task completion.
Variable Expressions
A UserTask can have variable expressions that execute before the task starts and after the task completes.
Task Assignment
Task assignment (participants) can be defined locally in the task or can be managed in Flows for APEX and used by the APEX Human Task to set Potential Owners and Business Administrators.
To set potential owners and business administrators from the workflow, define the required users in the Task Assignment section (and define the Participants section of the APEX Task Definition to request them from Flows using the flow_api_pkg.get_task_potential_owners
and flow_api_pkg.get_task_business_admins
function calls - see Configuring your APEX Task above.)
Scheduling
This controls the settings for task due date and task priority. These control how items appear in the Task List - list sorting, markings as high priority, overdue, etc.
Task Priority
. Task Priority can be set from a static definition, process variable, query, expression or function body.
In both Flows for APEX and APEX, priority is a number from 1 (Highest) to 5 (lowest).
- The process variable
PROCESS_PRIORITY
is available. Using this would cause the user task to run at the priority given to the process instance. - Advanced use cases might run a complex PL/SQL expression to determine if the instance is likely to complete on schedule, and if not, assign higher priority to outstanding tasks so that the overall process completes on schedule!
Due On
. Task Due Date can be set from a static definition, process variable, an Oracle DBMS Scheduler expression, query, expression or function body.
- If you use a DBMS Scheduler expression, the due date will be defined as the next time the scheduler expression would occur. (repeating dates will always resolve to just the next occurrence).
APEX Task ID
In previous versions (prior to Flows for APEX 24.1), the APEX Task ID would be stored in Flows for APEX in a process variable named