19: ( enable_routine FND_DEBUG_OPTION_VALUES.enable_routine%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
20: disable_routine FND_DEBUG_OPTION_VALUES.disable_routine%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
21: debug_option_name FND_DEBUG_RULE_OPTIONS.debug_option_name%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
22: debug_option_value FND_DEBUG_RULE_OPTIONS.debug_option_value%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
23: debug_rule_id FND_DEBUG_RULES.debug_rule_id%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
24: repeation_counter FND_DEBUG_RULES.repeation_counter%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
25: start_time FND_DEBUG_RULES.start_time%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
26: end_time FND_DEBUG_RULES.end_time%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
27: user_id FND_DEBUG_RULES.user_id%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
28: responsibility_id FND_DEBUG_RULES.responsibility_id%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
29: resp_appl_id FND_DEBUG_RULES.resp_appl_id%TYPE,
30: component_type FND_DEBUG_RULES.component_type%TYPE,
31: component_name FND_DEBUG_RULES.component_name%TYPE,
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
32: component_id FND_DEBUG_RULES.component_id%TYPE,
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
38: );
39:
40: -- Exceptions
33: component_appl_id FND_DEBUG_RULES.component_appl_id%TYPE,
34: trace_file_routine FND_DEBUG_OPTION_VALUES.trace_file_routine%TYPE,
35: trace_file_node FND_DEBUG_OPTION_VALUES.trace_file_node%TYPE,
36: comments FND_DEBUG_RULES.comments%TYPE,
37: reqid FND_DEBUG_RULES.request_id%TYPE
38: );
39:
40: -- Exceptions
41:
85: end_time, user_id, responsibility_id, resp_appl_id, component_type,
86: component_name, component_id, component_appl_id,
87: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
88: from fnd_debug_options DO,
89: fnd_debug_rules DR,
90: fnd_debug_option_values DOV,
91: fnd_debug_rule_options DRO
92: where ( DR.user_id = userid
93: OR (DR.responsibility_id = respid
105: AND DO.type = 'D'
106: AND DO.enabled_flag = 'Y'
107: AND ((DR.request_id is not null AND reqid = DR.request_id) OR (DR.request_id is null) )
108: AND DR.debug_rule_id = DRO.debug_rule_id
109: AND DR.debug_rule_id=(SELECT min(debug_rule_id) FROM fnd_debug_rules IDR
110: WHERE (IDR.user_id = userid
111: OR (IDR.responsibility_id = respid
112: AND IDR.Resp_appl_id = respapplid )
113: OR (IDR.user_id IS NULL AND IDR.Responsibility_ID IS NULL) )
133: end_time, user_id, responsibility_id, resp_appl_id, component_type,
134: component_name, component_id, component_appl_id,
135: trace_file_routine, trace_file_node, comments, nvl(request_id,0) reqid
136: from fnd_debug_options DO,
137: fnd_debug_rules DR,
138: fnd_debug_option_values DOV,
139: fnd_debug_rule_options DRO
140: where ( DR.user_id = userid
141: OR (DR.responsibility_id = respid
151: AND DO.type = 'D'
152: AND DO.enabled_flag = 'Y'
153: AND DR.request_id is null
154: AND DR.debug_rule_id = DRO.debug_rule_id
155: AND DR.debug_rule_id=(SELECT min(debug_rule_id) FROM fnd_debug_rules IDR
156: WHERE (IDR.user_id = userid
157: OR (IDR.responsibility_id = respid
158: AND IDR.Resp_appl_id = respapplid )
159: OR (IDR.user_id IS NULL AND IDR.Responsibility_ID IS NULL) )
182: respapplid number;
183: loginid number;
184: dr_rec rule_select_rec;
185: last_rule_id number;
186: repetition_counter FND_DEBUG_RULES.repeation_counter%TYPE := 0; -- repetition_counter is the number of actual occurances for a rule
187: begin
188:
189: RULEC := 0;
190: P_RULES := empty_drules;
295: dr_rec.comments, req_id); --Added for Bug 3788285.For showing request_id
296:
297:
298: -- decrement repeation_counter if there are some more to run
299: -- else delete the row from fnd_debug_rules
300: -- If it is time based then repeation_counter will be null.
301: IF (last_rule_id <> dr_rec.debug_rule_id) THEN
302: BEGIN
303: left_iterations := NVL(dr_rec.repeation_counter, 0) - 1;
301: IF (last_rule_id <> dr_rec.debug_rule_id) THEN
302: BEGIN
303: left_iterations := NVL(dr_rec.repeation_counter, 0) - 1;
304: IF ( left_iterations >= 1 ) THEN
305: UPDATE fnd_debug_rules
306: SET repeation_counter = repeation_counter -1,
307: last_update_date = sysdate
308: WHERE debug_rule_id = dr_rec.debug_rule_id;
309: ELSIF (left_iterations = 0 ) THEN
307: last_update_date = sysdate
308: WHERE debug_rule_id = dr_rec.debug_rule_id;
309: ELSIF (left_iterations = 0 ) THEN
310: BEGIN
311: UPDATE fnd_debug_rules
312: SET repeation_counter = 0,
313: last_update_date = sysdate
314: WHERE debug_rule_id = dr_rec.debug_rule_id;
315: END;
330: end if;
331:
332: -- delete any old rules as a fix for bug 3787995
333: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN
334: (SELECT debug_rule_id FROM fnd_debug_rules
335: WHERE (start_time IS NOT NULL AND end_time < sysdate)
336: OR (repeation_counter = 0)
337: );
338:
335: WHERE (start_time IS NOT NULL AND end_time < sysdate)
336: OR (repeation_counter = 0)
337: );
338:
339: DELETE FROM fnd_debug_rules
340: WHERE (start_time IS NOT NULL AND end_time < sysdate)
341: OR (repeation_counter = 0);
342:
343: commit;
451: component_type, component_name, component_id, component_appl_id,
452: trace_file_routine, trace_file_node, comments,
453: nvl(request_id,0) reqid
454: from fnd_debug_options DO,
455: fnd_debug_rules DR,
456: fnd_debug_option_values DOV,
457: fnd_debug_rule_options DRO
458: where ( DR.user_id = uid
459: OR (DR.responsibility_id = respid
484: trans_id number;
485: log_file varchar2(250);
486: node_name varchar2(250);
487: db_rule_enabled varchar2(1);
488: repetition_counter FND_DEBUG_RULES.repeation_counter%TYPE := 0;
489:
490: begin
491: debug_str := '';
492: -- find any debug rules available for this component instance.
585: END; --check whether any of the db rule is enabled or not
586:
587: -- decrement repeation_counter if no db rules are enabled and
588: -- if there are some more to run
589: -- else delete the row from fnd_debug_rules
590: -- If it is time based then repeation_counter will be null.
591: -- added the check as a fix for bug 3787995
592: IF (db_rule_enabled='F') THEN --if none of db rules are enabled
593: BEGIN
592: IF (db_rule_enabled='F') THEN --if none of db rules are enabled
593: BEGIN
594: left_iterations := nvl(dr_rec.repeation_counter,0) - 1;
595: IF ( left_iterations >= 1 ) THEN
596: UPDATE fnd_debug_rules
597: SET repeation_counter = repeation_counter -1,
598: last_update_date = sysdate
599: WHERE debug_rule_id = dr_rec.debug_rule_id;
600: ELSIF (left_iterations = 0 ) THEN
598: last_update_date = sysdate
599: WHERE debug_rule_id = dr_rec.debug_rule_id;
600: ELSIF (left_iterations = 0 ) THEN
601: BEGIN
602: UPDATE fnd_debug_rules
603: SET repeation_counter = 0,
604: last_update_date = sysdate
605: WHERE debug_rule_id = dr_rec.debug_rule_id;
606: END;
614:
615: -- delete any old rules as a fix for bug 3787995
616: DELETE FROM fnd_debug_rule_options WHERE debug_rule_id IN
617: (SELECT debug_rule_id
618: FROM fnd_debug_rules
619: WHERE (start_time IS NOT NULL AND end_time < sysdate)
620: OR (repeation_counter = 0)
621: );
622:
619: WHERE (start_time IS NOT NULL AND end_time < sysdate)
620: OR (repeation_counter = 0)
621: );
622:
623: DELETE FROM fnd_debug_rules
624: WHERE (start_time IS NOT NULL AND end_time < sysdate)
625: OR (repeation_counter = 0);
626:
627: