WB_RT_API_EXEC

Hey,
Can anybody tell me something about the OWB wrapper package WB_RT_API_EXEC . I want to know everything about this package and also if we can change tihs package for our application.
Your response is valuable
Thanks in advance!!!!

Hi
You can schedule processes from OWB that leverage the database scheduler...or do it manually using the database scheduler or any other product, See the blog post here for a start;
http://blogs.oracle.com/warehousebuilder/2008/11/using_3rd_party_schedulers_with_owb_1.html
The WB_RT_API_EXEC package can be used to execute all objects, the sqlplus_exec_template gives some doc.
Cheers
David

Similar Messages

  • Owbsys.wb_rt_api_exec.open fails after upgrade to OWB 11gR2

    The following code is used as a PLSQL wrapper to execute OWB mappings and is based on the good old run_my_own_stuff.sql. We have been mandated to use Tivoli as the corporate scheduler, meaning we do not have Workflow as a solution. We have implemented the audit_execution_id as an input parameter to all the mappings to be able to link the data to the OWBSYS audit tables, as well as return mapping performance and success info to the execution process/session. I have implemented this exact same procedure in 10gR1, 10gR2 and 11gR1 (current dev env) with no problems at all - the code ports easily. However following an upgrade (actually an export/import of the repository from 11gR1 on a 64bit solaris to 11gR2 on Exadata running enterprise linux 5) - actually the test server (I know, I know, I said the same thing!), the code now fails on the wb_rt_api_exec.open line (highlighted).
    CREATE OR REPLACE PROCEDURE bi_ref_data.map (p_map_name IN VARCHAR2)
    -- Procedure to execute ETL mapping package via command line call
    -- Mapping names are held in the BI_REF_DATA.MAP_NAME table
    -- with the mapping type and location data
    AS
    v_repos_owner VARCHAR2 (30) := <repository_owner>;
    v_workspace_owner VARCHAR2 (30) := <workspace_owner>;
    v_workspace_name VARCHAR2 (30) := <workspace_name>;
    v_loc_name VARCHAR2 (30);
    v_map_type VARCHAR2 (30);
    v_map_name VARCHAR2 (30) := UPPER (p_map_name);
    v_retval VARCHAR2 (255);
    v_audit_execution_id NUMBER; -- Audit Execution Id
    v_audit_result NUMBER;
    v_start_time timestamp := LOCALTIMESTAMP;
    v_end_time timestamp;
    v_execution_time NUMBER;
    v_record_rate NUMBER := 0;
    v_records_selected NUMBER;
    v_records_inserted NUMBER;
    v_records_updated NUMBER;
    v_records_deleted NUMBER;
    v_records_merged NUMBER;
    v_errors NUMBER;
    v_failure VARCHAR2 (4000);
    e_no_data_found_in_audit exception;
    v_audit_exec_count NUMBER;
    e_execution_id_error exception;
    BEGIN
    SELECT UPPER (loc_name), UPPER (map_type)
    INTO v_loc_name, v_map_type
    FROM bi_ref_data.owb_map_table
    WHERE UPPER (map_name) = UPPER (v_map_name);
    IF UPPER (v_map_type) = 'PLSQL'
    THEN
    v_map_type := 'PLSQL';
    ELSIF UPPER (v_map_type) = 'SQL_LOADER'
    THEN
    v_map_type := 'SQLLoader';
    ELSIF UPPER (v_map_type) = 'SAP'
    THEN
    v_map_type := 'SAP';
    ELSIF UPPER (v_map_type) = 'DATA_AUDITOR'
    THEN
    v_map_type := 'DataAuditor';
    ELSIF UPPER (v_map_type) = 'PROCESS'
    THEN
    v_map_type := 'ProcessFlow';
    END IF;
    -- Changed code for owb11gr2
    -- owbsys.wb_workspace_management.set_workspace (v_workspace_name, v_workspace_owner);
    owbsys.wb_rt_script_util.set_workspace (v_workspace_owner || '.' || v_workspace_name);
    v_audit_execution_id   := owbsys.wb_rt_api_exec.open (v_map_type, v_map_name, v_loc_name);
    IF v_audit_execution_id IS NULL
    OR v_audit_execution_id = 0
    THEN
    RAISE e_execution_id_error;
    END IF;
    v_retval := v_retval || 'audit_execution_id=' || TO_CHAR (v_audit_execution_id);
    v_audit_result := owbsys.wb_rt_api_exec.execute (v_audit_execution_id);
    IF v_audit_result = owbsys.wb_rt_api_exec.result_success
    THEN
    v_retval := v_retval || ' --> SUCCESS';
    ELSIF v_audit_result = owbsys.wb_rt_api_exec.result_warning
    THEN
    v_retval := v_retval || ' --> WARNING';
    ELSIF v_audit_result = owbsys.wb_rt_api_exec.result_failure
    THEN
    v_retval := v_retval || ' --> FAILURE';
    ELSE
    v_retval := v_retval || ' --> UNKNOWN';
    END IF;
    DBMS_OUTPUT.put_line (v_retval);
    owbsys.wb_rt_api_exec.close (v_audit_execution_id);
    v_end_time := LOCALTIMESTAMP;
    v_execution_time := bi_ref_data.get_seconds_from_interval (v_end_time - v_start_time);
    v_retval := 'Execution time = ' ||
    v_execution_time ||
    ' seconds.';
    DBMS_OUTPUT.put_line (v_retval);
    SELECT COUNT (w.rta_select)
    INTO v_audit_exec_count
    FROM owbsys.owb$wb_rt_audit w
    WHERE w.rte_id = v_audit_execution_id;
    IF v_audit_exec_count = 0
    THEN
    RAISE e_no_data_found_in_audit;
    END IF;
    SELECT w.rta_select,
    w.rta_insert,
    w.rta_update,
    w.rta_delete,
    w.rta_merge,
    rta_errors
    INTO v_records_selected,
    v_records_inserted,
    v_records_updated,
    v_records_deleted,
    v_records_merged,
    v_errors
    FROM owbsys.owb$wb_rt_audit w
    WHERE w.rte_id = v_audit_execution_id;
    v_retval := v_records_selected || ' records selected';
    DBMS_OUTPUT.put_line (v_retval);
    IF v_records_inserted > 0
    THEN
    v_retval := v_records_inserted || ' inserted';
    DBMS_OUTPUT.put_line (v_retval);
    END IF;
    IF v_records_updated > 0
    THEN
    v_retval := v_records_updated || ' updated';
    DBMS_OUTPUT.put_line (v_retval);
    END IF;
    IF v_records_deleted > 0
    THEN
    v_retval := v_records_deleted || ' deleted';
    DBMS_OUTPUT.put_line (v_retval);
    END IF;
    IF v_records_merged > 0
    THEN
    v_retval := v_records_merged || ' merged';
    DBMS_OUTPUT.put_line (v_retval);
    END IF;
    IF v_errors > 0
    THEN
    v_retval := v_errors || ' errors';
    DBMS_OUTPUT.put_line (v_retval);
    END IF;
    IF v_execution_time > 0
    THEN
    v_record_rate := TRUNC ( (v_records_inserted + v_records_updated + v_records_deleted + v_records_merged) / v_execution_time, 2);
    v_retval := v_record_rate || ' records/sec';
    DBMS_OUTPUT.put_line (v_retval);
    END IF;
    IF (v_audit_result = owbsys.wb_rt_api_exec.result_failure
    OR v_audit_result = owbsys.wb_rt_api_exec.result_warning)
    THEN
    FOR cursor_error
    IN (SELECT DISTINCT aml.plain_text
    FROM owbsys.owb$wb_rt_audit_messages am
    INNER JOIN
    owbsys.owb$wb_rt_audit_message_lines aml
    ON am.audit_message_id = aml.audit_message_id
    WHERE am.audit_execution_id = v_audit_execution_id)
    LOOP
    DBMS_OUTPUT.put_line (cursor_error.plain_text);
    END LOOP;
    END IF;
    -- OWBSYS.wb_rt_api_exec.close (v_audit_execution_id);
    COMMIT;
    EXCEPTION
    WHEN e_execution_id_error
    THEN
    raise_application_error (-20011, 'Invalid execution ID returned from OWB');
    -- RAISE;
    WHEN e_no_data_found_in_audit
    THEN
    raise_application_error (-20010, 'No data found in audit table for execution_id - ' || v_audit_execution_id);
    -- RAISE;
    WHEN NO_DATA_FOUND
    THEN
    raise_application_error (-20001, 'Error in reading data from OWBSYS tables.');
    -- RAISE;
    END;
    Does anyone out there know if there is a difference between 11gR1 and R2 in the way that the wb_rt_api_exec function works?
    Is there a simple way to retrieve the audit_id before executing the mapping, or at a push during the mapping so that we can maintain the link between the session data and the OWBSYS audit data?
    Martin

    Hi David, I have been reading some of your posts and blogs around OWB and I still have not found the answer.
    OK, thereis/was a script that Oracle Support/forums/OTN sent out a while ago called "run_my_iowb_stuff" - I am sure you will be familiar with it. I based the code I uploaded on it and added additional functionality. In essence, I wanted to use the audit_id as an input parameter tot he mapping, so that I can register the audit_id in the management tables, and associate each row of loaded data with a specific mapping_id which would allow a simple link to the owbsys audit tables to complete the audit circle. To that end, I used the owbsys.wb_rt_api_exec.open procedure to register the mapping execution, and then on the execute procedure of the same package, I passed this audit_id in as a custom parameter:
    <<snip>>
    owbsys.wb_workspace_management.set_workspace (v_workspace_name, v_workspace_owner);
    v_audit_execution_id := owbsys.wb_rt_api_exec.open (v_map_type, v_map_name, v_loc_name, 'PLSQL');
    IF v_audit_execution_id IS NULL
    OR v_audit_execution_id = 0
    THEN
    RAISE e_execution_id_error;
    END IF;
    v_retval := v_retval || 'audit_execution_id=' || TO_CHAR (v_audit_execution_id);
    IF v_include_mapping_id > 0 -- if non-zero, submit owb execution id as an input parameter to the map process
    THEN
    owbsys.wb_rt_api_exec.override_input_parameter (
    v_audit_execution_id,
    'p_execution_id',
    TO_CHAR (v_audit_execution_id),
    owbsys.wb_rt_api_exec.parameter_kind_custom
    END IF;
    <<snip>>
    The execution is closed, also by the use of the audit_id ( "owbsys.wb_rt_api_exec.close (v_audit_execution_id)" )
    I can also use the audit_id to inspect the audit tables to retrieve the records processed as well as any associated error messages, and format them for the calling application (owSQL*Plus, which is normally the context of our current use).
    This procedure has been working weel up to now until we moved over to 11gR2 when all of a sudden the audit_id is not returned when executing "v_audit_execution_id := owbsys.wb_rt_api_exec.open (v_map_type, v_map_name, v_loc_name);". Prior to 11gR2 this worked like a charm - now it has crashed to a halt.
    As an interesting twist, I have tried to substitute a sequence number for the audit_id, and then tried to get the audit_id after the mapping completes, so that I can put both the sequence and audit id in a table so it maintains the link. However in attempting to use the owbsys.wb_rt_script_util.run_task procedure which now appears to be the only thing left working, I was astonished to see the following output in sqlplus:
    SQL> exec map1('stg_brand')
    Stage 1: Decoding Parameters
    | location_name=STAGE_MOD
    | task_type=PLSQLMAP
    | task_name=STG_BRAND
    Stage 2: Opening Task
    | l_audit_execution_id=2135
    Stage 3: Overriding Parameters
    Stage 4: Executing Task
    | l_audit_result=1 (SUCCESS)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=1
    --> SUCCESS
    Execution time = .647362 seconds.
    records/sec
    PL/SQL procedure successfully completed.
    SQL>
    This output seems so identical to the "run_my_owb_stuff" that either Oracle support generated their "run_my_owb_stuff" as a lightweight owbsys.wb_rt_script_util.run_task procedure, or Oracle incorporated the "run_my_owb_stuff" script into their owbsys.wb_rt_script_util.run_task procedure! Which way round I cannot say, but it is surely one or the other! To make matters worse, I have raised this with Oracle Support, and they have the temerity to claim that they do not support the "run_my_owb_stuff" script, but think enough of it to incorporate it into their own package in a production release!
    To overcome my problems, in the short term, I need to be able to access the audit_id either during or after the execution of the mapping, so that I can at least associate that with a sequence number I am having to pass in as a parameter to each mapping. In the longer term, i would like a solution to be able to access the audit_id before I execute the mapping, as I could by calling the "owbsys.wb_rt_api_exec.open " procedure. Ideally this would be solved first and I would not need to use a sequence at all.
    Hope this clarifies things a bit.
    Regards
    Martin

  • Wb_rt_api_exec.run_task system_params and custom_params to schedule a job

    Hi all,
    Did anybody ever use system_params and custom_params in the wb_rt_api_exec.run_task function to execute a process flow execution?
    I have three process flows under three different Item names within the same runtime repository, so the point here would be to differenciate them using the system_params and/or custom_params.
    Using this syntax:
    prodowbrt.wb_rt_api_exec.run_task('MY_PROCESS_FLOWS_LOC', 'ProcessFlow', 'MY_PROCESS_FLOW', '', 'item_key=MY_ITEM_NAME', 1);
    This ends up with ORA-01422 error messages when I try running it into SQL*Plus
    Anybody could help?
    Thank you!

    Hi,
    I'm not to sure about the custom params, but the parameter 'processFlow' should be changed to 'process'.
    Ragnar

  • Wb_rt_api_exec in pl/sql as OWB target

    I've got a question similar to the one posted by Donna Kelley on 26-mar-2007 (
    Re: 10gR2: How do you run OWB from Enterprise Manager (OEM) and Scheduler?
    I'm unable to figure out the grants needed to execute wb_rt_api_exec.run_task within a pl/sql procedure when the procedure is being run by the OWB target user.
    We just upgraded OWB in devo from 10.1.0.4 to 10.2.0.1.31. In the earlier version, there was no problem with the target user executing wb_rt_api_exec (although we used open, execute, close instead of run_task). The runtime repository owner granted execute on wb_rt_api_exec to the target schema. And then the 2 roles wb_r_owbruntime and wb_u_owbruntime were also granted to target. That's all it required.
    In the new version, I can execute wb_rt_api_exec only as the design repository owner. I've granted the target user execute on wb_rt_api_exec. Also granted the 2 roles owb_d_owbowner and owb_o_owbowner roles to the target user (see sqlplus_exec_template.sql). But within a pl/sql procedure with the procedure run as the target user, the return code is 3 (failure). I can also not run sqlplus_exec_template as the target user. But I can run it successfully as the design repository owner.
    This seems strange. We're running ETL mappings to populate target tables. It should be easy to run the pl/sql procedure as the target user. I don't want to run it as the repository owner because that would involve a bunch of grants on target tables. Seems silly.
    I'd welcome any thoughts and advice.
    Many thanks.
    Gary

    First, David, thanks very much for your help. Based on your example, what I'm trying to do should work.
    Below is a very simplified example that demonstrates the problem. Note that executing the procedure as the target user produces an error (ie, the return value is 3) while executing it as the design repository owner succeeds.
    Comments and advice are welcomed from all. I very well could be missing something obvious. Thanks to all.
    devo> @who
    OWBTARGET
    devo> start t1
    devo> create procedure t1 authid current_user as
    2      sql_stmt varchar2(50) := 'set role owb_d_owbdesign, owb_o_owbdesign';
    3 begin
    4      execute immediate sql_stmt;
    5      dbms_output.put_line(to_char(owbdesign.wb_rt_api_exec.run_task(
    6      'RPTDEVO_LOC', 'PLSQLMAP', 'TERM_TO_DMS_CURR', ',', ',', 0, 0)));
    7 end;
    8 /
    Procedure created.
    devo> grant execute on t1 to owbdesign;
    Grant succeeded.
    devo> exec t1
    Stage 1: Decoding Parameters
    | location_name=RPTDEVO_LOC
    | task_type=PLSQLMAP
    | task_name=TERM_TO_DMS_CURR
    Stage 2: Opening Task
    | l_audit_execution_id=5390
    Stage 3: Overriding Parameters
    Stage 4: Executing Task
    | l_audit_result=3 (FAILURE)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=3
    3
    PL/SQL procedure successfully completed.
    devo> @check_role_privs owbtarget
    devo> select grantee "grantee",
    2      granted_role "role",
    3      admin_option "option"
    4 from dba_role_privs
    5 where grantee = upper('&1')
    6 order by 2
    7 ;
    admin
    grantee role option
    OWBTARGET AQ_USER_ROLE NO
    CONNECT NO
    OLAP_USER NO
    OWBR_OWBDESIGN NO
    OWB_D_OWBDESIGN NO
    OWB_OWBDESIGN NO
    OWB_O_OWBDESIGN NO
    RESOURCE NO
    SELECT_CATALOG_ROLE NO
    9 rows selected.
    devo> connect owbdesign
    Connected.
    devo> @who
    OWBDESIGN
    devo> exec owbtarget.t1
    Stage 1: Decoding Parameters
    | location_name=RPTDEVO_LOC
    | task_type=PLSQLMAP
    | task_name=TERM_TO_DMS_CURR
    Stage 2: Opening Task
    | l_audit_execution_id=5400
    Stage 3: Overriding Parameters
    Stage 4: Executing Task
    | l_audit_result=1 (SUCCESS)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=1
    1
    PL/SQL procedure successfully completed.

  • Wb_rt_api_exec problem  in 10G OEM

    I'm trying to schedule a process in 10G OEM built in OWB. All validation, generation, deployment is fine. I can't find the docs to guide me in this process. The docs deal with the oem_exec_template.sql - which says to use wb_rt_api_exec.run_task for 10G OEM. Any idea what to do for scheduling in 10G OEM??
    Based on examples in Metalink forum this is what I'm putting into the SQL script job in OEM. Errors included as well.
    declare
    ret number;
    begin
    ret:=runtime_owner.wb_rt_api_exec.run_task('RUNTIME', 'EASYDW', 'PROCESS', 'F4211LOAD','','',1);
    end;
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> SQL> SQL> SQL> Connected.
    SQL> SQL> 2 3 4 5 6 ret:=runtime_owner.wb_rt_api_exec.run_task('RUNTIME', 'EASYDW', 'PROCESS', 'F4211LOAD','','',1);
    ERROR at line 4:
    ORA-06550: line 4, column 6:
    PLS-00306: wrong number or types of arguments in call to 'RUN_TASK'
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    declare
    ret number;
    begin
    ret:=runtime_owner.wb_rt_api_exec.run_task('RUNTIME', 'EASYDW', 'PROCESS', 'F4211LOAD','','');
    end;
    ERROR at line 1:
    ORA-20001: Task not found - Please check the Task Type, Name and Location are
    correct.
    ORA-06512: at "RUNTIME_OWNER.WB_RT_API_EXEC", line 620
    ORA-06512: at line 4

    Thanks guys. You were both right - wrong process name and too many parameters. And I realized I used the database locations value - not the Process flows locations.
    This worked =
    runtime_owner.wb_rt_api_exec.run_task('process flows locations', 'PROCESS', 'process name','','',1);
    declare
    ret number;
    begin
    ret:=runtime_owner.wb_rt_api_exec.run_task('DWDEST', 'PROCESS', 'PROC','','',1);
    end;
    /

  • Error in Process flow running in SQL owb_run_own.wb_rt_api_exec.run_task

    Hi all
    We are having issue with owb_run_own.wb_rt_api_exec.run_task using Sql Plus
    When i try to run through Warehouse Builder Process flow ran Successfully
    When i try to run through SQL Plus using owb_run_own.wb_rt_api_exec.run_task We are getting error
    ORA-20099: ORA-20003: Process Flow FailedSerious <PROCEDURE_NAME >unknown error
    RPE-02018: Oracle Workflow schema OWF_MGR on host OWD2HOST cannot be accessed using service OWDX.XXXX.XXXX through port 1523. Please check the location details and try again.
    Can any one help please
    Thanks in Advance
    Edited by: user1849 on May 5, 2009 9:56 AM

    Hi all
    We are having issue with owb_run_own.wb_rt_api_exec.run_task using Sql Plus
    When i try to run through Warehouse Builder Process flow ran Successfully
    When i try to run through SQL Plus using owb_run_own.wb_rt_api_exec.run_task We are getting error
    ORA-20099: ORA-20003: Process Flow FailedSerious <PROCEDURE_NAME >unknown error
    RPE-02018: Oracle Workflow schema OWF_MGR on host OWD2HOST cannot be accessed using service OWDX.XXXX.XXXX through port 1523. Please check the location details and try again.
    Can any one help please
    Thanks in Advance
    Edited by: user1849 on May 5, 2009 9:56 AM

  • Error when using wb_rt_api_exec.run_task api to call process flow

    Dear All,
    I am using OWBV 10.2.0.3 and currently have some issue with it.
    I have a process flow and I'm executing it using wb_rt_api_exec api.
    When I ran it, that process flow failes with below error messages.
    RPE-01003: An infrastructure condition prevented the request from completing.
    RPE-01038: Failed to evaluate expression null. Please modify the expression, redeploy and retry again.
    RPE-01003: An infrastructure condition prevented the request from completing.
    RPE-02227: Cannot test Control Center user OWF_MGR. This user must match the login credentials of the evaluation location configured on owning module.
    ORA-01017: invalid username/password; logon denied
    But using same user when I log on to the OWB client I can run that process flow without any error. So it seems to be there is no any sesurity issues too.
    Furthermore I have done below things.
    OWF_MGR (Processflow user), OWB_MGR (repositiry user) and RUNTIMEUSR (user used to run the processflow) all registered under control center.
    There are couple of forum post here. I followed all those and didnt work anything for me.
    Early response highly regards,
    mc
    Edited by: mc**** on Jan 19, 2011 4:13 PM

    Hi,
    look these forum threads {message:id=3140661} and {message:id=2695999}
    I think you need connect with Design Center under user which you used for executing processflow and register workflow location
    Regards,
    Oleg

  • Usage of wb_rt_api_exec.execute_in_background

    In wb_rt_api_exec_example.txt, the basic steps to run a map are:
    1 - initialize session roles
    2 - wb_rt_api_exec.open
    3 - override SYSTEM params
    4 - override CUSTOM params
    5 - wb_rt_api_exec.execute
    6 - wb_rt_api_exec.close
    If I wanted to use wb_rt_api_exec.execute_in_background, would I also need to call the close procedure?
    1 - initialize session roles
    2 - wb_rt_api_exec.open
    3 - override SYSTEM params
    4 - override CUSTOM params
    5 - wb_rt_api_exec.execute_in_background
    6 - ?? wb_rt_api_exec.close ??
    I can't use wb_rt_api_exec.run_task (as it is used in oem_exec_background_template.sql) since I need to be able to get the audit_execution_id that is returned when you open a task.

    Hi
    Maybe you can call simple wb_rt_api_exec.execute (sample file: owb/rtp/sql/wb_rt_api_exec_example.txt, procedure override_custom_input_params).
    You can try to call close after you execute background process (i don't know, but maybe there is some execution stuck), if there is no errors, then why not?
    Regards

  • Wb_rt_api_exec over a database link

    When I call wb_rt_api_exec over a database link I receive:
    ORA-20001: Task not found - Please check the Task Type, Name and Location are correct.
    ORA-06512: at "OWB_10_2_0_1_31.WB_RT_API_EXEC", line 704.
    When I run the command on the other database it works.
    Is there a way to do this?
    Thanks,
    Joe

    We had the same error when starting a package with WB_RT_API_EXEC.RUN_TASK from JBoss Middleware. It ran fine when started directly from SQLDeveloper, but threw the error when started from JBoss. Adding the pragma solved the problem, we also had to put a commt; at the end of the procedure.

  • Wb_rt_api_exec.run_task

    What is the function owbrt.wb_rt_api_exec.run_task intended for?
    I can't find it in this forum nor on Google nor on OTN nor in the OWB documentation.
    Why is it there and why is it never mentioned?
    Best regards,
    Erik Ykema

    please have a look in metalink:
    there you can find that this is the replacement for the oem templates (the code is not wrapped, so you can see, that it is nearly the same in PL/SQL as the oem template in the sql file)

  • Is there some error log for wb_rt_api_exec.run_task?

    Hi,
    I am trying to execute a mapping using "wb_rt_api_exec.run_task" by executing the following
    declare
    result_num number;
    begin
    result_num:= NEW_OWNER.wb_rt_api_exec.run_task('NEW_USER', 'PLSQLMAP', 'TEST_MAP', ',', ',', 0 ,0);
    end;
    And this is the output that I get:
    Stage 1: Decoding Parameters
    | location_name=NEW_USER
    | task_type=PLSQLMAP
    | task_name=TEST_MAP
    Stage 2: Opening Task
    | l_audit_execution_id=167
    Stage 3: Overriding Parameters
    Stage 4: Executing Task
    | l_audit_result=3 (FAILURE)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=3
    Command was executed successfully
    Now I have no idea why the execution of task failed? Is there some log file where I can lookup what the error is?
    Thanks,

    I had seen the error in Execution log accessed through Repository browser.
    But Ive resovled it now.
    Actually, the user (NEW_USER) connected to with sqlplus did not have privileges on the registered location - so I connected to OWB Design Center as that user(NEW_USER) and registered the location entering the password. Thats it. It worked!!

  • 10GR2 - Cannot get wb_rt_api_exec to execute a Process Flow

    Hi,
    In version 10.1.3, I was able to use the wb_rt_api_exec procedure to execute process flows within a stored procedure (and called by an Enterprise Manager job).
    I have tried something similar in 10GR2, but when I run stored procedure, it says it has executed successfully, but the process flow has not run.
    My Stored procedure code is like:-
    CREATE OR REPLACE PROCEDURE PROC_TEST IS
    ret NUMBER;
    BEGIN
    ret:= rep_owner.wb_rt_api_exec.run_task('PROCESS_LOCATION','PROCESS','WF_TEST','','',1,1);
    END PROC_TEST;
    I have noticed there is an extra parameter p_background at the end of the run_task function and was not sure if I am setting it correctly. The procedure compiles ok, but does not run the process flow.
    Can anyone help please?
    Thanks
    GB

    To run workflow from SQLPLUS I used the following script:
    set serveroutput on
    variable exec_return_code number;
    begin
    -- Initialize Return Code
    :exec_return_code := rep_ISM_DEV2.wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    :exec_return_code := rep_ism_dev2.wb_rt_api_exec.run_task('OWF_LOCATION','PROCESS','ALL_MARTS_PF', ' ' );
    end;
    Prior to running this script I have
    1.     grant execute on rep_owner.WB_RT_API_EXEC to rep_user;
    2.     OWF_MGR is registered as Repository user.
    It is possible that you will get an error: PE-02018: Oracle Workflow schema OWF_MGR on host XXX.XX.XX.XX cannot be accessed using service ORCL through port 1521. Please check the location details and try again.
    To overcome this problem log in to OWB Control Center as the target User (Runtime user) and executed the PF package from there manually. You will get a message that OWF_MGR location was registered by other user and you will get asked to supply the OWF_MGR password. The manual execution should finish normally. After that I am able to run the PF from a command line without problems. It looks like running the PF from the control center stores the OWF_MGR login information somewhere (anybody knows where?) and you do not need to supply it any longer.
    Hope it helps.
    Vladimir

  • Where can i find documentation on wb_rt_api_exec?

    Hi,
    i spent the last hours searching for ways to start/stop/cancel owb process flows from sql*plus (see my other thread). Within the example script run_my_owb_stuff.sql from oracle.com i found various calls to wb_rt_api_exec.xxx. It seems that the documentation of this function or package is not accessible via Internet. A text search inside the owb folder doesn't give any results as well.
    Can anyone here give me a hint?
    Greetings
    Christoph

    A try at google with sufficient keywords often reveals the answer.
    My estimate is 60-80% of the questions posted here can be solved by constructing a good google search, and take some time to read the hits.
    Of course experience with using linux helps (to choose the rights search keywords)
    To the original poster: there is a very valuable command called 'man', which means 'manual'. if you need information about commands, use the manual, for example: man lsto learn about the 'ls' (list) command. also try man manthe manual page about the manual pages command.

  • Takes time to start mapping.

    I am struggling with a strange problem.
    i have a process flow which is like
    start ----> Fork---->Mapping1
    |
    |
    V
    Mapping2.
    when i start the process flow with help of wb_rt_api_exec.run_task(); process flow starts immediately and creates an entry for process flow in ALL_RT_AUDIT_EXECUTIONS immediately
    but Mapping1 and Mapping1 are started after 15-20 minutes and no entry is created in ALL_RT_AUDIT_EXECUTIONS till then.
    any help is appericiated in this regard.
    Regards,
    rd_rbs

    cant see a reason unless there are some networking issues or deadlocks(which prevents the mapping from executed) or a DBMS SLEEP anywhere in your mapping(i reckon if someone would do that sort of thing)

  • How to Schedule Job using Database Control for SQLPLUS script?

    Hi All,
    I am using Database version 10.2. I would like to schedule a SQLPLUS script job using Database control (Not using Grid Control!). The following is the script.
    ========================================================
    define OEM_FRIENDLY=1
    define OWB_BACKGROUND=0
    set serveroutput on
    set verify off
    whenever sqlerror exit failure;
    define REPOS_OWNER='&1.'
    define LOCATION_NAME='&2.'
    define TASK_TYPE='&3.'
    define TASK_NAME='&4.'
    define SYSTEM_PARAMS='&5.'
    define CUSTOM_PARAMS='&6.'
    alter session set current_schema = &REPOS_OWNER.;
    set role owb_d_&REPOS_OWNER., owb_o_&REPOS_OWNER.;
    variable exec_return_code number;
    begin
    -- Initialize Return Code
    :exec_return_code := wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    :exec_return_code := wb_rt_api_exec.run_task('&LOCATION_NAME.',
    '&TASK_TYPE.',
    '&TASK_NAME.',
    '&CUSTOM_PARAMS.',
    '&SYSTEM_PARAMS.',
    &OEM_FRIENDLY.,
    &OWB_BACKGROUND.);
    end;
    exit :exec_return_code;
    ===========================================================
    Is it possible to schedule SQLPLUS script with 6 different parameters? If yes then how can I schedule for monday to friday or only for Saturday and sundays.
    Please provide brief steps.
    Thanks for your help in advance.
    - Mehul

    Let me explain to you about scheduler.
    You can schedule a pl/sql stored procedure TEST_S as follows...
    Begin
    dbms_scheduler.create_job(
    job_name=>'MY_JOB',
    Job_Type=>'STORED_PROCEDURE',
    job_action=>'TEST_S',
    start_date=>sysdate,
    repeat_interval=>'freq=monthly;BYDAY=MON,TUE,WED,THU,FRI',
    end_date=>null');
    END;
    You can also also execute o/s script like .bat or .sh. For this job type should be EXECUTABLE.
    Example of converting a .sql script in .bat script...
    insert.sql
    insert into dept values(50,'IT','LONDON');
    exit
    insert.bat
    sqlplus scott/tiger @insert.sql
    Executing now...
    C:\Documents and Settings>insert.bat
    C:\Documents and Settings>sqlplus scott/tiger @insert.sql
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 1 08:01:00 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    1 row created.
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - P
    oduction
    With the Partitioning, OLAP and Data Mining options
    C:\Documents and Settings>
    So first read about DBMS_SCHEDULER and do the work in prompt. Then you can go and schedule it even by database control.
    Scheduling by database control...
    http://www.oracle.com/technology/oramag/oracle/04-jul/o44tech_dba.html
    Scheduler
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHEHDHA
    PS: By default each job you created is disable state. Please enable it by enable procedure of DBMS_SCHEDULER package.

Maybe you are looking for