196: ---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
197: -----@Propagate_deleted_flag_for_global_entities
198: -----@This procedure handles the propagation of deleted flag for global entities
199: -----@global entities are global rules, actions, texts that are referred in
200: -----@global templates. The global entities are stored in the table cz_ui_template_elements.
201: -----@The element type in the table cz_ui_template_elements are as follows:
202: -----@ element_type : 33,34,700 --- rule_id (cz_rules)
203: -----@ element_type : 8 --- caption text (cz_localized_texts)
204: -----@ element_type : 522 --- ui action (cz_ui_actions)
197: -----@Propagate_deleted_flag_for_global_entities
198: -----@This procedure handles the propagation of deleted flag for global entities
199: -----@global entities are global rules, actions, texts that are referred in
200: -----@global templates. The global entities are stored in the table cz_ui_template_elements.
201: -----@The element type in the table cz_ui_template_elements are as follows:
202: -----@ element_type : 33,34,700 --- rule_id (cz_rules)
203: -----@ element_type : 8 --- caption text (cz_localized_texts)
204: -----@ element_type : 522 --- ui action (cz_ui_actions)
205:
305:
306:
307:
308: -----For each template id in the array l_gl_template_tbl, collect element id(s)
309: -----and element types from cz_ui_template_elements that have seeded_flag = '0'
310: IF (l_gl_template_tbl.COUNT > 0) THEN
311: l_element_id_ref.DELETE;
312: l_element_type_ref.DELETE;
313: l_templ_id_ref.DELETE;
319: SELECT element_id,element_type,template_id
320: BULK
321: COLLECT
322: INTO l_element_id_tbl,l_element_type_tbl,l_templ_id_tbl
323: FROM cz_ui_template_elements
324: WHERE cz_ui_template_elements.template_id = l_gl_template_tbl(i)
325: AND cz_ui_template_elements.seeded_flag = '0';
326:
327: IF (l_element_id_tbl.COUNT > 0) THEN
320: BULK
321: COLLECT
322: INTO l_element_id_tbl,l_element_type_tbl,l_templ_id_tbl
323: FROM cz_ui_template_elements
324: WHERE cz_ui_template_elements.template_id = l_gl_template_tbl(i)
325: AND cz_ui_template_elements.seeded_flag = '0';
326:
327: IF (l_element_id_tbl.COUNT > 0) THEN
328: rec_count := l_element_id_ref.COUNT;
321: COLLECT
322: INTO l_element_id_tbl,l_element_type_tbl,l_templ_id_tbl
323: FROM cz_ui_template_elements
324: WHERE cz_ui_template_elements.template_id = l_gl_template_tbl(i)
325: AND cz_ui_template_elements.seeded_flag = '0';
326:
327: IF (l_element_id_tbl.COUNT > 0) THEN
328: rec_count := l_element_id_ref.COUNT;
329: FOR J IN l_element_id_tbl.FIRST..l_element_id_tbl.LAST
334: l_templ_id_ref(rec_count) := l_templ_id_tbl(j);
335: END LOOP;
336: END IF;
337:
338: UPDATE cz_ui_template_elements
339: SET deleted_flag = '1'
340: WHERE template_id = l_gl_template_tbl(i)
341: AND seeded_flag = '0';
342: