Don´t forget to drop a process flow before deleting

I wanted to execute a process flow with PL/SQL. Therefore I use the following script:

declare
v_result number;
begin
 v_result :=
         owbsys.wb_rt_script_util.run_task (
            p_location_name   => 'LOCATIONNAME',
            p_task_type       => 'PROCESSFLOW',
            p_task_name       => 'PF_ONE',
            p_custom_params   => '');
      dbms_output.put_line (v_result);
end;

I wondered because I got the error

[Error] Execution (25: 1): ORA-20001: Task not found - 
Please check the Task Type, Name and Location are correct.
ORA-06512: at "OWBSYS.WB_RT_API_EXEC", line 759
ORA-06512: at "OWBSYS.WB_RT_SCRIPT_UTIL", line 910
ORA-06512: at line 4

I tried some research and queried the table OWBSYS.OWB$WB_RT_WAREHOUSE_OBJECTS. I got two entries for my process flow. One entry was an old one that belongs to a deleted process flow package. The other one was the correct one. I forgot to drop the process flow package from DB in control center before removing it in OWB design client. Ohmpf … bad trap! My assumption was, that the correct meaning of the error message is not “could not find the process” but rather “I found 2 process flows and did not know which should I take”.

So I created a new process flow package with the same name as the deleted one and deployed it. The old entries become overwritten in DB. Then I droped it in Control Center and the complete entries were deleted. Now I could executed my processflow with PL/SQL.

This entry was posted in OWB. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>