create or replace package body cdwp_fun is /***************************************************************************************** Purpose HTML Report of Business Functions for ODWA Usage Remarks The function cdwp_chk_fun_is_business_rule determines if a Designer business function is managed by this package or by cdwp_br (business RULE functions). Revision history When Who Construct Revision What ------------------------------------------------------------------------------------------ $REVISION_HISTORY$ 26-nov-2002 Kannan Parthasarathy B2661562: Modified display statement. 14-mar-2001 Lucas Jellema 3.13 - icon bar should show dataflow.gif correctly 14-mar-2001 Lucas Jellema 3.12 - hard coded IRID in Exectued by Business Units section - added Flows from and to Business Functions 09-feb-2001 Lucas Jellema 3.11 - also show BR triggered by FUN if FUN does not have any FUNATT at all (instead of only if FUN has the correct FUNATT); same applies to Functions triggering the BR 08-feb-2001 SANDRA MULLER 3.10 fix for issue 192: wrong icon for business functions 07-feb-2001 Lucas Jellema 3.9 - show FUNENT - relationships - show Implemented by Modules ; change prompt to Implement By - show (Implicitly) Triggered by (for BR and FUN) 24-jan-2001 Sandra Muller 3.8 fix for issue 129 : business units without parent were not shown 17-jan-2001 Sandra Muller 3.7 Fix for issue 5 (in procedure list_business_functions) 12-sep-2000 Lucas Jellema 3.6 Use root functions collected by odwarprt 11-sep-2000 Lucas Jellema 3.5 Tune queries, add + RULE , add timer form and statistics 11-aug-2000 Lucas Jellema 3.3 Enable DEU 04-aug-2000 MARC VAHSEN 3.2 UPDGRADE TO DESIGNER 6i, see file for details 28-jun-2000 Lucas Jellema has_proper_usages 3.1 + replace select..into with explicit cursor (to address ORA-1000 maximum open cursor exceeded) 28-jun-2000 Lucas Jellema triggered_business_rules, procedure etg_from_funent 3.0 + add label (Implicitly) for rules triggered through data usages rather than event triggers 28-jun-2000 Lucas Jellema has_proper_usages 2.9 + cater for too_many_rows 20-jun-2000 Lucas Jellema procedure etg_from_funent, cursor c_funtrg 2.8 + if there are no triggering events for a Static Business Rule, take the Data Usages as input to derive what the triggers are (in line with the Headstart Utilities Business Rule Design Transformer) + in addition to the first item: the listing of triggering functions should also take into account that triggering events maybe events indirectly derived from the data usages 08-jun-2000 Lucas Jellema cursor c_funtrg 2.7 + only list function/rule as triggered if there is a real attribute update of the attribute triggering the event that triggers the rule/function 07-jun-2000 Lucas Jellema FunEnt 2.6 + Entity calls not app-context resolved (use report_link) procedure triggered_business_rules + better lay for triggering BR and FUN ( TON: Triggering business functions - it is a bit unclear what entity and create update delete means. Shouldn't ready ON create update delete OF Entity TRIGGERS Function) 31-jun-2000 Lucas Jellema Parent and Child Functions 2.5 + show short_description procedure triggered_business_rules Changed order: FUN triggered on C/U/D of Entity 30-may-2000 Lucas Jellema summary_modfun 2.4 + show name of PLM in MODFUN 29-may-2000 Lucas Jellema root_functions 2.3 + do not reset_context (since this procedure is called by others who rely on that context) 29-may-2000 Lucas Jellema list_fun_definitions 2.2 + write menu_bar (status bar) for one_file = 'Y' 28-may-2000 Lucas Jellema procedure funbun 2.1 + new 25-may-2000 Lucas Jellema short_list_ and list_ 2.0 + all functional improvements, such as + write_not_found + write_about + use report_link for hyperjumps + app_summary + icon bar + set_context and set_app + set_base_url and local_link procedures and cursors funevt, evtfun, funtrg function has_funtrg, has_funevt, has_evtfun 19-may-2000 Sandra Muller summary_childfun, list_business_functions 1.3 changed function.gif to function_hierarchy_diagrammer.gif 16-may-2000 Sandra Muller triggered_business_rules 1.2 Also show short definition of triggered business rules 12-may-2000 Sandra Muller root_business_functions 1.1 c_root_fun: made it a lot faster by disabling name filter also removed selection of child function so that stand-alone functions are shown as well list_business_functions, root_business_functions added write_about list_business_functions show short_definition in heading instead of as property below 25-apr-2000 Lucas Jellema 1.0 Creation, based on Erwin Groenendal's package 3.2 UPDGRADE TO DESIGNER 6i - specification changed of - summary_etg - summary_funent - summary_childfun - triggered_business_rules - root_business_functions - list_business_functions - root_business_functions: - call to odwactxt.update_context - call to cdwp.include_report_styles - deleted call to cdwpbase.reset_context; - list_business_functions: - call to odwactxt.update_context - deleted call to cdwpbase.reset_context - procedure icon_bar - call cdwp.exists_detail changed to call odwaxist.exists_detail - added in specification (for cdwp_br) - outer joins in various cursors (possible dangling references out of workspace) - htp. tableOpen and tableRowOpen changed in cdwp. tableOpen and tableRowOpen - htp. tableClose and tableRowClose changed in cdwp. tableClose and tableRowClose - use odwarprt.show_anchor instead of local procedure show_anchor, init icon bar with odwarprt.init_short_cut_bar - changed use of global variables g_fun_id in usage of odwactxt.get_pac_irid to do - summary_modfun_definitions show icon for module after upgrade of cdwp_mde to 6i - upgrade call to cdwp_dia call after upgrade of this package - look at the performance, especially the main cursors and the use of functions in the where clause *****************************************************************************************/ /* 3.9 MODFUN - outer join for Languages! */ -- -- private constants -- REVISION_LABEL constant varchar2(30) := '$x.y::3.13 $'; PACKAGE_NAME constant varchar2(30) := 'CDWP_FUN'; FUN_ICON constant varchar2(30) := cdwpbase.get_icon('FUN'); EVT_ICON constant varchar2(30) := cdwpbase.get_icon('EVT'); type t_num_tbl is table of number(38) index by binary_integer; -- -- cursor that finds all functions that are indirectly triggered by b_fun_id -- through Function Entity Usages, Event-Entity link and FUNEVT triggers cursor c_funtrg ( b_fun_ivid in number , b_br in varchar2 default 'Y' ) is select /*+ RULE */ fun.function_label fun_function_label , fun.short_definition fun_short_definition , fun.irid fun_id , ent.name ent_name , ent.irid ent_id , min( decode ( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'C' ) , 'Y', 'True' , null ) ) create_flag , min( decode ( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'U' ) , 'Y', 'True' , null ) ) update_flag , min( decode ( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'D' ) , 'Y', 'True' , null ) ) delete_flag , 'N' no_etg from i$sdd_fun fun , ci_function_entity_usages funent , i$sdd_funevt etg , i$sdd_ent ent , i$sdd_evt evt where funent.parent_ivid = b_fun_ivid and etg.triggering_function_ref = fun.irid and etg.triggered_event_ref = evt.irid and etg.parent_ivid = evt.ivid and evt.entity_ref = ent.irid and evt.ivid = cdwpbase.get_best_ivid( evt.irid) and ent.ivid = cdwpbase.get_best_ivid( ent.irid) and fun.ivid = cdwpbase.get_best_ivid( fun.irid) and funent.entity_reference = ent.irid and ( ( funent.create_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'C' ) = 'Y' ) or ( funent.update_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'U' ) = 'Y' ) or ( funent.delete_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'D' ) = 'Y' ) ) and cdwp_chk_fun_is_business_rule ( fun.irid , fun.function_label , fun.function_type ) = b_br -- 2.7 and ( evt.attribute_ref is null or exists ( select 'x' from i$sdd_funatt funatt where funatt.parent_ivid = b_fun_ivid and funatt.attribute_ref = evt.attribute_ref and funatt.update_flag = 'Y' ) or -- 3.11 cater for Functions without explicit FUNATT usages ( not exists ( select 'x' from i$sdd_funatt funatt where funatt.parent_ivid = b_fun_ivid ) AND ( funent.update_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'U' ) = 'Y' ) ) ) group by fun.function_label , fun.short_definition , ent.name , ent.irid , fun.irid , 'N' union -- 3.0 add the Business Rules that do not have Data Events but do have -- Data Usages of the Data elements updated by this Function select fun.function_label fun_function_label , fun.short_definition fun_short_definition , fun.irid fun_irid , ent.name ent_name , ent.irid ent_irid , funent.create_flag create_flag , funent.update_flag update_flag , '' delete_flag , 'Y' no_etg from i$sdd_fun fun , ci_function_entity_usages funent , i$sdd_funent brent , i$sdd_ent ent -- Functions have entity usages of entities used by the BR that has not data events where chk_static_br_no_etg -- this BR has no Data Events associated with it ( fun.irid ) ='Y' and cdwp_chk_fun_is_business_rule ( fun.irid , fun.function_label , fun.function_type ) = b_br and funent.parent_ivid = b_fun_ivid and brent.function_ref = fun.irid and fun.ivid = cdwpbase.get_best_ivid( fun.irid) and brent.entity_ref = funent.entity_reference and brent.parent_ivid = fun.ivid and ent.ivid = cdwpbase.get_best_ivid(ent.irid) and funent.entity_reference = ent.irid and ( funent.create_flag = 'Y' or funent.update_flag = 'Y' and ( exists ( select 'x' from ci_function_attribute_usages funatt , i$sdd_funatt bratt where funatt.parent_ivid = b_fun_ivid and funatt.attribute_reference = bratt.attribute_ref and bratt.function_ref = brent.function_ref and funatt.update_flag = 'Y' and bratt.retrieve_flag = 'Y' and bratt.parent_ivid = fun.ivid ) ) ) order by 1 -- function_label ; -- -- cursor that finds all functions that are indirectly triggering b_fun_ivid -- through Function Entity Usages, Event-Entity link and FUNEVT triggers cursor c_trgfun ( b_fun_ivid in number , b_br in varchar2 default 'Y' ) is -- part one: for all triggering events of the b_fun_ivid -- find out which entity triggers those events -- then find out which Business Functions use those entities -- thus implicitly triggering the events select /*+ RULE */ fun.function_label fun_function_label , fun.short_definition fun_short_definition , fun.irid fun_id , ent.name ent_name , ent.irid ent_id , min( decode ( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'C' ) , 'Y', 'True' , null ) ) create_flag , min( decode ( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'U' ) , 'Y', 'True' , null ) ) update_flag , min( decode ( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'D' ) , 'Y', 'True' , null ) ) delete_flag , 'N' no_etg from i$sdd_fun fun -- triggering function/br , ci_function_entity_usages funent -- data usage of triggering function/br , i$sdd_funevt etg -- evt triggering the b_fun_ivid , i$sdd_ent ent , i$sdd_evt evt where funent.parent_ivid = fun.ivid and etg.triggering_function_ref = cdwpbase.get_irid(b_fun_ivid) and etg.triggered_event_ref = evt.irid and etg.parent_ivid = evt.ivid and evt.entity_ref = ent.irid and evt.ivid = cdwpbase.get_best_ivid( evt.irid) and ent.ivid = cdwpbase.get_best_ivid( ent.irid) and fun.ivid = cdwpbase.get_best_ivid( fun.irid) and funent.entity_reference = ent.irid and ( ( funent.create_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'C' ) = 'Y' ) or ( funent.update_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'U' ) = 'Y' ) or ( funent.delete_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'D' ) = 'Y' ) ) and cdwp_chk_fun_is_business_rule ( fun.irid , fun.function_label , fun.function_type ) = b_br -- 2.7 and ( evt.attribute_ref is null or exists ( select 'x' from i$sdd_funatt funatt where funatt.parent_ivid = fun.ivid and funatt.attribute_ref = evt.attribute_ref and funatt.update_flag = 'Y' ) or -- 3.11 cater for Functions without explicit FUNATT usages ( not exists ( select 'x' from i$sdd_funatt funatt where funatt.parent_ivid = fun.ivid ) AND ( funent.update_flag = 'Y' and cdwp_chk_event(evt.irid , evt.name , evt.on_condition , 'U' ) = 'Y' ) ) ) group by fun.function_label , fun.short_definition , ent.name , ent.irid , fun.irid , 'N' union -- 3.0 add rows for a b_unf_ivid that does not have Data Events but does have -- Data Usages of the Data elements used select fun.function_label fun_function_label , fun.short_definition fun_short_definition , fun.irid fun_irid , ent.name ent_name , ent.irid ent_irid , funent.create_flag create_flag , funent.update_flag update_flag , '' delete_flag , 'Y' no_etg from i$sdd_fun fun , i$sdd_fun br , ci_function_entity_usages funent , i$sdd_funent brent , i$sdd_ent ent -- Functions have entity usages of entities used by the BR that has not data events where br.ivid = b_fun_ivid and chk_static_br_no_etg -- this BR has no Data Events associated with it ( br.irid ) ='Y' and cdwp_chk_fun_is_business_rule ( fun.irid , fun.function_label , fun.function_type ) = b_br and funent.parent_ivid = fun.ivid and brent.function_ref = br.irid and fun.ivid = cdwpbase.get_best_ivid( fun.irid) and brent.entity_ref = funent.entity_reference and brent.parent_ivid = b_fun_ivid and ent.ivid = cdwpbase.get_best_ivid(ent.irid) and funent.entity_reference = ent.irid and ( funent.create_flag = 'Y' or funent.update_flag = 'Y' and ( exists ( select 'x' from ci_function_attribute_usages funatt , i$sdd_funatt bratt where funatt.parent_ivid = fun.ivid and funatt.attribute_reference = bratt.attribute_ref and bratt.function_ref = brent.function_ref and funatt.update_flag = 'Y' and bratt.retrieve_flag = 'Y' and bratt.parent_ivid = br.ivid ) ) ) order by 1 -- function_label ; -- cursor that finds all events TRIGGERED BY Function b_fun_id cursor c_etg ( b_fun_id in number ) is select /*+ RULE */ ent.name ent_name , evt.entity_ref ent_id -- 3.0 , min( decode( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'C' ) , 'Y', 'True' , null ) ) create_flag , min( decode( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'U' ) , 'Y', 'True' , null ) ) update_flag , min( decode( cdwp_chk_event ( evt.irid , evt.name , evt.on_condition , 'D' ) , 'Y', 'True' , null ) ) delete_flag , evt.name evt_name from i$sdd_ent ent , i$sdd_evt evt , i$sdd_funevt etg where etg.triggered_event_ref = evt.irid and etg.triggering_function_ref = b_fun_id and etg.parent_ivid = evt.ivid and evt.entity_ref = ent.irid and evt.ivid = cdwpbase.get_best_ivid( evt.irid) and ent.ivid = cdwpbase.get_best_ivid( ent.irid) group by evt.name , ent.name , evt.entity_ref order by evt.name , ent.name ; -- -- cursor that finds all events (and functions) TRIGGERED BY -- (NOT as a result of data usages of) Function b_fun_id cursor c_funevt ( b_fun_id in number ) is select /*+ RULE */ evt.name evt_name , fun.function_label , fun.short_definition , fun.irid fun_id , evt.event_type , evt.frequency , evt.time , evt.unit_of_frequency from i$sdd_fun fun , i$sdd_funevt evtfun , i$sdd_evt evt , i$sdd_funevt funevt where funevt.triggering_event_ref = evt.irid and funevt.triggered_function_ref = b_fun_id and evt.entity_ref is null and evtfun.triggered_event_ref = evt.irid and evtfun.triggering_function_ref = fun.irid and evt.ivid = cdwpbase.get_best_ivid( evt.irid) and fun.ivid = cdwpbase.get_best_ivid( fun.irid) and funevt.parent_ivid = evt.ivid and evtfun.parent_ivid = evt.ivid order by evt.name ; -- dataflows this function is the source of cursor c_srcdfl ( b_fun_ivid in number ) is select /*+ RULE */ dfl.name dfl_name , fun.function_label , fun.short_definition , fun.function_type , fun.irid fun_irid , fun.ivid fun_ivid from i$sdd_fun fun , i$sdd_dfl dfl where dfl.parent_ivid = b_fun_ivid and dfl.function_dest_ref = fun.irid and fun.ivid = cdwpbase.get_best_ivid( fun.irid) order by fun.function_label ; -- dataflows from functions that this function is the destination of cursor c_dstdfl ( b_fun_irid in number ) is select /*+ RULE */ dfl.name dfl_name , fun.function_label , fun.short_definition , fun.function_type , fun.irid fun_irid , fun.ivid fun_ivid from i$sdd_fun fun , i$sdd_dfl dfl where dfl.parent_ivid = fun.ivid and dfl.function_dest_ref = b_fun_irid and fun.ivid = cdwpbase.get_best_ivid( fun.irid) order by fun.function_label ; -- -- cursor that finds all events (and functions) TRIGGERING -- (NOT as an indirect result of data usages of) Function b_fun_id cursor c_evtfun ( b_fun_id in number ) is select evt.name evt_name , fun.function_label , fun.short_definition , fun.irid fun_id , evt.event_type , evt.frequency , evt.time , evt.unit_of_frequency from i$sdd_fun fun , i$sdd_funevt funevt , i$sdd_evt evt , i$sdd_funevt evtfun where evtfun.triggered_event_ref = evt.irid and evtfun.triggering_function_ref = b_fun_id and evtfun.triggered_event_ref = evt.irid and evt.entity_ref is null and funevt.triggering_event_ref = evt.irid and funevt.triggered_function_ref = fun.irid and evt.ivid = cdwpbase.get_best_ivid( evt.irid) and fun.ivid = cdwpbase.get_best_ivid( fun.irid) and funevt.parent_ivid = evt.ivid and evtfun.parent_ivid = evt.ivid order by evt.name ; -- -- cursor to retrieve function entity usages -- cursor c_funent ( b_parent_ivid in number ) is select /*+ RULE */ funent.entity_reference ent_id , ent.name ent_name , decode(funent.create_flag, 'Y', 'True', null) funent_create_flag , decode(funent.retrieve_flag, 'Y', 'True', null) funent_retrieve_flag , decode(funent.update_flag, 'Y', 'True', null) funent_update_flag , decode(funent.delete_flag, 'Y', 'True', null) funent_delete_flag , funent.id funent_id , funent.remark funent_remark from i$sdd_ent ent , ci_function_entity_usages funent where funent.parent_ivid = b_parent_ivid and funent.entity_reference = ent.irid and ent.ivid = cdwpbase.get_best_ivid( ent.irid) order by ent.name; -- -- cursor to retrieve function attribute usages -- cursor c_funatt ( b_funent_id in number , b_parent_ivid in number ) is select /*+ RULE */ att.irid att_id , att.name att_name , decode(funatt.insert_flag, 'Y', 'True', null) funatt_insert_flag , decode(funatt.retrieve_flag, 'Y', 'True', null) funatt_retrieve_flag , decode(funatt.update_flag, 'Y', 'True', null) funatt_update_flag , decode(funatt.nullify_flag, 'Y', 'True', null) funatt_nullify_flag from i$sdd_att att , ci_function_attribute_usages funatt where funatt.funent_reference = b_funent_id and funatt.attribute_reference = att.irid and funatt.parent_ivid = b_parent_ivid and att.parent_ivid = cdwpbase.get_best_ivid( att.pac_ref) order by att.name; -- this function parses the string p_string, looking for tags to identify relationships -- from entity p_ent_ivid; it returns a table of all RELEND_IVIDs found function rl_parser ( p_string in varchar2 , p_ent_ivid in number ) return t_num_tbl is -- selects relationship ends required for business rule validation cursor c_relend_use ( b_ent_ivid in number ) is select rend.ivid , rend.name , rend.to_entity_ref from i$sdd_relend rend where rend.parent_ivid = b_ent_ivid ; l_rel_ivid t_num_tbl; function rel_found ( p_remark in varchar2 , p_rel_name in varchar2 , p_to_ent in number ) return boolean -- -- Purpose This function checks whether a relationship can be determined from -- the remark in an entity usage, and returns TRUE of this is the situation. -- If not the function returns FALSE. -- -- Usage p_remark : the remark wherein the relationship is searched. -- p_rel_name : the name of the relationship that is searched -- p_to_ent : the name of the entity to which the relationship is directed -- -- Remarks - -- is l_ent_name varchar2(100):= jr_name.get_crn_from_irid(i_irid => p_to_ent,format => 'NAME'); l_find_pos number(3); l_other_end_ent varchar2(240); l_ent_length number(3); begin l_other_end_ent := replace(upper(l_ent_name), ' ', ''); l_find_pos := instr ( replace ( upper(p_remark) , ' ' , '' ) , '' ||replace ( upper(p_rel_name) , ' ' , '' ) ||'->' ||l_other_end_ent ||'' , 1 ); if l_find_pos != 0 then return true; else return false; end if; -- l_find_pos != 0 end rel_found; begin for r_relend_use in c_relend_use ( b_ent_ivid => p_ent_ivid ) loop if rel_found ( p_remark => p_string , p_rel_name => r_relend_use.name , p_to_ent => r_relend_use.to_entity_ref ) then l_rel_ivid( l_rel_ivid.count + 1):= r_relend_use.ivid; end if; -- rel_found end loop relend; return l_rel_ivid; end; -- rl_parser procedure relend ( p_relend_ivid in number , p_label out varchar2 , p_to_ent_irid out number ) is cursor c_relend ( b_relend_ivid in number ) is select /*+ RULE */ relend.maximum_cardinality relend_maximum_cardinality , ent.name ent_name , decode( relend.maximum_cardinality , 1 , ent.name , ent.plural ) ent_name_or_plural , relend.arc_number relend_arc_number , relend.transfer relend_transfer , relend.name name , relend.id relend_id , relend.minimum_cardinality , relend.maximum_cardinality , decode ( nvl(relend.minimum_cardinality, 0) , 0 , odwa_rel ( 'may be' , relend.parent_ivid , relend.irid ) , odwa_rel ( 'must be' , relend.parent_ivid , relend.irid ) ) ||' ' ||relend.name ||' ' ||decode ( relend.maximum_cardinality , 1, odwa_rel ( 'one and only one' , relend.parent_ivid , relend.id ) , null, odwa_rel ( 'one or more' , relend.parent_ivid , relend.id ) , odwa_rel ( 'and a minimum of' , relend.parent_ivid , relend.irid ) ||to_char(relend.minimum_cardinality) ||odwa_rel ( 'and a maximum of' , relend.parent_ivid , relend.irid ) ||to_char(relend.maximum_cardinality) ) ||' ' relend_sentence , relend.name ||decode(relend.maximum_cardinality , 1, ' >' , ' ' ) ||decode(relend.minimum_cardinality , 0, '- - - - - -' , null, '- - - - - -' , '------------' ) ||decode(othrelend.minimum_cardinality , 0, ' - - - - - -' , null, ' - - - - - -' , '-------------' ) ||decode(othrelend.maximum_cardinality , 1, '< ' , ' ' ) relend_graphical , relend.to_entity_reference -- 2.2 , ent.ivid to_ent_ivid from i$sdd_relend othrelend , i$sdd_ent ent , ci_relationship_ends relend where relend.ivid = b_relend_ivid and relend.to_entity_reference = ent.irid and ent.ivid = cdwpbase.get_best_ivid( ent.irid) and relend.other_relationship_end_ref = othrelend.irid and othrelend.parent_ivid = ent.ivid ; r_relend c_relend%rowtype; begin open c_relend( b_relend_ivid => p_relend_ivid); fetch c_relend into r_relend; close c_relend; p_label:= r_relend.relend_graphical; p_to_ent_irid:= r_relend.to_entity_reference; end; --relend function relend_label ( p_relend_ivid in number ) return varchar2 is l_label varchar2(500); l_to_ent_irid number(38); begin relend(p_relend_ivid, l_label, l_to_ent_irid); return l_label; end; --relend_label -- -- procedure to create HTML listing all root business functions in -- a specific application system -- procedure root_business_functions ( p_session_id in number ) is cursor c_fun_tree ( b_fun_id in number ) is select fun.irid fun_id , fun.function_label fun_function_label , fun.short_definition fun_short_definition , fun.function_type fun_function_type , fun.irid fun_irid , fun.ivid fun_ivid , level from i$sdd_fun fun where fun.ivid = cdwpbase.get_best_ivid( fun.irid) start with fun.irid = b_fun_id connect by prior fun.irid = fun.parent_ref ; l_first boolean:= true; begin cdwp.tableOpen; for i in 1..odwasrch.g_ividTab.count loop for r_fun_tree in c_fun_tree(b_fun_id => odwasrch.g_iridTab(i) ) loop cdwp.tableRowOpen; cdwpbase.set_found; if l_first then cdwp.TableDataHeading ( '' ||'Detail View' ||'' ||'
' ||'' ||'List View' ||'' ); l_first:= false; else cdwp.TableDataHeading(' '); end if; for i in 1..r_fun_tree.level-2 loop cdwp.TableDataValue('|', 2, 10); end loop; if r_fun_tree.level > 1 then cdwp.TableDataValue('|___', 2, 10); end if; if cdwp_chk_fun_is_business_rule( r_fun_tree.fun_id , r_fun_tree.fun_function_label , r_fun_tree.fun_function_type ) = 'N' then cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_fun_tree.fun_id , p_type_of => 'FUN' , p_el_name => r_fun_tree.fun_function_label ) ||' ('||odwavrsn.get_version_label( r_fun_tree.fun_ivid)||')' , p_Colspan => 4 ); else cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_fun_tree.fun_id , p_type_of => 'BR' , p_el_name => r_fun_tree.fun_function_label ) ||' ('||odwavrsn.get_version_label( r_fun_tree.fun_ivid)||')' , p_Colspan => 4 ); end if; for i in r_fun_tree.level..10 loop cdwp.TableDataValue('', 2, 10); end loop; cdwp.TableDataValue(r_fun_tree.fun_short_definition, 2, 500); cdwp.tableRowClose; end loop; --r_fun_tree end loop; -- r_root_fun cdwpbase.write_no_found( p_message => ROB_msg.getMsg(Rob_msg.MSG210_CDWP_RULEFUNTIONNA, '', '', '', '')); cdwp.tableClose; end; -- root_business_functions -- -- -- procedure summary_funbun_definitions is -- -- cursor to select Business Unit - Function Mappings for a specific Business Function -- cursor c_funbun ( b_fun_irid in number ) is select /*+ RULE */ funbun.average_volume , funbun.business_unit_reference , funbun.element_type_name , funbun.frequency_unit , funbun.function_reference , funbun.id , funbun.number_of_times_modified , funbun.response_required , funbun.single_bun_flag , bun.irid bun_id , bun.name bun_name , bun.remark bun_remark , parent_bun.name bun_parent_name from i$sdd_bun parent_bun , i$sdd_bun bun , ci_function_business_units funbun where funbun.function_reference = b_fun_irid and funbun.business_unit_reference = bun.irid and bun.parent_ref = parent_bun.irid and bun.ivid = cdwpbase.get_best_ivid( bun.irid) and parent_bun.ivid = cdwpbase.get_best_ivid( parent_bun.irid) union -- 3.8 fix for issue 129: if bun does not have parent, -- it is selected with next statement select /*+ RULE */ funbun.average_volume , funbun.business_unit_reference , funbun.element_type_name , funbun.frequency_unit , funbun.function_reference , funbun.id , funbun.number_of_times_modified , funbun.response_required , funbun.single_bun_flag , bun.irid bun_id , bun.name bun_name , bun.remark bun_remark , null bun_parent_name from i$sdd_bun bun , ci_function_business_units funbun where funbun.function_reference = b_fun_irid -- 3.12 removed hardcoded irid left in and funbun.business_unit_reference = bun.irid and bun.parent_ref is null and bun.ivid = cdwpbase.get_best_ivid( bun.irid) order by 11 -- bun.name ; -- l_first boolean; begin cdwp.bookmark('FUNBUN'||to_char(odwactxt.get_pac_irid)); -- BOOKMARK cdwp.tableOpen('BORDER="0"'); -- l_first := true; for r_funbun in c_funbun( b_fun_irid => odwactxt.get_pac_irid) loop if l_first then cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwp.add_images('{business_unit.gif}') ||ROB_msg.getMsg(Rob_msg.MSG218_CDWP_EBBU, '', '', '', '') ); -- htp.print(''); -- cdwp.tableRowOpen; -- cdwp.TableDataValue('', 1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP019_CDWP_NAME, '', '', '', ''), 1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP031_CDWP_FREQ, '', '', '', ''), 1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP0163_CDWP_PERUNIT, '', '', '', ''), 1); cdwp.tableRowClose; l_first:= false; end if; -- cdwp.tableRowOpen; cdwp.TableDataValue('', 1); cdwp.TableDataValue ( r_funbun.bun_name ); cdwp.TableDataValue ( to_char(r_funbun.average_volume) ); cdwp.TableDataValue ( r_funbun.frequency_unit ); cdwp.tableRowClose; end loop; -- r_funbun if not l_first then cdwp.tableClose; htp.nl; end if; htp.print(''); cdwp.tableRowClose; end; -- summary_funbun_definitions -- -- -- procedure summary_childfun is -- -- cursor to select properties of child functions of a specific function -- cursor c_childfun ( b_fun_irid number ) is select fun.irid fun_irid , fun.function_type fun_function_type , fun.function_label fun_function_label , fun.short_definition fun_short_definition from i$sdd_fun fun where fun.parent_ref = b_fun_irid and fun.ivid = cdwpbase.get_best_ivid( fun.irid) order by fun.function_label; -- l_first boolean; begin cdwp.bookmark('CHILD_FUN'||to_char(odwactxt.get_pac_irid)); -- BOOKMARK -- -- child functions -- l_first := true; for r_childfun in c_childfun(odwactxt.get_pac_irid) loop cdwp.tableRowOpen; if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwp.add_images('{'||FUN_ICON||'}') ||ROB_msg.getMsg(Rob_msg.MSG219_CDWP_CHILDFUN, '', '', '', '') ); l_first := false; else cdwp.TableDataHeading(null); end if; cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_childfun.fun_irid , p_el_name => r_childfun.fun_function_label , p_type_of => 'FUN' , p_text => '{gif} ' ||r_childfun.fun_function_label ||' - ' ||r_childfun.fun_short_definition ) ); cdwp.tableRowClose; end loop; -- r_childfun if not l_first then cdwp.tableClose; htp.nl; htp.print(''); cdwp.tableRowClose; end if; end; -- summary_childfun -- -- procedure summary_funent is l_first boolean; l_rel_tbl t_num_tbl; l_label varchar2(500); l_to_ent_irid number(38); begin cdwp.bookmark('FUNENT'||to_char(odwactxt.get_pac_irid)); -- BOOKMARK -- -- entity usages -- l_first := true; for r_funent in c_funent( b_parent_ivid => odwactxt.get_pac_ivid) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading(cdwp.add_images('{'||cdwpbase.get_icon('ENT')||'} ') ||ROB_msg.getMsg(Rob_msg.CAP0164_CDWP_FEU, '', '', '', '')); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP0165_CDWP_ENTITYATTRIB, '', '', '', ''), 1, 140); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP011_CDWP_CREATE, '', '', '', '') , 1, 45); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP012_CDWP_RETRIEVE, '', '', '', ''), 1, 45); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP013_CDWP_UPDATE, '', '', '', '') , 1, 45); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP014_CDWP_DELETE, '', '', '', '') , 1, 45); l_first := false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(''); cdwp.TableDataValue --- 2.6 ( cdwp.report_link ( p_el_id => r_funent.ent_id , p_type_of => 'ENT' , p_text => r_funent.ent_name ) , 2 , 180 ); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funent.funent_create_flag) , 1, 45); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funent.funent_retrieve_flag), 1, 45); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funent.funent_update_flag) , 1, 45); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funent.funent_delete_flag) , 1, 45); cdwp.tableRowClose; -- show Relationship Usages if instr( upper(r_funent.funent_remark), '') > 0 then l_rel_tbl:= rl_parser ( p_ent_ivid => cdwpbase.get_best_ivid(p_irid => r_funent.ent_id) , p_string => r_funent.funent_remark ); for i in 1..l_rel_tbl.count loop relend( l_rel_tbl(i), l_label, l_to_ent_irid); cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue ( cdwpbase.nbsp(2) ||cdwp.add_images('{relationship_end.gif}') ||cdwp.report_link ( p_el_id => r_funent.ent_id , p_type_of => 'ENT' ) ||'.' ||l_label ||cdwp.report_link ( p_el_id => l_to_ent_irid , p_type_of => 'ENT' ) , p_colspan => 5 ); cdwp.tableRowClose; end loop; -- i in 1..l_rel_tbl.count end if; -- -- attribute usages -- for r_funatt in c_funatt ( r_funent.funent_id , b_parent_ivid => odwactxt.get_pac_ivid ) loop cdwp.tableRowOpen; cdwp.TableDataHeading(''); cdwp.TableDataValue(cdwpbase.nbsp(2)||r_funatt.att_name, 1, 180); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funatt.funatt_insert_flag) , 1, 45); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funatt.funatt_retrieve_flag), 1, 45); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funatt.funatt_update_flag) , 1, 45); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funatt.funatt_nullify_flag) , 1, 45); cdwp.tableRowClose; end loop; -- r_funatt end loop; -- r_funent if not l_first then cdwp.tableClose; htp.nl; htp.print(''); cdwp.tableRowClose; end if; end; -- summary_funent -- -- -- procedure summary_funevt is l_first boolean:= true; begin cdwp.bookmark( 'FUNEVT'||to_char(odwactxt.get_pac_irid)); for r_funevt in c_funevt( odwactxt.get_pac_irid) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.TableDataHeading ( cdwp.add_images ( '{'||EVT_ICON||'} '||ROB_msg.getMsg(Rob_msg.CAP0166_CDWP_TRIGEVENTFUN, '', '', '', '') ) ); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP0167_CDWP_TRIGFUN, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP010_CDWP_SHORTDEF, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP036_CDWP_TRIGEVENTS, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP0168_CDWP_EVENTTYPE, '', '', '', ''),1); cdwp.tableRowClose; l_first:= false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue ( cdwpbase.ifThenElse ( r_funevt.fun_id is not null , cdwp.report_link ( p_el_id => r_funevt.fun_id , p_el_name => r_funevt.function_label , p_type_of => 'FUN' , p_text => r_funevt.function_label ) ) ); cdwp.TableDataValue( r_funevt.short_definition,1); cdwp.TableDataValue( r_funevt.evt_name,1); cdwp.TableDataValue( r_funevt.event_type, 1); cdwp.tableRowClose; end loop; -- r_funevt if not l_first then cdwp.tableClose; end if; end; -- summary_funevt -- -- produce triggering events directly from the data usages of the function -- since the function does not have triggering events -- procedure etg_from_funent is l_first boolean := true; l_rl_pos number(5) :=0; l_rl_endpos number(5) :=0; l_funent_remark varchar2(2000); l_rel_tbl t_num_tbl; l_label varchar2(500); l_to_ent_irid number(38); begin for r_funent in c_funent( b_parent_ivid => odwactxt.get_pac_ivid) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.TableDataHeading ( cdwp.add_images('{'||cdwpbase.get_icon('EVT')||'} ') ||ROB_msg.getMsg(Rob_msg.DSP280_CDWP_ITBDE, '', '', '', '') ); -- 3.0 cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP019_CDWP_NAME, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP279_CDWP_ENTITY, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP011_CDWP_CREATE, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP013_CDWP_UPDATE, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP014_CDWP_DELETE, '', '', '', ''),1); cdwp.tableRowClose; l_first:= false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue( 'CREATE '||r_funent.ent_name); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_funent.ent_id , p_type_of => 'ENT' ) , 1 , 180 ); cdwp.TableDataValue( cdwp.convertYnToCheck( 'Y')); cdwp.TableDataValue( cdwp.convertYnToCheck( 'Y')); cdwp.tableRowClose; -- -- now loop over relationship ends, using r_funent.remark l_funent_remark:= r_funent.funent_remark; l_rel_tbl:= rl_parser ( p_ent_ivid => cdwpbase.get_best_ivid(p_irid => r_funent.ent_id) , p_string => l_funent_remark ); for i in 1..l_rel_tbl.count loop relend( l_rel_tbl(i), l_label, l_to_ent_irid); cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue ( 'UPDATE ' ||cdwp.report_link ( p_el_id => r_funent.ent_id , p_type_of => 'ENT' ) ||'.' ||l_label ); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => l_to_ent_irid , p_type_of => 'ENT' ) , 1 , 180 ); cdwp.TableDataValue( cdwp.convertYnToCheck( 'N')); cdwp.TableDataValue( cdwp.convertYnToCheck( 'Y')); cdwp.tableRowClose; end loop; -- i in 1..l_rel_tbl.count -- -- now loop over attributes for r_funatt in c_funatt ( r_funent.funent_id , b_parent_ivid => odwactxt.get_pac_ivid ) loop cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue( 'UPDATE '||r_funent.ent_name||'.'||r_funatt.att_name); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_funent.ent_id , p_type_of => 'ENT' ) , 1 , 180 ); cdwp.TableDataValue( cdwp.convertYnToCheck( 'N')); cdwp.TableDataValue( cdwp.convertYnToCheck( 'Y')); cdwp.tableRowClose; end loop; -- r_funatt end loop; -- r_funent if not l_first then cdwp.tableClose; htp.nl; end if; end; -- etg_from_funent -- -- -- procedure summary_etg is l_first boolean:= true; begin cdwp.bookmark( 'EVT'||to_char(odwactxt.get_pac_irid)); for r_etg in c_etg( odwactxt.get_pac_irid) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwp.add_images('{'||cdwpbase.get_icon('EVT')||'} ') ||ROB_msg.getMsg(Rob_msg.DSP281_CDWP_TBDE, '', '', '', '') ); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP019_CDWP_NAME, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP279_CDWP_ENTITY, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP011_CDWP_CREATE, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP013_CDWP_UPDATE, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP014_CDWP_DELETE, '', '', '', ''),1); cdwp.tableRowClose; l_first:= false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue( r_etg.evt_name); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_etg.ent_id , p_type_of => 'ENT' ) , 1 , 180 ); cdwp.TableDataValue( cdwp.convertYnToCheck( r_etg.create_flag)); cdwp.TableDataValue( cdwp.convertYnToCheck( r_etg.update_flag)); cdwp.TableDataValue( cdwp.convertYnToCheck( r_etg.delete_flag)); cdwp.tableRowClose; end loop; -- r_etg if not l_first -- we did open the table and write some triggering events then cdwp.tableClose; htp.nl; -- 3.0 else -- nothing has been written yet -- should only be called if and when p_fun_id is a Business Rule -- without triggering Data Events if chk_static_br_no_etg ( p_fun_id => odwactxt.get_pac_irid ) ='Y' then etg_from_funent; end if; end if; end; -- summary_etg -- -- -- Remark: we could extend this function to actually return a list of Columns and Relationships to be -- displayed on the report function has_proper_data_usages ( p_br_irid in number , p_fun_irid in number ) return varchar2 is cursor c_funatt ( b_br_irid in number , b_fun_irid in number ) is select 'x' from dual where exists ( select 'x' from ci_function_attribute_usages funatt , ci_function_attribute_usages bratt where funatt.function_reference = b_fun_irid and funatt.attribute_reference = bratt.attribute_reference and bratt.function_reference = b_br_irid and funatt.update_flag = 'Y' and bratt.retrieve_flag = 'Y' ) ; r_funatt c_funatt%rowtype; begin open c_funatt( b_br_irid => p_br_irid , b_fun_irid => p_fun_irid ); fetch c_funatt into r_funatt; if c_funatt%found then close c_funatt; return 'Y'; else close c_funatt; return 'N'; end if; end; -- has_proper_data_usages -- -- procedure source_for_flows is l_first boolean:= true; l_ctr number(5):=0; begin cdwp.bookmark( 'SRCDFL'||to_char(odwactxt.get_pac_irid)); for r_srcdfl in c_srcdfl ( b_fun_ivid => odwactxt.get_pac_ivid ) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwp.add_images ( '{dataflow.gif}'||ROB_msg.getMsg(Rob_msg.DSP282_CDWP_FTBF, '', '', '', '') ) , p_attributes => 'ROWSPAN=3' ); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP283_CDWP_FLOWNAME, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP284_CDWP_TO, '', '', '', '') ,1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP285_CDWP_DESTFUN, '', '', '', ''),1); cdwp.TableDataValue('',1); cdwp.tableRowClose; l_first:= false; end if; cdwp.tableRowOpen; l_ctr:= l_ctr + 1; if l_ctr > 2 then cdwp.TableDataHeading(cdwpbase.nbsp(1)); end if; cdwp.TableDataValue( r_srcdfl.dfl_name,1, p_attributes=>'ALIGN="LEFT"'); cdwp.TableDataValue( cdwpbase.nbsp(4),1); cdwp.TableDataValue ( cdwp.report_link ( p_ivid => r_srcdfl.fun_ivid , p_type_of => 'FUN' , p_text => r_srcdfl.function_label ) ||cdwpbase.ifThenElse ( r_srcdfl.function_type is not null , ' ('||r_srcdfl.function_type||')' ) , 1 ); cdwp.TableDataValue( r_srcdfl.short_definition,1); cdwp.tableRowClose; end loop; -- r_srcdfl if not l_first then cdwp.tableClose; end if; end; -- source_for_flows procedure destination_for_flows is l_first boolean:= true; l_ctr number(5):=0; begin cdwp.bookmark( 'DSTDFL'||to_char(odwactxt.get_pac_irid)); for r_dstdfl in c_dstdfl ( b_fun_irid => odwactxt.get_pac_irid ) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwp.add_images ( '{dataflow.gif}'||ROB_msg.getMsg(Rob_msg.DSP282_CDWP_FTBF, '', '', '', '') ) , p_attributes => 'ROWSPAN=3' ); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP283_CDWP_FLOWNAME, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP286_CDWP_FROM, '', '', '', '') ,1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.DSP287_CDWP_SOURCEFUN, '', '', '', ''),1); cdwp.TableDataValue('',1); cdwp.tableRowClose; l_first:= false; end if; cdwp.tableRowOpen; l_ctr:= l_ctr + 1; if l_ctr > 2 then cdwp.TableDataHeading(cdwpbase.nbsp(1)); end if; cdwp.TableDataValue( r_dstdfl.dfl_name,1, p_attributes=>'ALIGN="LEFT"'); cdwp.TableDataValue( cdwpbase.nbsp(4),1); cdwp.TableDataValue ( cdwp.report_link ( p_ivid => r_dstdfl.fun_ivid , p_type_of => 'FUN' , p_text => r_dstdfl.function_label ) ||cdwpbase.ifThenElse ( r_dstdfl.function_type is not null , ' ('||r_dstdfl.function_type||')' ) , 1 ); cdwp.TableDataValue( r_dstdfl.short_definition,1); cdwp.tableRowClose; end loop; -- r_srcdfl if not l_first then cdwp.tableClose; end if; end; -- destination_for_flows -- procedure triggered_business_rules ( p_fun_name in varchar2 , p_br in varchar2 -- Y or N ) is l_first boolean; begin l_first := true; cdwp.bookmark ( cdwpbase.ifThenElse ( p_br = 'Y' , 'BRTRG' , 'FUNTRG' ) ||to_char(odwactxt.get_pac_irid) ); -- for r_funtrg in c_funtrg ( b_fun_ivid => odwactxt.get_pac_ivid , b_br => p_br ) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwpbase.ifThenElse ( p_br = 'Y' , cdwp.add_images ( '{'||cdwpbase.get_icon('RULE') ||'} '||ROB_msg.getMsg(Rob_msg.DSP138_CDWP_TBR, '', '', '', '') ) , cdwp.add_images ( '{'||FUN_ICON||'}' ||' '||ROB_msg.getMsg(Rob_msg.DSP139_CDWP_TBF, '', '', '', '') ) ) ); cdwp.TableDataValue('on
'||ROB_msg.getMsg(Rob_msg.CAP011_CDWP_CREATE, '', '', '', ''), 1, 45); cdwp.TableDataValue('
'||ROB_msg.getMsg(Rob_msg.CAP013_CDWP_UPDATE, '', '', '', '') , 1, 45); cdwp.TableDataValue('
'||ROB_msg.getMsg(Rob_msg.CAP014_CDWP_DELETE, '', '', '', '') , 1, 45); cdwp.TableDataValue('
'||ROB_msg.getMsg(Rob_msg.CAP0169_CDWP_OFENTITY, '', '', '', '') , 1); cdwp.TableDataValue ( '
these ' ||cdwpbase.ifThenElse ( p_br ='Y' , ROB_msg.getMsg(Rob_msg.DSP260_CDWP_BRULE, '', '', '', '') , ROB_msg.getMsg(Rob_msg.DSP268_CDWP_BFUNCTION, '', '', '', '') ) ||ROB_msg.getMsg(Rob_msg.DSP269_CDWP_TRIGGERED, '', '', '', '') ||ROB_msg.getMsg(Rob_msg.DSP288_CDWP_BY, '', '', '', '')||p_fun_name -- at the moment not via echo_meta.el(odwactxt.get_pac_irid, '1000') (doesn't work) , 1 , p_colspan => 2 ); cdwp.tableRowClose; l_first := false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(''); cdwp.TableDataValue(cdwp.convertYnToCheck(r_funtrg.create_flag), 1, 45); if r_funtrg.no_etg ='N' -- link to BR with no Data Events then cdwp.TableDataValue(cdwp.convertYnToCheck(r_funtrg.update_flag), 1, 45); else cdwp.TableDataValue ( cdwp.convertYnToCheck ( has_proper_data_usages ( p_br_irid => r_funtrg.fun_id , p_fun_irid => odwactxt.get_pac_irid ) ) , 1 , 45 ); end if; cdwp.TableDataValue(cdwp.convertYnToCheck( r_funtrg.delete_flag), 1, 45); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_funtrg.ent_id , p_type_of => 'ENT' ) , 1 ); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_funtrg.fun_id , p_text => r_funtrg.fun_function_label , p_type_of => 'BR' ) , 1 ); cdwp.TableDataValue ( r_funtrg.fun_short_definition ||cdwpbase.ifThenElse -- 3.0 ( r_funtrg.no_etg ='Y' , ' (Implicitly)' ) , 1 ); cdwp.tableRowClose; end loop; -- r_funtrg if not l_first then cdwp.tableClose; htp.nl; end if; end; -- triggered_business_rules -- procedure implicitly_triggered_by ( p_br in varchar2 -- Y or N ) is l_first boolean; begin l_first := true; cdwp.bookmark ( cdwpbase.ifThenElse ( p_br = 'Y' , 'ITRGBR' , 'ITRGFUN' ) ||to_char(odwactxt.get_pac_irid) ); -- for r_trgfun in c_trgfun ( b_fun_ivid => odwactxt.get_pac_ivid , b_br => p_br ) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp.TableDataHeading ( cdwpbase.ifThenElse ( p_br = 'Y' , cdwp.add_images ( '{'||cdwpbase.get_icon('RULE') ||'} '||ROB_msg.getMsg(Rob_msg.DSP289_CDWP_ITBBR, '', '', '', '') ) , cdwp.add_images ( '{'||FUN_ICON||'}' ||ROB_msg.getMsg(Rob_msg.DSP290_CDWP_ITBBF, '', '', '', '') ) ) ); cdwp.TableDataValue('on
'||ROB_msg.getMsg(Rob_msg.CAP011_CDWP_CREATE, '', '', '', ''), 1, 45); cdwp.TableDataValue('
'||ROB_msg.getMsg(Rob_msg.CAP013_CDWP_UPDATE, '', '', '', '') , 1, 45); cdwp.TableDataValue('
'||ROB_msg.getMsg(Rob_msg.CAP014_CDWP_DELETE, '', '', '', '') , 1, 45); cdwp.TableDataValue('
'||ROB_msg.getMsg(Rob_msg.CAP0169_CDWP_OFENTITY, '', '', '', '') , 1); cdwp.TableDataValue ( '
these ' ||cdwpbase.ifThenElse ( p_br ='Y' , ROB_msg.getMsg(Rob_msg.DSP260_CDWP_BRULE, '', '', '', '') , ROB_msg.getMsg(Rob_msg.DSP268_CDWP_BFUNCTION, '', '', '', '') ) ||ROB_msg.getMsg(Rob_msg.DSP291_CDWP_AREIT, '', '', '', '') ||jr_name.get_crn_from_ivid(i_ivid => odwactxt.get_pac_ivid,format => 'NAME') , 1 , p_colspan => 2 ); cdwp.tableRowClose; l_first := false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(''); cdwp.TableDataValue(cdwp.convertYnToCheck(r_trgfun.create_flag), 1, 45); if r_trgfun.no_etg ='N' -- link to BR with no Data Events then cdwp.TableDataValue(cdwp.convertYnToCheck(r_trgfun.update_flag), 1, 45); else cdwp.TableDataValue ( cdwp.convertYnToCheck ( has_proper_data_usages ( p_br_irid => r_trgfun.fun_id , p_fun_irid => odwactxt.get_pac_irid ) ) , 1 , 45 ); end if; cdwp.TableDataValue(cdwp.convertYnToCheck( r_trgfun.delete_flag), 1, 45); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_trgfun.ent_id , p_type_of => 'ENT' ) , 1 ); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_trgfun.fun_id , p_text => r_trgfun.fun_function_label ) , 1 ); cdwp.TableDataValue ( r_trgfun.fun_short_definition ||cdwpbase.ifThenElse -- 3.0 ( r_trgfun.no_etg ='Y' , ' (Implicitly)' ) , 1 ); cdwp.tableRowClose; end loop; -- r_funtrg if not l_first then cdwp.tableClose; htp.nl; end if; end; -- implicitly_triggered_by -- -- procedure summary_evtfun is l_first boolean:= true; begin cdwp.bookmark( 'EVTFUN'||to_char(odwactxt.get_pac_irid)); for r_evtfun in c_evtfun(odwactxt.get_pac_irid) loop if l_first then cdwp.tableOpen('BORDER="0"'); cdwp.TableDataHeading ( cdwp.add_images( '{'||EVT_ICON||'} '||ROB_msg.getMsg(Rob_msg.CAP0166_CDWP_TRIGEVENTFUN, '', '', '', '')) ); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP0167_CDWP_TRIGFUN, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP010_CDWP_SHORTDEF, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP036_CDWP_TRIGEVENTS, '', '', '', ''),1); cdwp.TableDataValue(ROB_msg.getMsg(Rob_msg.CAP0168_CDWP_EVENTTYPE, '', '', '', ''),1); cdwp.tableRowClose; l_first:= false; end if; cdwp.tableRowOpen; cdwp.TableDataHeading(' '); cdwp.TableDataValue ( cdwpbase.ifThenElse ( r_evtfun.fun_id is not null , cdwp.report_link ( p_el_id => r_evtfun.fun_id , p_el_name => r_evtfun.function_label , p_type_of => 'FUN' , p_text => r_evtfun.function_label ) ) ); cdwp.TableDataValue( r_evtfun.short_definition,1); cdwp.TableDataValue( r_evtfun.evt_name,1); cdwp.TableDataValue( r_evtfun.event_type,1); cdwp.tableRowClose; end loop; -- r_evtfun if not l_first then cdwp.tableClose; htp.nl; end if; end; -- summary_evtfun -- -- procedure summary_modfun_definitions is -- -- cursor to select Module Function Mappings for a specific Business Function -- cursor c_modfun ( b_fun_irid in number ) is select /*+ RULE */ modfun.irid id , mde.irid mde_id , mde.irid mde_irid , mde.ivid mde_ivid , modfun.remark modfun_remark , mde.short_name mod_short_name , mde.name mod_name , mde.PLSQL_MODULE_TYPE plm_PLSQL_MODULE_TYPE , mde.General_MODULE_TYPE mde_general_MODULE_TYPE , mde.candidate_flag mod_candidate_flag , lan.name lan_name from i$sdd_lan lan , i$sdd_mod mde -- contains both PLM and GEM , i$sdd_modfun modfun where modfun.function_ref = b_fun_irid and modfun.module_ref = mde.irid and mde.language_ref = lan.irid(+) and nvl(lan.ivid,0) = nvl(cdwpbase.get_best_ivid( lan.irid),0) and mde.ivid = cdwpbase.get_best_ivid( mde.irid) and modfun.parent_ivid = mde.ivid order by mde.short_name , mde.name ; -- l_first boolean; begin cdwp.bookmark('MODFUN'||to_char(odwactxt.get_pac_irid)); -- BOOKMARK cdwp.tableOpen('BORDER="0"'); -- l_first := true; for r_modfun in c_modfun( b_fun_irid => odwactxt.get_pac_irid) loop if l_first then cdwp.tableRowOpen; cdwp.TableDataHeading(cdwp.add_images('{module.gif}')||ROB_msg.getMsg(Rob_msg.DSP292_CDWP_IMPLBY, '', '', '', '')); l_first:= false; cdwp.tableRowClose; end if; -- cdwp.tableRowOpen; cdwp.TableDataValue('', 1); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_modfun.mde_id , p_ivid => r_modfun.mde_ivid , p_text => cdwp.add_images ( '{' ||cdwpbase.ifThenElse ( r_modfun.plm_plsql_module_type is null , cdwp_mde.get_module_icon_name ( p_candidate_flag => r_modfun.mod_candidate_flag , p_general_module_type => r_modfun.mde_general_module_type , p_lan_name => r_modfun.lan_name ) , cdwp_plm.get_plm_icon_name ( p_plsql_module_type => r_modfun.plm_plsql_module_type ) ) ||'}' ) -- 2.4 ||r_modfun.mod_short_name||' - '||r_modfun.mod_name ) ); cdwp.tableRowClose; end loop; -- r_modfun if not l_first then cdwp.tableClose; htp.nl; end if; htp.print(''); cdwp.tableRowClose; end; -- summary_modfun_definitions -- -- function has_brfuntrg ( p_br in varchar2 -- BR (Y) or Fun (N) ) return boolean is r_funtrg c_funtrg%ROWTYPE; begin open c_funtrg ( b_fun_ivid => odwactxt.get_pac_ivid , b_br => p_br ); fetch c_funtrg into r_funtrg; if c_funtrg%found then close c_funtrg; return true; else close c_funtrg; return false; end if; end; -- has_brfuntrg function has_trgbrfun ( p_br in varchar2 -- BR (Y) or Fun (N) ) return boolean is r_trgfun c_trgfun%ROWTYPE; begin open c_trgfun ( b_fun_ivid => odwactxt.get_pac_ivid , b_br => p_br ); fetch c_trgfun into r_trgfun; if c_trgfun%found then close c_trgfun; return true; else close c_trgfun; return false; end if; end; -- has_trgbrfun function has_srcdfl return boolean is r_srcdfl c_srcdfl%rowtype; begin open c_srcdfl ( b_fun_ivid => odwactxt.get_pac_ivid ); fetch c_srcdfl into r_srcdfl; if c_srcdfl%found then close c_srcdfl; return true; else close c_srcdfl; return false; end if; end; -- has_srcdfl function has_dstdfl return boolean is r_dstdfl c_dstdfl%rowtype; begin open c_dstdfl ( b_fun_irid => odwactxt.get_pac_irid ); fetch c_dstdfl into r_dstdfl; if c_dstdfl%found then close c_dstdfl; return true; else close c_dstdfl; return false; end if; end; -- has_dstdfl function has_etg return boolean is r_etg c_etg%rowtype; begin open c_etg ( b_fun_id => odwactxt.get_pac_irid ); fetch c_etg into r_etg; if c_etg%found then close c_etg; return true; else close c_etg; return false; end if; end; -- has_etg -- -- function has_funevt return boolean is r_funevt c_funevt%ROWTYPE; begin open c_funevt ( b_fun_id => odwactxt.get_pac_irid ); fetch c_funevt into r_funevt; if c_funevt%found then close c_funevt; return true; else close c_funevt; return false; end if; end; -- has_funevt function has_evtfun return boolean is r_evtfun c_evtfun%rowtype; begin open c_evtfun ( b_fun_id => odwactxt.get_pac_irid ); fetch c_evtfun into r_evtfun; if c_evtfun%found then close c_evtfun; return true; else close c_evtfun; return false; end if; end; -- has_evtfun -- -- -- procedure icon_bar is begin -- begin of icon bar odwarprt.init_short_cut_bar; cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; if odwaxist.exists_detail( p_pac_irid => odwactxt.get_pac_irid, p_el_type_of =>'FUNENT') then odwarprt.show_anchor ( p_anchor_name => 'FUNENT'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('ENT') , p_title =>' '||ROB_msg.getMsg(Rob_msg.CAP0164_CDWP_FEU, '', '', '', '') ); end if; if has_srcdfl then odwarprt.show_anchor ( p_anchor_name => 'SRCDFL'||to_char(odwactxt.get_pac_irid) , p_gif => cdwp.add_images('dataflow.gif') , p_title => ROB_msg.getMsg(Rob_msg.CAP0172_CDWP_DFTBF, '', '', '', '') ); end if; if has_dstdfl then odwarprt.show_anchor ( p_anchor_name => 'DSTDFL'||to_char(odwactxt.get_pac_irid) , p_gif => cdwp.add_images('dataflow.gif') , p_title => ROB_msg.getMsg(Rob_msg.CAP0173_CDWP_DFFBF, '', '', '', '') ); end if; if has_funevt then odwarprt.show_anchor ( p_anchor_name => 'FUNEVT'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('EVT') , p_title => ' '||ROB_msg.getMsg(Rob_msg.CAP0166_CDWP_TRIGEVENTFUN, '', '', '', '') ); end if; if has_etg then odwarprt.show_anchor ( p_anchor_name => 'EVT'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('EVT') , p_title => ' '||ROB_msg.getMsg(Rob_msg.DSP281_CDWP_TBDE, '', '', '', '') ); end if; if has_brfuntrg ( p_br => 'Y' ) then odwarprt.show_anchor ( p_anchor_name => 'BRTRG'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('RULE') , p_title => ' '||ROB_msg.getMsg(Rob_msg.DSP138_CDWP_TBR, '', '', '', '') ); end if; if has_brfuntrg ( p_br => 'N' ) then odwarprt.show_anchor ( p_anchor_name => 'FUNTRG'||to_char(odwactxt.get_pac_irid) , p_gif => FUN_ICON -- not via cdwpbase.get_icon , p_title => ROB_msg.getMsg(Rob_msg.DSP293_CDWP_INTBF, '', '', '', '') ); end if; if has_trgbrfun ( p_br => 'Y' ) then odwarprt.show_anchor ( p_anchor_name => 'ITRGBR'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('RULE') , p_title => ' '||ROB_msg.getMsg(Rob_msg.DSP289_CDWP_ITBBR, '', '', '', '') ); end if; if has_trgbrfun ( p_br => 'N' ) then odwarprt.show_anchor ( p_anchor_name => 'ITRGFUN'||to_char(odwactxt.get_pac_irid) , p_gif => FUN_ICON -- not via cdwpbase.get_icon , p_title => ' '||ROB_msg.getMsg(Rob_msg.DSP290_CDWP_ITBBF, '', '', '', '') ); end if; if has_evtfun then odwarprt.show_anchor ( p_anchor_name => 'EVTFUN'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('EVT') , p_title => ' '||ROB_msg.getMsg(Rob_msg.CAP0166_CDWP_TRIGEVENTFUN, '', '', '', '') ); end if; if odwaxist.exists_detail ( p_pac_irid => odwactxt.get_pac_irid , p_el_type_of => 'FUNBUN' ) then odwarprt.show_anchor ( p_anchor_name => 'FUNBUN'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('BUN') , p_title => ' '||ROB_msg.getMsg(Rob_msg.MSG218_CDWP_EBBU, '', '', '', '') ); end if; if odwaxist.exists_detail ( p_pac_irid => odwactxt.get_pac_irid , p_el_type_of => 'MODFUN' , p_ref_column => 'FUNCTION_REFERENCE' ) then odwarprt.show_anchor ( p_anchor_name => 'MODFUN'||to_char(odwactxt.get_pac_irid) , p_gif => cdwpbase.get_icon('MOD') , p_title => ' '||ROB_msg.getMsg(Rob_msg.DSP292_CDWP_IMPLBY, '', '', '', '')); end if; if odwaxist.exists_detail ( p_pac_irid => odwactxt.get_pac_irid , p_el_type_of => 'FUN' , p_ref_column => 'PARENT_REFERENCE' ) then odwarprt.show_anchor ( p_anchor_name => 'CHILD_FUN'||to_char(odwactxt.get_pac_irid) , p_gif => FUN_ICON -- not via get_icon , p_title =>' '||ROB_msg.getMsg(Rob_msg.MSG219_CDWP_CHILDFUN, '', '', '', '') ); end if; if odwaxist.exists_detail ( p_pac_irid => odwactxt.get_pac_irid , p_el_type_of => 'DEU' , p_ref_column => 'CIELEMENT_REFERENCE' ) then odwarprt.show_anchor ( p_anchor_name => 'DEU'||to_char(odwactxt.get_pac_irid) , p_gif => 'fh_diagram.gif' -- not via get_icon , p_title =>ROB_msg.getMsg(Rob_msg.DSP271_CDWP_INDIAGRAM, '', '', '', '')); end if; if cdwp.exists_mlt ( p_id => odwactxt.get_pac_ivid , p_not_include1 => 'CDIDSC' ) then odwarprt.show_anchor ( p_anchor_name => 'FUN_MLT'||to_char(odwactxt.get_pac_ivid) , p_gif => 'mlt.gif' -- not via get_icon , p_title =>' '||ROB_msg.getMsg(Rob_msg.DSP131_CDWP_MLT, '', '', '', '')); end if; cdwp.tableRowClose; cdwp.tableClose; htp.nl; end; -- icon_bar -- -- -- procedure list_business_functions ( p_session_id in number , p_irid in number default null , p_ivid in number default null ) is -- -- cursor to select function properties based on ivid -- 3.7 moved cursor from package level to procedure level: -- it is not used elsewhere in the package cursor c_fun ( b_fun_ivid in number ) is select /*+ RULE */ fun.id , fun.ivid , fun.irid , fun.function_label , fun.short_definition , fun.frequency , fun.frequency_unit , decode ( fun.response_needed , 'IMMEDIATE', 'Immediate' , 'OVERNIGHT', 'Overnight' , null , null , 'unknown' ) response_needed , fun.function_type , fun.parent_reference , fun.common_function_reference , decode(fun.elementary_flag, 'Y', 'True', 'False') elementary_flag , parent_fun.function_label parent_function_label , parent_fun.short_definition parent_short_definition from i$sdd_fun parent_fun , ci_functions fun where fun.ivid = b_fun_ivid and fun.parent_reference = parent_fun.irid and parent_fun.ivid = cdwpbase.get_best_ivid( parent_fun.irid) union -- 3.7 fix for issue 5: if fun does not have parent, -- it is selected with next statement select /*+ RULE */ fun.id , fun.ivid , fun.irid , fun.function_label , fun.short_definition , fun.frequency , fun.frequency_unit , decode ( fun.response_needed , 'IMMEDIATE', 'Immediate' , 'OVERNIGHT', 'Overnight' , null , null , 'unknown' ) response_needed , fun.function_type , fun.parent_reference , fun.common_function_reference , decode(fun.elementary_flag, 'Y', 'True', 'False') elementary_flag , null parent_function_label , null parent_short_definition from ci_functions fun where fun.ivid = b_fun_ivid and fun.parent_reference is null ; -- -- cursor to select properties of a specific business function -- cursor c_fun2 ( b_fun_irid in number ) is select fun.irid fun_id , fun.function_type fun_function_type , fun.function_label fun_function_label , fun.short_definition fun_short_definition from i$sdd_fun fun where fun.ivid = cdwpbase.get_best_ivid( b_fun_irid) ; r_fun2 c_fun2%rowtype; -- l_first boolean; l_business_rule boolean; begin -- list_business_functions -- if an ivid is passed in, that suggests we are going outside the workarea -- so in updating the context, the workarea id should be reset odwactxt.update_context ( p_session_id => p_session_id , p_package_name => PACKAGE_NAME , p_procedure_name=> 'list_business_functions' , p_pac_irid => p_irid , p_pac_ivid => p_ivid , p_pac_type_id => 5024 ); cdwpbase.start_timer; htp.htmlOpen; htp.headOpen; cdwp.include_report_styles; cdwp.write_about(package_name, revision_label); if odwactxt.get_one_file = 'Y' then htp.title ( cdwpbase.get_el_name ( p_el_id => odwactxt.get_folder_irid , p_el_type_of => 'APP' ) ||' - '||ROB_msg.getMsg(Rob_msg.DSP268_CDWP_BFUNCTION, '', '', '', '') ); else htp.title ( cdwpbase.get_el_name ( p_el_id => odwactxt.get_folder_irid , p_el_type_of => 'APP' ) ||' - '||ROB_msg.getMsg(Rob_msg.DSP268_CDWP_BFUNCTION, '', '', '', '')||' - ' ||cdwpbase.get_el_name( p_el_id => nvl(p_irid, cdwpbase.get_irid( p_ivid)), p_el_type_of => 'FUN') ); end if; -- odwactxt.get_one_file = 'Y' htp.headClose; htp.bodyOpen; if odwactxt.get_one_file = 'Y' then root_business_functions ( p_session_id => odwactxt.get_session_id ); htp.nl; htp.nl; htp.nl; end if; -- -- create detailed business function descriptions -- for r_fun in c_fun( b_fun_ivid => nvl( p_ivid, cdwpbase.get_ivid( p_irid => p_irid))) loop odwactxt.update_context ( p_pac_irid => r_fun.irid , p_pac_ivid => r_fun.ivid , p_new_request => false ); cdwpbase.set_base_url ( p_el_id => r_fun.irid , p_el_name => r_fun.function_label , p_type_of => 'FUN' ); -- if cdwp_chk_fun_is_business_rule ( r_fun.id , r_fun.function_label , r_fun.function_type ) = 'Y' then l_business_rule := true; else l_business_rule := false; end if; cdwp.menu_bar ( p_level => 2 , p_el_short_name => 'FUN' , p_el_id => r_fun.id ); cdwp.heading(3); cdwp.bookmark(r_fun.function_label); cdwp.p ( r_fun.function_label||' - '||r_fun.short_definition , p_style => 'partitle' ); htp.nl; -- icon_bar; -- cdwp.tableOpen('BORDER="0"'); odwavrsn.version_status; cdwpbase.app_summary ( p_el_id => r_fun.id ); cdwp.tableRowOpen; cdwp.TableDataHeading(ROB_msg.getMsg(Rob_msg.CAP0174_CDWP_ELEMENT, '', '', '', '')); cdwp.TableDataValue(r_fun.elementary_flag); cdwp.tableRowClose; -- cdwp_txt.display_mlt ( p_el_id => r_fun.id , p_txt_type => 'CDIDSC' , p_mlt_prompt_name => null , p_max_lines => null , p_el_type => 'FUN' ); -- -- parent function -- if r_fun.parent_reference is not null then cdwp.tableRowOpen; -- 3.10 changed layout similar to Master function cdwp.TableDataHeading(ROB_msg.getMsg(Rob_msg.CAP0175_CDWP_PARENTFUN, '', '', '', '')); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_fun.parent_reference , p_type_of => 'FUN' , p_text => '{gif}' ||r_fun.parent_function_label ||' - ' ||r_fun.parent_short_definition ) ); cdwp.tableRowClose; end if; -- -- common function -- if r_fun.common_function_reference is not null then open c_fun2(b_fun_irid => r_fun.common_function_reference); fetch c_fun2 into r_fun2; if c_fun2%found then cdwp.tableRowOpen; cdwp.TableDataHeading(ROB_msg.getMsg(Rob_msg.CAP030_CDWP_MASTERFUN, '', '', '', '')); cdwp.TableDataValue ( cdwp.report_link ( p_el_id => r_fun2.fun_id , p_text => '{gif}' ||r_fun2.fun_function_label ||' - ' ||r_fun2.fun_short_definition ) ); cdwp.tableRowClose; end if; close c_fun2; end if; -- r_fun.common_function_reference is not null -- -- frequency -- if nvl(r_fun.frequency,0) <> 0 or r_fun.frequency_unit is not null then cdwp.tableRowOpen; cdwp.TableDataHeading(ROB_msg.getMsg(Rob_msg.CAP031_CDWP_FREQ, '', '', '', '')); cdwp.TableDataValue(to_char(r_fun.frequency)||' / '||r_fun.frequency_unit); cdwp.tableRowClose; end if; -- -- response needed -- if r_fun.response_needed is not null then cdwp.tableRowOpen; cdwp.TableDataHeading(ROB_msg.getMsg(Rob_msg.CAP032_CDWP_RESPONSEREQ, '', '', '', '')); cdwp.TableDataValue(r_fun.response_needed); cdwp.tableRowClose; end if; cdwp.tableClose; htp.print(''); -- summary_childfun; -- summary_funent; source_for_flows; destination_for_flows; -- summary_funevt; -- summary_etg; -- triggered_business_rules ( p_fun_name => r_fun.function_label , p_br => 'Y' ); -- triggered_business_rules ( p_fun_name => r_fun.function_label , p_br => 'N' ); -- summary_evtfun; -- summary_funbun_definitions; -- summary_modfun_definitions; -- cdwp_dia.list_in_diagrams ( p_el_id => r_fun.id ); -- cdwp.bookmark('FUN_MLT'||to_char(r_fun.irid)); -- BOOKMARK cdwp.tableOpen('BORDER="0"'); cdwp.tableRowOpen; cdwp_txt.display_all_mlt ( p_el_id => r_fun.irid , p_max_lines => null , p_do_not_display1 => 'CDIDSC' , p_el_type => 'FUN' ); cdwp.tableRowClose; cdwp.tableClose; end loop; -- r_fun htp.formopen ( curl => 'none' , cmethod => 'POST' , cattributes => 'NAME="timing" ' , ctarget => '' ); htp.p ( ' ' ); htp.formClose; htp.bodyClose; htp.htmlClose; end list_business_functions; begin null; end; /