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!

Calling Approvals API from automation

_LeeBurgess_Apr 16 2024

APEX v23.2

Requirement:

Run a daily automation to look for any expired tasks and reject them (also sends email to requestor but this is irrelevant).

Problem:

In my procedure that is called from the automation I have a cursor of the expired tasks and I call this:

The issue is the ‘user’ that calls this (from the automation) is ‘nobody’. Thus they are not in my authorised list of task Potential Owners so I get the ‘Not Authorised’ error.

I tried adding the user as a potential owner before the reject_task call:

but I get another error:

ORA-20987: APEX - APEX.TASK.ADD_TASK_POTENTIAL_OWNER_NOT_AUTHORIZED

because you need to be a Business Owner I believe to call this.

Is there a best practice for when you need to call these APIs from a procedure (or is there another approach I could use?).

I had thought about doing something here:

but I'm pretty sure this is an automation under the hood so will run into the same issues.

Any help much appreciated.

Lee

Comments
Post Details
Added on Apr 16 2024
2 comments
291 views