Idea Summary
The current APEX Workflow and Human Task PL/SQL APIs (APEX_HUMAN_TASK and APEX_WORKFLOW) rely on the caller having an APEX session and being logged in with a specific role for the Workflow/Task instance. For example, apex_workflow.resume requires you to be logged in as an ADMIN Participant for it to work. I propose adding a parameter to all APIs called p_admin_mode, which allows you to run the API without an APEX session or be logged in as a certain role.
Use Case
There are many instances where you need to manage workflows in the background. For example, importing an APEX Application with running workflows puts all workflows in a Suspended State. This means you must write a script to resume them after the import. This script must find an ADMIN participant for each instance, create an APEX session as that user then call apex_workflow.resume.
This would also be useful when creating a ‘Workflow Console’. If you create a workflow Administrator Console, a user with access to that page should be able to perform operations on all workflows.
Preferred Solution (Optional)
I propose adding a parameter to all APIs called p_admin_mode. This would allow you to run the API without an APEX session or be logged in as a certain role.