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!

Start OWB workflow from APEX

596345Dec 7 2007 — edited Dec 12 2007
Hi together,

My challenge is to start an OWB workflow from an apex procedure.

Procedure:
declare
numb number;
audit_id number;
begin
numb := rtruser_blueprint.exec_api.execute('LOC_A014_OWF_MGR', 'PROCESS', 'LOAD_CALM_DELIVERY', ',', 'DELIVERY_ID_IN=6', audit_id);
end;


My problem is the following error:
ORA-06565: cannot execute SET ROLE from within stored procedure

This error occures at the following row in the execute-Procedure in the package exec_api (standard owb execution package):
dbms_session.SET_ROLE('OWB_D_rtr10201_blueprint');
dbms_session.SET_ROLE('OWB_O_rtr10201_blueprint');


If I run this script directly with sqlplus, the procedure works fine. As a result of this, I assume, the problem has to do with the grants which the apex execution user (APEX_PUBLIC_USER) doesn't have in contrast to the blueprint user (which is schema owner)

More informations about the environment setup:
The apex workspace is bound to the database - user: BLUEPRINT.
BLUEPRINT has the grant to execute the procedure 'EXECUTE' in the package 'EXEC_API'. The 'EXEC_API' package belongs to the user 'RTRUSER_BLUEPRINT'.

My concrete question is: Which rights / grants does which user need to execute the procedure directly from APEX?

Thanks for your help!

Mirco
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2008
Added on Dec 7 2007
2 comments
793 views