Skip to Main Content
Feature Request FR-4177
Product Area Workflow
Status ROADMAP

10 Voters

Expanded Workflow/Task API

jacobhofer1 Public
· Jan 2 2025

Idea Summary
Expand the current set of API functions for managing workflows/tasks within APEX. Specifically adding in parameters to associate programmatically created tasks with a specific workflow instance. In addition, including more functions for interacting with workflows and tasks without an APEX session, such as completing a task via an API call that includes an approver/owner field to dynamically specify which user approved the task. These are two specific examples, but in general many of the API functions have limited ability to manipulate the underlying data.

Use Case
Creating custom tasks, such as those created when tasks need to be approved in parallel, are created using the APEX_HUMAN_TASK API. Often these tasks are only created in the context of a workflow, but are created via PLSQL, which has no option to associate them to a workflow_id. (See https://forums.oracle.com/ords/apexds/post/creating-workflow-task-programmatically-4397).

In addition, approving a task requires an APEX session for the user that is approving the task. This API could also be extended to include an owner input parameter that specifies which user is completing the task. This would allow calling these functions from PLSQL code that is not associated with an APEX session, such as background/automated tasks or admin control.

Preferred Solution
Add a parameter to APEX_HUMAN_TASK.CREATE_TASK called p_workflow_id of type NUMBER that associates the new task with a specific workflow.

Add a parameter to APEX_HUMAN_TASK.APPROVE_TASK/APEX_HUMAN_TASK.COMPLETE_TASK called p_owner of type VARCHAR2 that completes the task on behalf of the specified owner. Perhaps this owner would be required to be one of the listed potential owners?

Other functions to have expanded capabilities similar to the above scenarios.

This is currently on the roadmap for a future release of Oracle APEX.

Comments

Comments

  • ralf.mueller APEX Team OP 1.2 years ago

    We are considering opening up the Task API to provide a workflow ID upon creation of a Task, makes a lot of sense. Will review and internally discuss the other idea too (no session needed for approving a task)

  • sohil.darshan OP 11 months ago (edited 11 months ago)

    Hi Team,

    If we can assign WORKFLOW_ID for manually created tasks then it will make things simpler.

    Refer below Idea comments:

    Kind Regards,

    Sohilkumar Bhavsar.