Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting Task Outcome For Workflow Plugin

Jacob HoferJan 13 2025 — edited Jan 13 2025

I am working with the workflow API to continue a workflow activity. The activity is defined from a workflow process plugin. I have a workflow variable with a static id of TASK_OUTCOME with data type of VARCHAR2. I want to set the value of this variable when I call APEX_WORKFLOW.CONTINUE_ACTIVITY. Below is the snippet I use to call:

v_activity_params('TASK_OUTCOME') := 'SUCCESS'; 

APEX_WORKFLOW.CONTINUE_ACTIVITY( 
	p_instance_id => v_workflow_id, -- Obtained from a table I saved it into earlier
	p_static_id => 'MEMBER_TASKS', -- The activity's static id is MEMBER_TASKS
	p_activity_params => v_activity_params, -- Should set the workflow variable
	p_activity_status => APEX_WORKFLOW.c_activity_status_success -- The activity has succeeded 
);

The workflow does continue, but the variable is not set. According to the documentation:

The parameters returned as part of the activity execution. If these parameters correspond to workflow variables, the values of those variables will get updated with what is provided here, before the workflow continues to the next activity.

(https://docs.oracle.com/en/database/oracle/apex/24.1/aeapi/APEX_WORKFLOW.CONTINUE_ACTIVITY-Procedure-Signature-1.html)

So I am not sure why the variable is not being updated. I feel like I may be missing something obvious here, but I am not sure. I wonder if it has to do with the fact that the activity is a plugin, but I cannot find any other way to set a workflow variable, since the UPDATE_VARIABLES procedure requires a Workflow Administrator and only runs for workflows in Suspended or Faulted states.

Comments
Post Details
Added on Jan 13 2025
2 comments
197 views