59.8 GET_VARIABLE_VALUE Function

This function gets the string value of a workflow variable.

If the workflow variable has a format mask set, the same format mask is applied to the value being returned.

If the workflow variable is of CLOB data type and the data length is greater than the VARCHAR2 max length then an exception is thrown if p_raise is set to TRUE.

Syntax

APEX_WORKFLOW.GET_VARIABLE_VALUE (
    p_instance_id            IN NUMBER,
    p_variable_static_id     IN VARCHAR2,
    p_raise                  IN BOOLEAN DEFAULT FALSE )
RETURN VARCHAR2;

Parameters

Parameter Description
p_instance_id ID of the Workflow.
p_variable_static_id Static ID of the variable.
p_raise Default FALSE. If TRUE, raises an exception if CLOB data exceeds max length of VARCHAR2.

Returns

VARCHAR2.

Example

The following example returns the value of Workflow Variable called "NEW_SALARY."

BEGIN
    apex_workflow.get_variable_value(
           p_instance_id => 1234,
           p_variable_static_id => 'NEW_SALARY');
END;