I need to update a Workflow Variable from my Task. However, when I run an Action from my Task to update the Workflow Variable, I get an error indicating that Workflow Variables can only be updated by Business Administrators. The action appears to be running by “nobody” instead of a specific user. I have added both my user (who is the Potential Owner / Task Owner) as well as “nobody”, but the action still errors with the same message.
Here is my PL/SQL in the action is of type Execute Code on event On Create:
apex_workflow.update_variables(
p_instance_id => :APEX$WORKFLOW_ID,
p_changed_params => apex_workflow.t_workflow_parameters(
1 => apex_workflow.t_workflow_parameter(static_id => 'LRA_WORKFLOWID', string_value => :APEX$WORKFLOW_ID)));
Here is the error in Debug:
Exception in "begin apex_workflow.update_variables(
p_instance_id => :APEX$WORKFLOW_ID,
p_changed_params => apex_workflow.t_workflow_parameters(
1 => apex_workflow.t_workflow_parameter(static_id => 'LRA_WORKFLOWID', string_value => :APEX$WORKFLOW_ID)));
end;":
Error Stack: ORA-20987: APEX - Variables of Workflow 6962951866682401 can only be updated by a Business Administrator defined for the workflow - Contact your application administrator.
ORA-06512: at "APEX_230200.WWV_FLOW_ERROR", line 1111
ORA-06512: at "APEX_230200.WWV_FLOW_ERROR", line 1569
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5878
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5898
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW_API", line 141
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_SYS_SQL", line 2120
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_230200", line 810
Backtrace: ORA-06512: at "APEX_230200.WWV_FLOW_ERROR", line 1111
ORA-06512: at "APEX_230200.WWV_FLOW_ERROR", line 1569
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5878
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5898
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW_API", line 141
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_SYS_SQL", line 2120
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_230200", line 810
ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2607
ORA-06512: at "APEX_230200.WWV_FLOW_ERROR", line 1111
ORA-06512: at "APEX_230200.WWV_FLOW_ERROR", line 1569
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5878
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5898
ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW_API", line 141
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_SYS_SQL", line 2120
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_230200", line 810
ORA-06512: at "APEX_230200.WWV_FLOW_DYNAMIC_EXEC", line 2607
Screenshot of Debug viewer showing the User as nobody for the identifier 8033 listed above

Thank you