55.11 IS_OF_PARTICIPANT_TYPE Function

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

Syntax

APEX_WORKFLOW.IS_OF_PARTICIPANT_TYPE (
    p_instance_id            IN NUMBER,
    p_participant_type       IN t_workflow_participant_type,
    p_user                   IN VARCHAR2 )
RETURN BOOLEAN;

Parameters

Parameter Description
p_instance_id The Workflow ID.
p_participant_type The participant type.
p_user The user to check for.

Returns

TRUE if the user given by p_user is a participant of given participant type for a given workflow. Otherwise FALSE.

Example

The following example demonstrates

DECLARE
    l_is_owner boolean;
BEGIN
    l_is_owner := apex_workflow.is_of_participant_type(
        p_instance_id      => 1234,
        p_participant_type => apex_workflow.c_workflow_owner,
        p_user             => 'STIGER'
    );
    IF l_is_owner THEN
        dbms_output.put_line('STIGER is an owner for workflow 1234');
    END IF;
END;