GET_WORKFLOWS Function

This function gets the workflows of a user depending on the given context. Context can be MY_WORKFLOWS, ADMIN_WORKFLOWS, or SINGLE_WORKFLOW.

Note: The function only returns data in the context of a valid Oracle APEX session. It returns no data in SQL Workshop.

Syntax

APEX_WORKFLOW.GET_WORKFLOWS (
    p_context            IN VARCHAR2 DEFAULT
                                   apex_workflow_api.c_context_my_workflows,
    p_user               IN VARCHAR2 DEFAULT apex_security.g_user,
    p_workflow_id        IN NUMBER   DEFAULT NULL,
    p_application_id     IN NUMBER   DEFAULT NULL )
RETURN apex_t_workflow_instances pipelined;

Parameters

Parameter Description
p_context The list context. Default is MY_WORKFLOWS.
p_user The user to check for. Default is logged-in user. Needs p_context set to MY_WORKFLOWS, ADMIN_WORKFLOWSor INITIATED_BY_ME.
p_workflow_id Filter for a workflow ID instead of a user. Default is NULL. Needs p_context set to SINGLE_WORKFLOW.
p_application_id Filter for an application. Default is NULL (all applications).

Returns

A table of workflows (type apex_t_workflow_instances) containing the following columns:

Example

select *
  from table ( apex_workflow.get_workflows (
                   p_context => 'MY_WORKFLOWS' ) )