1: PACKAGE BODY hri_bpl_conc_log AS
2: /* $Header: hribcncl.pkb 120.5 2006/06/05 12:38:41 anmajumd noship $ */
3: --
4: -- Array type of hri_adm_msg_log row
5: --
6: TYPE g_msg_log_array_type IS TABLE OF hri_adm_msg_log%rowtype INDEX BY BINARY_INTEGER;
7: --
8: -- Global array to store the information that is to be inserted in hri_adm_msg_log
2: /* $Header: hribcncl.pkb 120.5 2006/06/05 12:38:41 anmajumd noship $ */
3: --
4: -- Array type of hri_adm_msg_log row
5: --
6: TYPE g_msg_log_array_type IS TABLE OF hri_adm_msg_log%rowtype INDEX BY BINARY_INTEGER;
7: --
8: -- Global array to store the information that is to be inserted in hri_adm_msg_log
9: --
10: g_msg_log_array g_msg_log_array_type;
4: -- Array type of hri_adm_msg_log row
5: --
6: TYPE g_msg_log_array_type IS TABLE OF hri_adm_msg_log%rowtype INDEX BY BINARY_INTEGER;
7: --
8: -- Global array to store the information that is to be inserted in hri_adm_msg_log
9: --
10: g_msg_log_array g_msg_log_array_type;
11: --
12: -- To store the index in the global array at which the process infromation will be stored
549: )
550: IS
551: --
552: -- The variable to store the message log id for the table
553: -- hri_adm_msg_log. The id is generated froma sequence
554: --
555: l_msg_log_id NUMBER;
556: --
557: BEGIN
575: END IF;
576: --
577: -- Get the next message log id from the sequence
578: --
579: SELECT hri_adm_msg_log_s.nextval
580: INTO l_msg_log_id
581: FROM dual;
582: --
583: -- Increment the array index at which the infromation is stored
585: g_index := g_index+1;
586: --
587: -- Store the log information generated by the HRI process in a global array
588: -- The information stored in this array will be flushed into the
589: -- hri_adm_msg_log table when the procedure log_process_end will be
590: -- called
591: --
592: g_msg_log_array(g_index).msg_log_id := l_msg_log_id;
593: g_msg_log_array(g_index).msg_type := p_msg_type;
613: --
614: END log_process_info;
615: --
616: -- Flush the process infromation stored in the global array into
617: -- the hri_adm_msg_log table
618: --
619: PROCEDURE flush_process_info(p_package_name IN VARCHAR2) IS
620:
621: BEGIN
635: IF (g_index > 0 AND
636: g_logging = 'Y') THEN
637: --
638: -- Insert all the messages stored in the global
639: -- array into the table hri_adm_msg_log
640: --
641: FOR i IN 1..g_index LOOP
642: INSERT INTO hri_adm_msg_log
643: (msg_log_id
638: -- Insert all the messages stored in the global
639: -- array into the table hri_adm_msg_log
640: --
641: FOR i IN 1..g_index LOOP
642: INSERT INTO hri_adm_msg_log
643: (msg_log_id
644: ,mthd_action_id
645: ,msg_type
646: ,package_name
734: )
735: IS
736: --
737: -- Variable to identify if and error has been logged in
738: -- hri_adm_msg_log
739: --
740: l_error VARCHAR2(5);
741: --
742: -- Variable to store the status of the process
749: SELECT 'Y'
750: FROM dual
751: WHERE EXISTS
752: (SELECT null
753: FROM hri_adm_msg_log
754: WHERE mthd_action_id = v_mthd_action_id
755: AND msg_type in ('ERROR','WARNING'));
756: --
757: BEGIN
792: --
793: END IF;
794: --
795: -- Flush the process infromation stored in the global array into
796: -- the hri_adm_msg_log table
797: --
798: flush_process_info
799: (p_package_name => p_package_name);
800: