6.20 IS_OF_PARTICIPANT_TYPE Function

This function checks whether the given user is of a certain participant type for a Task.

Syntax

APEX_APPROVAL.IS_OF_PARTICIPANT_TYPE (
    p_task_id                IN NUMBER,
    p_participant_type       IN t_task_participant_type
                                DEFAULT c_task_potential_owner,
    p_user                   IN VARCHAR2
                                DEFAULT wwv_flow_security.g_user)
RETURN BOOLEAN;

Parameters

Table 6-18 IS_OF_PARTICIPANT_TYPE Parameters

Parameter Description
p_task_id The Task ID.
p_participant_type The participant type. Can be set to POTENTIAL_OWNER (default) or BUSINESS_ADMIN.
p_user The user to check for. Default is logged-in user.

Returns

TRUE if the user given by p_user is a participant of given participant type for a given task, FALSE otherwise.

Example

DECLARE
    l_is_potential_owner boolean;
BEGIN
    l_is_potential_owner := apex_approval.is_of_participant_type(
        p_task_id          => 1234,
        p_participant_type => apex_approval.c_task_potential_owner,
        p_user             => 'STIGER'
    );
    IF l_is_potential_owner THEN
        dbms_output.put_line('STIGER is a potential owner for task 1234');
    END IF;
END;