Please note that you can always click on an image in my postings and it will render a clear full sized version in a separate browser page! Also please note that this blog is best viewed with Firefox and Chrome

Sunday, November 18, 2007

Oracle Warehouse Builder OWB R2 Process Flows

I recently was contacted by one of my former clients that had a pretty good question. I actually had this questions asked a few times by various parties, so here is a summery and an answer!

Quick OWB question for you: Is it possible to execute process flows from outside of OWB once they have been created. Wondering if there is a template provided by oracle(like “Sql_exec_template for OWB mappings) to execute Process flows…"

Well, OWB does contain a pl/sql package called WB_RT_API_EXEC with a function inside it called RUN_TASK that submits execution requests to the OWB runtime engine. The requests could be for mappings, process flows or scheduled jobs. The function spec looks like:

function run_task

( p_location_name in varchar2
, p_task_type in varchar2
, p_task_name in varchar2
, p_custom_params in varchar2 default null
, p_system_params in varchar2 default null
, p_oem_friendly in number default 0
, p_background in number default 0
) return number;

This is actually the same function used by the sqlplus_exec_template.sql script in OWB 10gR2 that you mentioned in your email. It can be called using (assuming a repository owner connection exists):

(this is an example…)

result_num number;
result_num:= wb_rt_api_exec.run_task('PFMOD_LOCATION1', 'PROCESS', 'MY_PKG/MY_PF', ',', ',', 0 ,0);

The full documentation of the function can be found in /owb/rtasst/wb_rt_api_exec.pl

As usual, if you have further good questions never hesitate to checkout Oracle OWB Blog and Oracle Technology OWB Forum .

No comments:

Post a Comment