[Home] [Help]
PACKAGE BODY: APPS.AME_ACTION_SWI
Source
1 Package Body ame_action_swi As
2 /* $Header: amatyswi.pkb 120.0 2005/09/02 03:53 mbocutt noship $ */
3 --
4 -- Package variables
5 --
6 g_package varchar2(33) := 'ame_action_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_ame_action_type >------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_ame_action_type
12 (p_validate in number default hr_api.g_false_num
13 ,p_language_code in varchar2 default null
14 ,p_name in varchar2
15 ,p_procedure_name in varchar2
16 ,p_dynamic_description in varchar2
17 ,p_description in varchar2
18 ,p_description_query in varchar2 default null
19 ,p_rule_type in number default null
20 ,p_approver_type_id in number default null
21 ,p_action_type_id in number
22 ,p_aty_object_version_number out nocopy number
23 ,p_aty_start_date out nocopy date
24 ,p_aty_end_date out nocopy date
25 ,p_apu_object_version_number out nocopy number
26 ,p_apu_start_date out nocopy date
27 ,p_apu_end_date out nocopy date
28 ,p_return_status out nocopy varchar2
29 ) is
30 --
31 -- Variables for API Boolean parameters
32 l_validate boolean;
33 --
34 -- Variables for IN/OUT parameters
35 --
36 -- Other variables
37 l_action_type_id number;
38 l_proc varchar2(72) := g_package ||'create_ame_action_type';
39 Begin
40 hr_utility.set_location(' Entering:' || l_proc,10);
41 --
42 -- Issue a savepoint
43 --
44 savepoint create_ame_act_type_swi;
45 --
46 -- Initialise Multiple Message Detection
47 --
48 hr_multi_message.enable_message_list;
49 --
50 -- Remember IN OUT parameter IN values
51 --
52 --
53 -- Convert constant values to their corresponding boolean value
54 --
55 l_validate :=
56 hr_api.constant_to_boolean
57 (p_constant_value => p_validate);
58 --
59 -- Register Surrogate ID or user key values
60 --
61 ame_aty_ins.set_base_key_value
62 (p_action_type_id => p_action_type_id
63 );
64 --
65 -- Call API
66 --
67 ame_action_api.create_ame_action_type
68 (p_validate => l_validate
69 ,p_language_code => p_language_code
70 ,p_name => p_name
71 ,p_procedure_name => p_procedure_name
72 ,p_dynamic_description => p_dynamic_description
73 ,p_description => p_description
74 ,p_description_query => p_description_query
75 ,p_rule_type => p_rule_type
76 ,p_approver_type_id => p_approver_type_id
77 ,p_action_type_id => l_action_type_id
78 ,p_aty_object_version_number => p_aty_object_version_number
79 ,p_aty_start_date => p_aty_start_date
80 ,p_aty_end_date => p_aty_end_date
81 ,p_apu_object_version_number => p_apu_object_version_number
82 ,p_apu_start_date => p_apu_start_date
83 ,p_apu_end_date => p_apu_end_date
84 );
85 --
86 -- Convert API warning boolean parameter values to specific
87 -- messages and add them to Multiple Message List
88 --
89 --
90 -- Convert API non-warning boolean parameter values
91 --
92 --
93 -- Derive the API return status value based on whether
94 -- messages of any type exist in the Multiple Message List.
95 -- Also disable Multiple Message Detection.
96 --
97 p_return_status := hr_multi_message.get_return_status_disable;
98 hr_utility.set_location(' Leaving:' || l_proc,20);
99 --
100 exception
101 when hr_multi_message.error_message_exist then
102 --
103 -- Catch the Multiple Message List exception which
104 -- indicates API processing has been aborted because
105 -- at least one message exists in the list.
106 --
107 rollback to create_ame_act_type_swi;
108 --
109 -- Reset IN OUT parameters and set OUT parameters
110 --
111 p_aty_object_version_number := null;
112 p_aty_start_date := null;
113 p_aty_end_date := null;
114 p_apu_object_version_number := null;
115 p_apu_start_date := null;
116 p_apu_end_date := null;
117 p_return_status := hr_multi_message.get_return_status_disable;
118 hr_utility.set_location(' Leaving:' || l_proc, 30);
119 when others then
120 --
121 -- When Multiple Message Detection is enabled catch
122 -- any Application specific or other unexpected
123 -- exceptions. Adding appropriate details to the
124 -- Multiple Message List. Otherwise re-raise the
125 -- error.
126 --
127 rollback to create_ame_act_type_swi;
128 if hr_multi_message.unexpected_error_add(l_proc) then
129 hr_utility.set_location(' Leaving:' || l_proc,40);
130 raise;
131 end if;
132 --
133 -- Reset IN OUT and set OUT parameters
134 --
135 p_aty_object_version_number := null;
136 p_aty_start_date := null;
137 p_aty_end_date := null;
138 p_apu_object_version_number := null;
139 p_apu_start_date := null;
140 p_apu_end_date := null;
141 p_return_status := hr_multi_message.get_return_status_disable;
142 hr_utility.set_location(' Leaving:' || l_proc,50);
143 end create_ame_action_type;
144 -- ----------------------------------------------------------------------------
145 -- |---------------------< create_ame_action_type_usage >---------------------|
146 -- ----------------------------------------------------------------------------
147 PROCEDURE create_ame_action_type_usage
148 (p_validate in number default hr_api.g_false_num
149 ,p_action_type_id in number
150 ,p_rule_type in number
151 ,p_object_version_number out nocopy number
152 ,p_start_date out nocopy date
153 ,p_end_date out nocopy date
154 ,p_return_status out nocopy varchar2
155 ) is
156 --
157 -- Variables for API Boolean parameters
158 l_validate boolean;
159 --
160 -- Variables for IN/OUT parameters
161 --
162 -- Other variables
163 l_proc varchar2(72) := g_package ||'create_ame_action_type_usage';
164 Begin
165 hr_utility.set_location(' Entering:' || l_proc,10);
166 --
167 -- Issue a savepoint
168 --
169 savepoint create_ame_act_type_usg_swi;
170 --
171 -- Initialise Multiple Message Detection
172 --
173 hr_multi_message.enable_message_list;
174 --
175 -- Remember IN OUT parameter IN values
176 --
177 --
178 -- Convert constant values to their corresponding boolean value
179 --
180 l_validate :=
181 hr_api.constant_to_boolean
182 (p_constant_value => p_validate);
183 --
184 -- Register Surrogate ID or user key values
185 --
186 --
187 -- Call API
188 --
189 ame_action_api.create_ame_action_type_usage
190 (p_validate => l_validate
191 ,p_action_type_id => p_action_type_id
192 ,p_rule_type => p_rule_type
193 ,p_object_version_number => p_object_version_number
194 ,p_start_date => p_start_date
195 ,p_end_date => p_end_date
196 );
197 --
198 -- Convert API warning boolean parameter values to specific
199 -- messages and add them to Multiple Message List
200 --
201 --
202 -- Convert API non-warning boolean parameter values
203 --
204 --
205 -- Derive the API return status value based on whether
206 -- messages of any type exist in the Multiple Message List.
207 -- Also disable Multiple Message Detection.
208 --
209 p_return_status := hr_multi_message.get_return_status_disable;
210 hr_utility.set_location(' Leaving:' || l_proc,20);
211 --
212 exception
213 when hr_multi_message.error_message_exist then
214 --
215 -- Catch the Multiple Message List exception which
216 -- indicates API processing has been aborted because
217 -- at least one message exists in the list.
218 --
219 rollback to create_ame_act_type_usg_swi;
220 --
221 -- Reset IN OUT parameters and set OUT parameters
222 --
223 p_object_version_number := null;
224 p_start_date := null;
225 p_end_date := null;
226 p_return_status := hr_multi_message.get_return_status_disable;
227 hr_utility.set_location(' Leaving:' || l_proc, 30);
228 when others then
229 --
230 -- When Multiple Message Detection is enabled catch
231 -- any Application specific or other unexpected
232 -- exceptions. Adding appropriate details to the
233 -- Multiple Message List. Otherwise re-raise the
234 -- error.
235 --
236 rollback to create_ame_act_type_usg_swi;
237 if hr_multi_message.unexpected_error_add(l_proc) then
238 hr_utility.set_location(' Leaving:' || l_proc,40);
239 raise;
240 end if;
241 --
242 -- Reset IN OUT and set OUT parameters
243 --
244 p_object_version_number := null;
245 p_start_date := null;
246 p_end_date := null;
247 p_return_status := hr_multi_message.get_return_status_disable;
248 hr_utility.set_location(' Leaving:' || l_proc,50);
249 end create_ame_action_type_usage;
250 -- ----------------------------------------------------------------------------
251 -- |----------------------< create_ame_appr_type_usage >----------------------|
252 -- ----------------------------------------------------------------------------
253 PROCEDURE create_ame_appr_type_usage
254 (p_validate in number default hr_api.g_false_num
255 ,p_action_type_id in number
256 ,p_approver_type_id in number
257 ,p_object_version_number out nocopy number
258 ,p_start_date out nocopy date
259 ,p_end_date out nocopy date
260 ,p_return_status out nocopy varchar2
261 ) is
262 --
263 -- Variables for API Boolean parameters
264 l_validate boolean;
265 --
266 -- Variables for IN/OUT parameters
267 --
268 -- Other variables
269 l_proc varchar2(72) := g_package ||'create_ame_appr_type_usage';
270 Begin
271 hr_utility.set_location(' Entering:' || l_proc,10);
272 --
273 -- Issue a savepoint
274 --
275 savepoint create_ame_appr_type_usage_swi;
276 --
277 -- Initialise Multiple Message Detection
278 --
279 hr_multi_message.enable_message_list;
280 --
281 -- Remember IN OUT parameter IN values
282 --
283 --
284 -- Convert constant values to their corresponding boolean value
285 --
286 l_validate :=
287 hr_api.constant_to_boolean
288 (p_constant_value => p_validate);
289 --
290 -- Register Surrogate ID or user key values
291 --
292 --
293 -- Call API
294 --
295 ame_action_api.create_ame_appr_type_usage
296 (p_validate => l_validate
297 ,p_action_type_id => p_action_type_id
298 ,p_approver_type_id => p_approver_type_id
299 ,p_object_version_number => p_object_version_number
300 ,p_start_date => p_start_date
301 ,p_end_date => p_end_date
302 );
303 --
304 -- Convert API warning boolean parameter values to specific
305 -- messages and add them to Multiple Message List
306 --
307 --
308 -- Convert API non-warning boolean parameter values
309 --
310 --
311 -- Derive the API return status value based on whether
312 -- messages of any type exist in the Multiple Message List.
313 -- Also disable Multiple Message Detection.
314 --
315 p_return_status := hr_multi_message.get_return_status_disable;
316 hr_utility.set_location(' Leaving:' || l_proc,20);
317 --
318 exception
319 when hr_multi_message.error_message_exist then
320 --
321 -- Catch the Multiple Message List exception which
322 -- indicates API processing has been aborted because
323 -- at least one message exists in the list.
324 --
325 rollback to create_ame_appr_type_usage_swi;
326 --
327 -- Reset IN OUT parameters and set OUT parameters
328 --
329 p_object_version_number := null;
330 p_start_date := null;
331 p_end_date := null;
332 p_return_status := hr_multi_message.get_return_status_disable;
333 hr_utility.set_location(' Leaving:' || l_proc, 30);
334 when others then
335 --
336 -- When Multiple Message Detection is enabled catch
337 -- any Application specific or other unexpected
338 -- exceptions. Adding appropriate details to the
339 -- Multiple Message List. Otherwise re-raise the
340 -- error.
341 --
342 rollback to create_ame_appr_type_usage_swi;
343 if hr_multi_message.unexpected_error_add(l_proc) then
344 hr_utility.set_location(' Leaving:' || l_proc,40);
345 raise;
346 end if;
347 --
348 -- Reset IN OUT and set OUT parameters
349 --
350 p_object_version_number := null;
351 p_start_date := null;
352 p_end_date := null;
353 p_return_status := hr_multi_message.get_return_status_disable;
354 hr_utility.set_location(' Leaving:' || l_proc,50);
355 end create_ame_appr_type_usage;
356 -- |---------------------< create_ame_action_type_config >--------------------|
357 -- ----------------------------------------------------------------------------
358 PROCEDURE create_ame_action_type_config
359 (p_validate in number default hr_api.g_false_num
360 ,p_action_type_id in number
361 ,p_application_id in number
362 ,p_voting_regime in varchar2 default null
363 ,p_chain_ordering_mode in varchar2 default null
364 ,p_order_number in number default null
365 ,p_object_version_number out nocopy number
366 ,p_start_date out nocopy date
367 ,p_end_date out nocopy date
368 ,p_return_status out nocopy varchar2
369 ) is
370 --
371 -- Variables for API Boolean parameters
372 l_validate boolean;
373 --
374 -- Variables for IN/OUT parameters
375 --
376 -- Other variables
377 l_proc varchar2(72) := g_package ||'create_ame_action_type_config';
378 Begin
379 hr_utility.set_location(' Entering:' || l_proc,10);
380 --
381 -- Issue a savepoint
382 --
383 savepoint create_ame_act_type_conf_swi;
384 --
385 -- Initialise Multiple Message Detection
386 --
387 hr_multi_message.enable_message_list;
388 --
389 -- Remember IN OUT parameter IN values
390 --
391 --
392 -- Convert constant values to their corresponding boolean value
393 --
394 l_validate :=
395 hr_api.constant_to_boolean
396 (p_constant_value => p_validate);
397 --
398 -- Register Surrogate ID or user key values
399 --
400 --
401 -- Call API
402 --
403 ame_action_api.create_ame_action_type_conf
404 (p_validate => l_validate
405 ,p_action_type_id => p_action_type_id
406 ,p_application_id => p_application_id
407 ,p_voting_regime => p_voting_regime
408 ,p_chain_ordering_mode => p_chain_ordering_mode
409 ,p_order_number => p_order_number
410 ,p_object_version_number => p_object_version_number
411 ,p_start_date => p_start_date
412 ,p_end_date => p_end_date
413 );
414 --
415 -- Convert API warning boolean parameter values to specific
416 -- messages and add them to Multiple Message List
417 --
418 --
419 -- Convert API non-warning boolean parameter values
420 --
421 --
422 -- Derive the API return status value based on whether
423 -- messages of any type exist in the Multiple Message List.
424 -- Also disable Multiple Message Detection.
425 --
426 p_return_status := hr_multi_message.get_return_status_disable;
427 hr_utility.set_location(' Leaving:' || l_proc,20);
428 --
429 exception
430 when hr_multi_message.error_message_exist then
431 --
432 -- Catch the Multiple Message List exception which
433 -- indicates API processing has been aborted because
434 -- at least one message exists in the list.
435 --
436 rollback to create_ame_act_type_conf_swi;
437 --
438 -- Reset IN OUT parameters and set OUT parameters
439 --
440 p_object_version_number := null;
441 p_start_date := null;
442 p_end_date := null;
443 p_return_status := hr_multi_message.get_return_status_disable;
444 hr_utility.set_location(' Leaving:' || l_proc, 30);
445 when others then
446 --
447 -- When Multiple Message Detection is enabled catch
448 -- any Application specific or other unexpected
449 -- exceptions. Adding appropriate details to the
450 -- Multiple Message List. Otherwise re-raise the
451 -- error.
452 --
453 rollback to create_ame_act_type_conf_swi;
454 if hr_multi_message.unexpected_error_add(l_proc) then
455 hr_utility.set_location(' Leaving:' || l_proc,40);
456 raise;
457 end if;
458 --
459 -- Reset IN OUT and set OUT parameters
460 --
461 p_object_version_number := null;
462 p_start_date := null;
463 p_end_date := null;
464 p_return_status := hr_multi_message.get_return_status_disable;
465 hr_utility.set_location(' Leaving:' || l_proc,50);
466 end create_ame_action_type_config;
467 -- ----------------------------------------------------------------------------
468 -- |-----------------------< create_ame_req_attribute >-----------------------|
469 -- ----------------------------------------------------------------------------
470 PROCEDURE create_ame_req_attribute
471 (p_validate in number default hr_api.g_false_num
472 ,p_action_type_id in number
473 ,p_attribute_id in number
474 ,p_object_version_number out nocopy number
475 ,p_start_date out nocopy date
476 ,p_end_date out nocopy date
477 ,p_return_status out nocopy varchar2
478 ) is
479 --
480 -- Variables for API Boolean parameters
481 l_validate boolean;
482 --
483 -- Variables for IN/OUT parameters
484 --
485 -- Other variables
486 l_proc varchar2(72) := g_package ||'create_ame_req_attribute';
487 Begin
488 hr_utility.set_location(' Entering:' || l_proc,10);
489 --
490 -- Issue a savepoint
491 --
492 savepoint create_ame_req_attribute_swi;
493 --
494 -- Initialise Multiple Message Detection
495 --
496 hr_multi_message.enable_message_list;
497 --
498 -- Remember IN OUT parameter IN values
499 --
500 --
501 -- Convert constant values to their corresponding boolean value
502 --
503 l_validate :=
504 hr_api.constant_to_boolean
505 (p_constant_value => p_validate);
506 --
507 -- Register Surrogate ID or user key values
508 --
509 --
510 -- Call API
511 --
512 ame_action_api.create_ame_req_attribute
513 (p_validate => l_validate
514 ,p_action_type_id => p_action_type_id
515 ,p_attribute_id => p_attribute_id
516 ,p_object_version_number => p_object_version_number
517 ,p_start_date => p_start_date
518 ,p_end_date => p_end_date
519 );
520 --
521 -- Convert API warning boolean parameter values to specific
522 -- messages and add them to Multiple Message List
523 --
524 --
525 -- Convert API non-warning boolean parameter values
526 --
527 --
528 -- Derive the API return status value based on whether
529 -- messages of any type exist in the Multiple Message List.
530 -- Also disable Multiple Message Detection.
531 --
532 p_return_status := hr_multi_message.get_return_status_disable;
533 hr_utility.set_location(' Leaving:' || l_proc,20);
534 --
535 exception
536 when hr_multi_message.error_message_exist then
537 --
538 -- Catch the Multiple Message List exception which
539 -- indicates API processing has been aborted because
540 -- at least one message exists in the list.
541 --
542 rollback to create_ame_req_attribute_swi;
543 --
544 -- Reset IN OUT parameters and set OUT parameters
545 --
546 p_object_version_number := null;
547 p_start_date := null;
548 p_end_date := null;
549 p_return_status := hr_multi_message.get_return_status_disable;
550 hr_utility.set_location(' Leaving:' || l_proc, 30);
551 when others then
552 --
553 -- When Multiple Message Detection is enabled catch
554 -- any Application specific or other unexpected
555 -- exceptions. Adding appropriate details to the
556 -- Multiple Message List. Otherwise re-raise the
557 -- error.
558 --
559 rollback to create_ame_req_attribute_swi;
560 if hr_multi_message.unexpected_error_add(l_proc) then
561 hr_utility.set_location(' Leaving:' || l_proc,40);
562 raise;
563 end if;
564 --
565 -- Reset IN OUT and set OUT parameters
566 --
567 p_object_version_number := null;
568 p_start_date := null;
569 p_end_date := null;
570 p_return_status := hr_multi_message.get_return_status_disable;
571 hr_utility.set_location(' Leaving:' || l_proc,50);
572 end create_ame_req_attribute;
573 -- ----------------------------------------------------------------------------
574 -- |---------------------------< create_ame_action >--------------------------|
575 -- ----------------------------------------------------------------------------
576 PROCEDURE create_ame_action
577 (p_validate in number default hr_api.g_false_num
578 ,p_language_code in varchar2 default null
579 ,p_action_type_id in number
580 ,p_parameter in varchar2
581 ,p_description in varchar2
582 ,p_parameter_two in varchar2
583 ,p_action_id out nocopy number
584 ,p_object_version_number out nocopy number
585 ,p_start_date out nocopy date
586 ,p_end_date out nocopy date
587 ,p_return_status out nocopy varchar2
588 ) is
589 --
590 -- Variables for API Boolean parameters
591 l_validate boolean;
592 --
593 -- Variables for IN/OUT parameters
594 --
595 -- Other variables
596 l_proc varchar2(72) := g_package ||'create_ame_action';
597 Begin
598 hr_utility.set_location(' Entering:' || l_proc,10);
599 --
600 -- Issue a savepoint
601 --
602 savepoint create_ame_action_swi;
603 --
604 -- Initialise Multiple Message Detection
605 --
606 hr_multi_message.enable_message_list;
607 --
608 -- Remember IN OUT parameter IN values
609 --
610 --
611 -- Convert constant values to their corresponding boolean value
612 --
613 l_validate :=
614 hr_api.constant_to_boolean
615 (p_constant_value => p_validate);
616 --
617 -- Register Surrogate ID or user key values
618 --
619 --
620 -- Call API
621 --
622 ame_action_api.create_ame_action
623 (p_validate => l_validate
624 ,p_language_code => p_language_code
625 ,p_action_type_id => p_action_type_id
626 ,p_parameter => p_parameter
627 ,p_description => p_description
628 ,p_parameter_two => p_parameter_two
629 ,p_action_id => p_action_id
630 ,p_object_version_number => p_object_version_number
631 ,p_start_date => p_start_date
632 ,p_end_date => p_end_date
633 );
634 --
635 -- Convert API warning boolean parameter values to specific
636 -- messages and add them to Multiple Message List
637 --
638 --
639 -- Convert API non-warning boolean parameter values
640 --
641 --
642 -- Derive the API return status value based on whether
643 -- messages of any type exist in the Multiple Message List.
644 -- Also disable Multiple Message Detection.
645 --
646 p_return_status := hr_multi_message.get_return_status_disable;
647 hr_utility.set_location(' Leaving:' || l_proc,20);
648 --
649 exception
650 when hr_multi_message.error_message_exist then
651 --
652 -- Catch the Multiple Message List exception which
653 -- indicates API processing has been aborted because
654 -- at least one message exists in the list.
655 --
656 rollback to create_ame_action_swi;
657 --
658 -- Reset IN OUT parameters and set OUT parameters
659 --
660 p_action_id := null;
661 p_object_version_number := null;
662 p_start_date := null;
663 p_end_date := null;
664 p_return_status := hr_multi_message.get_return_status_disable;
665 hr_utility.set_location(' Leaving:' || l_proc, 30);
666 when others then
667 --
668 -- When Multiple Message Detection is enabled catch
669 -- any Application specific or other unexpected
670 -- exceptions. Adding appropriate details to the
671 -- Multiple Message List. Otherwise re-raise the
672 -- error.
673 --
674 rollback to create_ame_action_swi;
675 if hr_multi_message.unexpected_error_add(l_proc) then
676 hr_utility.set_location(' Leaving:' || l_proc,40);
677 raise;
678 end if;
679 --
680 -- Reset IN OUT and set OUT parameters
681 --
682 p_action_id := null;
683 p_object_version_number := null;
684 p_start_date := null;
685 p_end_date := null;
686 p_return_status := hr_multi_message.get_return_status_disable;
687 hr_utility.set_location(' Leaving:' || l_proc,50);
688 end create_ame_action;
689 -- ----------------------------------------------------------------------------
690 -- |------------------------< update_ame_action_type >------------------------|
691 -- ----------------------------------------------------------------------------
692 PROCEDURE update_ame_action_type
693 (p_validate in number default hr_api.g_false_num
694 ,p_language_code in varchar2 default hr_api.userenv_lang
695 ,p_action_type_id in number
696 ,p_procedure_name in varchar2 default hr_api.g_varchar2
697 ,p_description in varchar2 default hr_api.g_varchar2
698 ,p_description_query in varchar2 default hr_api.g_varchar2
699 ,p_object_version_number in out nocopy number
700 ,p_start_date out nocopy date
701 ,p_end_date out nocopy date
702 ,p_return_status out nocopy varchar2
703 ) is
704 --
705 -- Variables for API Boolean parameters
706 l_validate boolean;
707 --
708 -- Variables for IN/OUT parameters
709 l_object_version_number number;
710 --
711 -- Other variables
712 l_proc varchar2(72) := g_package ||'update_ame_action_type';
713 Begin
714 hr_utility.set_location(' Entering:' || l_proc,10);
715 --
716 -- Issue a savepoint
717 --
718 savepoint update_ame_act_type_swi;
719 --
720 -- Initialise Multiple Message Detection
721 --
722 hr_multi_message.enable_message_list;
723 --
724 -- Remember IN OUT parameter IN values
725 --
726 l_object_version_number := p_object_version_number;
727 --
728 -- Convert constant values to their corresponding boolean value
729 --
730 l_validate :=
731 hr_api.constant_to_boolean
732 (p_constant_value => p_validate);
733 --
734 -- Register Surrogate ID or user key values
735 --
736 --
737 -- Call API
738 --
739 ame_action_api.update_ame_action_type
740 (p_validate => l_validate
741 ,p_language_code => p_language_code
742 ,p_action_type_id => p_action_type_id
743 ,p_procedure_name => p_procedure_name
744 ,p_description => p_description
745 ,p_description_query => p_description_query
746 ,p_object_version_number => p_object_version_number
747 ,p_start_date => p_start_date
748 ,p_end_date => p_end_date
749 );
750 --
751 -- Convert API warning boolean parameter values to specific
752 -- messages and add them to Multiple Message List
753 --
754 --
755 -- Convert API non-warning boolean parameter values
756 --
757 --
758 -- Derive the API return status value based on whether
759 -- messages of any type exist in the Multiple Message List.
760 -- Also disable Multiple Message Detection.
761 --
762 p_return_status := hr_multi_message.get_return_status_disable;
763 hr_utility.set_location(' Leaving:' || l_proc,20);
764 --
765 exception
766 when hr_multi_message.error_message_exist then
767 --
768 -- Catch the Multiple Message List exception which
769 -- indicates API processing has been aborted because
770 -- at least one message exists in the list.
771 --
772 rollback to update_ame_act_type_swi;
773 --
774 -- Reset IN OUT parameters and set OUT parameters
775 --
776 p_object_version_number := l_object_version_number;
777 p_start_date := null;
778 p_end_date := null;
779 p_return_status := hr_multi_message.get_return_status_disable;
780 hr_utility.set_location(' Leaving:' || l_proc, 30);
781 when others then
782 --
783 -- When Multiple Message Detection is enabled catch
784 -- any Application specific or other unexpected
785 -- exceptions. Adding appropriate details to the
786 -- Multiple Message List. Otherwise re-raise the
787 -- error.
788 --
789 rollback to update_ame_act_type_swi;
790 if hr_multi_message.unexpected_error_add(l_proc) then
791 hr_utility.set_location(' Leaving:' || l_proc,40);
792 raise;
793 end if;
794 --
795 -- Reset IN OUT and set OUT parameters
796 --
797 p_object_version_number := l_object_version_number;
798 p_start_date := null;
799 p_end_date := null;
800 p_return_status := hr_multi_message.get_return_status_disable;
801 hr_utility.set_location(' Leaving:' || l_proc,50);
802 end update_ame_action_type;
803 -- ----------------------------------------------------------------------------
804 -- |----------------------< update_ame_action_type_conf >---------------------|
805 -- ----------------------------------------------------------------------------
806 PROCEDURE update_ame_action_type_conf
807 (p_validate in number default hr_api.g_false_num
808 ,p_action_type_id in number
809 ,p_application_id in number
810 ,p_voting_regime in varchar2 default hr_api.g_varchar2
811 ,p_chain_ordering_mode in varchar2 default hr_api.g_varchar2
812 ,p_order_number in number default hr_api.g_number
813 ,p_object_version_number in out nocopy number
814 ,p_start_date out nocopy date
815 ,p_end_date out nocopy date
816 ,p_return_status out nocopy varchar2
817 ) is
818 --
819 -- Variables for API Boolean parameters
820 l_validate boolean;
821 --
822 -- Variables for IN/OUT parameters
823 l_object_version_number number;
824 --
825 -- Other variables
826 l_proc varchar2(72) := g_package ||'update_ame_action_type_conf';
827 Begin
828 hr_utility.set_location(' Entering:' || l_proc,10);
829 --
830 -- Issue a savepoint
831 --
832 savepoint update_ame_act_type_conf_swi;
833 --
834 -- Initialise Multiple Message Detection
835 --
836 hr_multi_message.enable_message_list;
837 --
838 -- Remember IN OUT parameter IN values
839 --
840 l_object_version_number := p_object_version_number;
841 --
842 -- Convert constant values to their corresponding boolean value
843 --
844 l_validate :=
845 hr_api.constant_to_boolean
846 (p_constant_value => p_validate);
847 --
848 -- Register Surrogate ID or user key values
849 --
850 --
851 -- Call API
852 --
853 ame_action_api.update_ame_action_type_conf
854 (p_validate => l_validate
855 ,p_action_type_id => p_action_type_id
856 ,p_application_id => p_application_id
857 ,p_voting_regime => p_voting_regime
858 ,p_chain_ordering_mode => p_chain_ordering_mode
859 ,p_order_number => p_order_number
860 ,p_object_version_number => p_object_version_number
861 ,p_start_date => p_start_date
862 ,p_end_date => p_end_date
863 );
864 --
865 -- Convert API warning boolean parameter values to specific
866 -- messages and add them to Multiple Message List
867 --
868 --
869 -- Convert API non-warning boolean parameter values
870 --
871 --
872 -- Derive the API return status value based on whether
873 -- messages of any type exist in the Multiple Message List.
874 -- Also disable Multiple Message Detection.
875 --
876 p_return_status := hr_multi_message.get_return_status_disable;
877 hr_utility.set_location(' Leaving:' || l_proc,20);
878 --
879 exception
880 when hr_multi_message.error_message_exist then
881 --
882 -- Catch the Multiple Message List exception which
883 -- indicates API processing has been aborted because
884 -- at least one message exists in the list.
885 --
886 rollback to update_ame_act_type_conf_swi;
887 --
888 -- Reset IN OUT parameters and set OUT parameters
889 --
890 p_object_version_number := l_object_version_number;
891 p_start_date := null;
892 p_end_date := null;
893 p_return_status := hr_multi_message.get_return_status_disable;
894 hr_utility.set_location(' Leaving:' || l_proc, 30);
895 when others then
896 --
897 -- When Multiple Message Detection is enabled catch
898 -- any Application specific or other unexpected
899 -- exceptions. Adding appropriate details to the
900 -- Multiple Message List. Otherwise re-raise the
901 -- error.
902 --
903 rollback to update_ame_act_type_conf_swi;
904 if hr_multi_message.unexpected_error_add(l_proc) then
905 hr_utility.set_location(' Leaving:' || l_proc,40);
906 raise;
907 end if;
908 --
909 -- Reset IN OUT and set OUT parameters
910 --
911 p_object_version_number := l_object_version_number;
912 p_start_date := null;
913 p_end_date := null;
914 p_return_status := hr_multi_message.get_return_status_disable;
915 hr_utility.set_location(' Leaving:' || l_proc,50);
916 end update_ame_action_type_conf;
917 -- ----------------------------------------------------------------------------
918 -- |---------------------------< update_ame_action >--------------------------|
919 -- ----------------------------------------------------------------------------
920 PROCEDURE update_ame_action
921 (p_validate in number default hr_api.g_false_num
922 ,p_language_code in varchar2 default hr_api.userenv_lang
923 ,p_action_id in number
924 ,p_action_type_id in number
925 ,p_parameter in varchar2 default hr_api.g_varchar2
926 ,p_parameter_two in varchar2 default hr_api.g_varchar2
927 ,p_description in varchar2 default hr_api.g_varchar2
928 ,p_object_version_number in out nocopy number
929 ,p_start_date out nocopy date
930 ,p_end_date out nocopy date
931 ,p_return_status out nocopy varchar2
932 ) is
933 --
934 -- Variables for API Boolean parameters
935 l_validate boolean;
936 --
937 -- Variables for IN/OUT parameters
938 l_object_version_number number;
939 --
940 -- Other variables
941 l_proc varchar2(72) := g_package ||'update_ame_action';
942 Begin
943 hr_utility.set_location(' Entering:' || l_proc,10);
944 --
945 -- Issue a savepoint
946 --
947 savepoint update_ame_action_swi;
948 --
949 -- Initialise Multiple Message Detection
950 --
951 hr_multi_message.enable_message_list;
952 --
953 -- Remember IN OUT parameter IN values
954 --
955 l_object_version_number := p_object_version_number;
956 --
957 -- Convert constant values to their corresponding boolean value
958 --
959 l_validate :=
960 hr_api.constant_to_boolean
961 (p_constant_value => p_validate);
962 --
963 -- Register Surrogate ID or user key values
964 --
965 --
966 -- Call API
967 --
968 ame_action_api.update_ame_action
969 (p_validate => l_validate
970 ,p_language_code => p_language_code
971 ,p_action_id => p_action_id
972 ,p_action_type_id => p_action_type_id
973 ,p_parameter => p_parameter
974 ,p_parameter_two => p_parameter_two
975 ,p_description => p_description
976 ,p_object_version_number => p_object_version_number
977 ,p_start_date => p_start_date
978 ,p_end_date => p_end_date
979 );
980 --
981 -- Convert API warning boolean parameter values to specific
982 -- messages and add them to Multiple Message List
983 --
984 --
985 -- Convert API non-warning boolean parameter values
986 --
987 --
988 -- Derive the API return status value based on whether
989 -- messages of any type exist in the Multiple Message List.
990 -- Also disable Multiple Message Detection.
991 --
992 p_return_status := hr_multi_message.get_return_status_disable;
993 hr_utility.set_location(' Leaving:' || l_proc,20);
994 --
995 exception
996 when hr_multi_message.error_message_exist then
997 --
998 -- Catch the Multiple Message List exception which
999 -- indicates API processing has been aborted because
1000 -- at least one message exists in the list.
1001 --
1002 rollback to update_ame_action_swi;
1003 --
1004 -- Reset IN OUT parameters and set OUT parameters
1005 --
1006 p_object_version_number := l_object_version_number;
1007 p_start_date := null;
1008 p_end_date := null;
1009 p_return_status := hr_multi_message.get_return_status_disable;
1010 hr_utility.set_location(' Leaving:' || l_proc, 30);
1011 when others then
1012 --
1013 -- When Multiple Message Detection is enabled catch
1014 -- any Application specific or other unexpected
1015 -- exceptions. Adding appropriate details to the
1016 -- Multiple Message List. Otherwise re-raise the
1017 -- error.
1018 --
1019 rollback to update_ame_action_swi;
1020 if hr_multi_message.unexpected_error_add(l_proc) then
1021 hr_utility.set_location(' Leaving:' || l_proc,40);
1022 raise;
1023 end if;
1024 --
1025 -- Reset IN OUT and set OUT parameters
1026 --
1027 p_object_version_number := l_object_version_number;
1028 p_start_date := null;
1029 p_end_date := null;
1030 p_return_status := hr_multi_message.get_return_status_disable;
1031 hr_utility.set_location(' Leaving:' || l_proc,50);
1032 end update_ame_action;
1033 -- ----------------------------------------------------------------------------
1034 -- |------------------------< delete_ame_action_type >------------------------|
1035 -- ----------------------------------------------------------------------------
1036 PROCEDURE delete_ame_action_type
1037 (p_validate in number default hr_api.g_false_num
1038 ,p_action_type_id in number
1039 ,p_object_version_number in out nocopy number
1040 ,p_start_date out nocopy date
1041 ,p_end_date out nocopy date
1042 ,p_return_status out nocopy varchar2
1043 ) is
1044 --
1045 -- Variables for API Boolean parameters
1046 l_validate boolean;
1047 --
1048 -- Variables for IN/OUT parameters
1049 l_object_version_number number;
1050 --
1051 -- Other variables
1052 l_proc varchar2(72) := g_package ||'delete_ame_action_type';
1053 Begin
1054 hr_utility.set_location(' Entering:' || l_proc,10);
1055 --
1056 -- Issue a savepoint
1057 --
1058 savepoint delete_ame_act_type_swi;
1059 --
1060 -- Initialise Multiple Message Detection
1061 --
1062 hr_multi_message.enable_message_list;
1063 --
1064 -- Remember IN OUT parameter IN values
1065 --
1066 l_object_version_number := p_object_version_number;
1067 --
1068 -- Convert constant values to their corresponding boolean value
1069 --
1070 l_validate :=
1071 hr_api.constant_to_boolean
1072 (p_constant_value => p_validate);
1073 --
1074 -- Register Surrogate ID or user key values
1075 --
1076 --
1077 -- Call API
1078 --
1079 ame_action_api.delete_ame_action_type
1080 (p_validate => l_validate
1081 ,p_action_type_id => p_action_type_id
1082 ,p_object_version_number => p_object_version_number
1083 ,p_start_date => p_start_date
1084 ,p_end_date => p_end_date
1085 );
1086 --
1087 -- Convert API warning boolean parameter values to specific
1088 -- messages and add them to Multiple Message List
1089 --
1090 --
1091 -- Convert API non-warning boolean parameter values
1092 --
1093 --
1094 -- Derive the API return status value based on whether
1095 -- messages of any type exist in the Multiple Message List.
1096 -- Also disable Multiple Message Detection.
1097 --
1098 p_return_status := hr_multi_message.get_return_status_disable;
1099 hr_utility.set_location(' Leaving:' || l_proc,20);
1100 --
1101 exception
1102 when hr_multi_message.error_message_exist then
1103 --
1104 -- Catch the Multiple Message List exception which
1105 -- indicates API processing has been aborted because
1106 -- at least one message exists in the list.
1107 --
1108 rollback to delete_ame_act_type_swi;
1109 --
1110 -- Reset IN OUT parameters and set OUT parameters
1111 --
1112 p_object_version_number := l_object_version_number;
1113 p_start_date := null;
1114 p_end_date := null;
1115 p_return_status := hr_multi_message.get_return_status_disable;
1116 hr_utility.set_location(' Leaving:' || l_proc, 30);
1117 when others then
1118 --
1119 -- When Multiple Message Detection is enabled catch
1120 -- any Application specific or other unexpected
1121 -- exceptions. Adding appropriate details to the
1122 -- Multiple Message List. Otherwise re-raise the
1123 -- error.
1124 --
1125 rollback to delete_ame_act_type_swi;
1126 if hr_multi_message.unexpected_error_add(l_proc) then
1127 hr_utility.set_location(' Leaving:' || l_proc,40);
1128 raise;
1129 end if;
1130 --
1131 -- Reset IN OUT and set OUT parameters
1132 --
1133 p_object_version_number := l_object_version_number;
1134 p_start_date := null;
1135 p_end_date := null;
1136 p_return_status := hr_multi_message.get_return_status_disable;
1137 hr_utility.set_location(' Leaving:' || l_proc,50);
1138 end delete_ame_action_type;
1139 -- ----------------------------------------------------------------------------
1140 -- |----------------------< delete_ame_action_type_conf >---------------------|
1141 -- ----------------------------------------------------------------------------
1142 PROCEDURE delete_ame_action_type_conf
1143 (p_validate in number default hr_api.g_false_num
1144 ,p_action_type_id in number
1145 ,p_application_id in number
1146 ,p_object_version_number in out nocopy number
1147 ,p_start_date out nocopy date
1148 ,p_end_date out nocopy date
1149 ,p_return_status out nocopy varchar2
1150 ) is
1151 --
1152 -- Variables for API Boolean parameters
1153 l_validate boolean;
1154 --
1155 -- Variables for IN/OUT parameters
1156 l_object_version_number number;
1157 --
1158 -- Other variables
1159 l_proc varchar2(72) := g_package ||'delete_ame_action_type_conf';
1160 Begin
1161 hr_utility.set_location(' Entering:' || l_proc,10);
1162 --
1163 -- Issue a savepoint
1164 --
1165 savepoint delete_ame_act_type_conf_swi;
1166 --
1167 -- Initialise Multiple Message Detection
1168 --
1169 hr_multi_message.enable_message_list;
1170 --
1171 -- Remember IN OUT parameter IN values
1172 --
1173 l_object_version_number := p_object_version_number;
1174 --
1175 -- Convert constant values to their corresponding boolean value
1176 --
1177 l_validate :=
1178 hr_api.constant_to_boolean
1179 (p_constant_value => p_validate);
1180 --
1181 -- Register Surrogate ID or user key values
1182 --
1183 --
1184 -- Call API
1185 --
1186 ame_action_api.delete_ame_action_type_conf
1187 (p_validate => l_validate
1188 ,p_action_type_id => p_action_type_id
1189 ,p_application_id => p_application_id
1190 ,p_object_version_number => p_object_version_number
1191 ,p_start_date => p_start_date
1192 ,p_end_date => p_end_date
1193 );
1194 --
1195 -- Convert API warning boolean parameter values to specific
1196 -- messages and add them to Multiple Message List
1197 --
1198 --
1199 -- Convert API non-warning boolean parameter values
1200 --
1201 --
1202 -- Derive the API return status value based on whether
1203 -- messages of any type exist in the Multiple Message List.
1204 -- Also disable Multiple Message Detection.
1205 --
1206 p_return_status := hr_multi_message.get_return_status_disable;
1207 hr_utility.set_location(' Leaving:' || l_proc,20);
1208 --
1209 exception
1210 when hr_multi_message.error_message_exist then
1211 --
1212 -- Catch the Multiple Message List exception which
1213 -- indicates API processing has been aborted because
1214 -- at least one message exists in the list.
1215 --
1216 rollback to delete_ame_act_type_conf_swi;
1217 --
1218 -- Reset IN OUT parameters and set OUT parameters
1219 --
1220 p_object_version_number := l_object_version_number;
1221 p_start_date := null;
1222 p_end_date := null;
1223 p_return_status := hr_multi_message.get_return_status_disable;
1224 hr_utility.set_location(' Leaving:' || l_proc, 30);
1225 when others then
1226 --
1227 -- When Multiple Message Detection is enabled catch
1228 -- any Application specific or other unexpected
1229 -- exceptions. Adding appropriate details to the
1230 -- Multiple Message List. Otherwise re-raise the
1231 -- error.
1232 --
1233 rollback to delete_ame_act_type_conf_swi;
1234 if hr_multi_message.unexpected_error_add(l_proc) then
1235 hr_utility.set_location(' Leaving:' || l_proc,40);
1236 raise;
1237 end if;
1238 --
1239 -- Reset IN OUT and set OUT parameters
1240 --
1241 p_object_version_number := l_object_version_number;
1242 p_start_date := null;
1243 p_end_date := null;
1244 p_return_status := hr_multi_message.get_return_status_disable;
1245 hr_utility.set_location(' Leaving:' || l_proc,50);
1246 end delete_ame_action_type_conf;
1247 -- ----------------------------------------------------------------------------
1248 -- |---------------------< delete_ame_action_type_usage >---------------------|
1249 -- ----------------------------------------------------------------------------
1250 PROCEDURE delete_ame_action_type_usage
1251 (p_validate in number default hr_api.g_false_num
1252 ,p_action_type_id in number
1253 ,p_rule_type in number
1254 ,p_object_version_number in out nocopy number
1255 ,p_start_date out nocopy date
1256 ,p_end_date out nocopy date
1257 ,p_return_status out nocopy varchar2
1258 ) is
1259 --
1260 -- Variables for API Boolean parameters
1261 l_validate boolean;
1262 --
1263 -- Variables for IN/OUT parameters
1264 l_object_version_number number;
1265 --
1266 -- Other variables
1267 l_proc varchar2(72) := g_package ||'delete_ame_action_type_usage';
1268 Begin
1269 hr_utility.set_location(' Entering:' || l_proc,10);
1270 --
1271 -- Issue a savepoint
1272 --
1273 savepoint delete_ame_act_type_usg_swi;
1274 --
1275 -- Initialise Multiple Message Detection
1276 --
1277 hr_multi_message.enable_message_list;
1278 --
1279 -- Remember IN OUT parameter IN values
1280 --
1281 l_object_version_number := p_object_version_number;
1282 --
1283 -- Convert constant values to their corresponding boolean value
1284 --
1285 l_validate :=
1286 hr_api.constant_to_boolean
1287 (p_constant_value => p_validate);
1288 --
1289 -- Register Surrogate ID or user key values
1290 --
1291 --
1292 -- Call API
1293 --
1294 ame_action_api.delete_ame_action_type_usage
1295 (p_validate => l_validate
1296 ,p_action_type_id => p_action_type_id
1297 ,p_rule_type => p_rule_type
1298 ,p_object_version_number => p_object_version_number
1299 ,p_start_date => p_start_date
1300 ,p_end_date => p_end_date
1301 );
1302 --
1303 -- Convert API warning boolean parameter values to specific
1304 -- messages and add them to Multiple Message List
1305 --
1306 --
1307 -- Convert API non-warning boolean parameter values
1308 --
1309 --
1310 -- Derive the API return status value based on whether
1311 -- messages of any type exist in the Multiple Message List.
1312 -- Also disable Multiple Message Detection.
1313 --
1314 p_return_status := hr_multi_message.get_return_status_disable;
1315 hr_utility.set_location(' Leaving:' || l_proc,20);
1316 --
1317 exception
1318 when hr_multi_message.error_message_exist then
1319 --
1320 -- Catch the Multiple Message List exception which
1321 -- indicates API processing has been aborted because
1322 -- at least one message exists in the list.
1323 --
1324 rollback to delete_ame_act_type_usg_swi;
1325 --
1326 -- Reset IN OUT parameters and set OUT parameters
1327 --
1328 p_object_version_number := l_object_version_number;
1329 p_start_date := null;
1330 p_end_date := null;
1331 p_return_status := hr_multi_message.get_return_status_disable;
1332 hr_utility.set_location(' Leaving:' || l_proc, 30);
1333 when others then
1334 --
1335 -- When Multiple Message Detection is enabled catch
1336 -- any Application specific or other unexpected
1337 -- exceptions. Adding appropriate details to the
1338 -- Multiple Message List. Otherwise re-raise the
1339 -- error.
1340 --
1341 rollback to delete_ame_act_type_usg_swi;
1342 if hr_multi_message.unexpected_error_add(l_proc) then
1343 hr_utility.set_location(' Leaving:' || l_proc,40);
1344 raise;
1345 end if;
1346 --
1347 -- Reset IN OUT and set OUT parameters
1348 --
1349 p_object_version_number := l_object_version_number;
1350 p_start_date := null;
1351 p_end_date := null;
1352 p_return_status := hr_multi_message.get_return_status_disable;
1353 hr_utility.set_location(' Leaving:' || l_proc,50);
1354 end delete_ame_action_type_usage;
1355 -- ----------------------------------------------------------------------------
1356 -- |----------------------< delete_ame_appr_type_usage >----------------------|
1357 -- ----------------------------------------------------------------------------
1358 PROCEDURE delete_ame_appr_type_usage
1359 (p_validate in number default hr_api.g_false_num
1360 ,p_action_type_id in number
1361 ,p_approver_type_id in number
1362 ,p_object_version_number in out nocopy number
1363 ,p_start_date out nocopy date
1364 ,p_end_date out nocopy date
1365 ,p_return_status out nocopy varchar2
1366 ) is
1367 --
1368 -- Variables for API Boolean parameters
1369 l_validate boolean;
1370 --
1371 -- Variables for IN/OUT parameters
1372 l_object_version_number number;
1373 --
1374 -- Other variables
1375 l_proc varchar2(72) := g_package ||'delete_ame_appr_type_usage';
1376 Begin
1377 hr_utility.set_location(' Entering:' || l_proc,10);
1378 --
1379 -- Issue a savepoint
1380 --
1381 savepoint delete_ame_appr_type_usage_swi;
1382 --
1383 -- Initialise Multiple Message Detection
1384 --
1385 hr_multi_message.enable_message_list;
1386 --
1387 -- Remember IN OUT parameter IN values
1388 --
1389 l_object_version_number := p_object_version_number;
1390 --
1391 -- Convert constant values to their corresponding boolean value
1392 --
1393 l_validate :=
1394 hr_api.constant_to_boolean
1395 (p_constant_value => p_validate);
1396 --
1397 -- Register Surrogate ID or user key values
1398 --
1399 --
1400 -- Call API
1401 --
1402 ame_action_api.delete_ame_appr_type_usage
1403 (p_validate => l_validate
1404 ,p_action_type_id => p_action_type_id
1405 ,p_approver_type_id => p_approver_type_id
1406 ,p_object_version_number => p_object_version_number
1407 ,p_start_date => p_start_date
1408 ,p_end_date => p_end_date
1409 );
1410 --
1411 -- Convert API warning boolean parameter values to specific
1412 -- messages and add them to Multiple Message List
1413 --
1414 --
1415 -- Convert API non-warning boolean parameter values
1416 --
1417 --
1418 -- Derive the API return status value based on whether
1419 -- messages of any type exist in the Multiple Message List.
1420 -- Also disable Multiple Message Detection.
1421 --
1422 p_return_status := hr_multi_message.get_return_status_disable;
1423 hr_utility.set_location(' Leaving:' || l_proc,20);
1424 --
1425 exception
1426 when hr_multi_message.error_message_exist then
1427 --
1428 -- Catch the Multiple Message List exception which
1429 -- indicates API processing has been aborted because
1430 -- at least one message exists in the list.
1431 --
1432 rollback to delete_ame_appr_type_usage_swi;
1433 --
1434 -- Reset IN OUT parameters and set OUT parameters
1435 --
1436 p_object_version_number := l_object_version_number;
1437 p_start_date := null;
1438 p_end_date := null;
1439 p_return_status := hr_multi_message.get_return_status_disable;
1440 hr_utility.set_location(' Leaving:' || l_proc, 30);
1441 when others then
1442 --
1443 -- When Multiple Message Detection is enabled catch
1444 -- any Application specific or other unexpected
1445 -- exceptions. Adding appropriate details to the
1446 -- Multiple Message List. Otherwise re-raise the
1447 -- error.
1448 --
1449 rollback to delete_ame_appr_type_usage_swi;
1450 if hr_multi_message.unexpected_error_add(l_proc) then
1451 hr_utility.set_location(' Leaving:' || l_proc,40);
1452 raise;
1453 end if;
1454 --
1455 -- Reset IN OUT and set OUT parameters
1456 --
1457 p_object_version_number := l_object_version_number;
1458 p_start_date := null;
1459 p_end_date := null;
1460 p_return_status := hr_multi_message.get_return_status_disable;
1461 hr_utility.set_location(' Leaving:' || l_proc,50);
1462 end delete_ame_appr_type_usage;
1463 -- ----------------------------------------------------------------------------
1464 -- |-----------------------< delete_ame_req_attribute >-----------------------|
1465 -- ----------------------------------------------------------------------------
1466 PROCEDURE delete_ame_req_attribute
1467 (p_validate in number default hr_api.g_false_num
1468 ,p_action_type_id in number
1469 ,p_attribute_id in number
1470 ,p_object_version_number in out nocopy number
1471 ,p_start_date out nocopy date
1472 ,p_end_date out nocopy date
1473 ,p_return_status out nocopy varchar2
1474 ) is
1475 --
1476 -- Variables for API Boolean parameters
1477 l_validate boolean;
1478 --
1479 -- Variables for IN/OUT parameters
1480 l_object_version_number number;
1481 --
1482 -- Other variables
1483 l_proc varchar2(72) := g_package ||'delete_ame_req_attribute';
1484 Begin
1485 hr_utility.set_location(' Entering:' || l_proc,10);
1486 --
1487 -- Issue a savepoint
1488 --
1489 savepoint delete_ame_req_attribute_swi;
1490 --
1491 -- Initialise Multiple Message Detection
1492 --
1493 hr_multi_message.enable_message_list;
1494 --
1495 -- Remember IN OUT parameter IN values
1496 --
1497 l_object_version_number := p_object_version_number;
1498 --
1499 -- Convert constant values to their corresponding boolean value
1500 --
1501 l_validate :=
1502 hr_api.constant_to_boolean
1503 (p_constant_value => p_validate);
1504 --
1505 -- Register Surrogate ID or user key values
1506 --
1507 --
1508 -- Call API
1509 --
1510 ame_action_api.delete_ame_req_attribute
1511 (p_validate => l_validate
1512 ,p_action_type_id => p_action_type_id
1513 ,p_attribute_id => p_attribute_id
1514 ,p_object_version_number => p_object_version_number
1515 ,p_start_date => p_start_date
1516 ,p_end_date => p_end_date
1517 );
1518 --
1519 -- Convert API warning boolean parameter values to specific
1520 -- messages and add them to Multiple Message List
1521 --
1522 --
1523 -- Convert API non-warning boolean parameter values
1524 --
1525 --
1526 -- Derive the API return status value based on whether
1527 -- messages of any type exist in the Multiple Message List.
1528 -- Also disable Multiple Message Detection.
1529 --
1530 p_return_status := hr_multi_message.get_return_status_disable;
1531 hr_utility.set_location(' Leaving:' || l_proc,20);
1532 --
1533 exception
1534 when hr_multi_message.error_message_exist then
1535 --
1536 -- Catch the Multiple Message List exception which
1537 -- indicates API processing has been aborted because
1538 -- at least one message exists in the list.
1539 --
1540 rollback to delete_ame_req_attribute_swi;
1541 --
1542 -- Reset IN OUT parameters and set OUT parameters
1543 --
1544 p_object_version_number := l_object_version_number;
1545 p_start_date := null;
1546 p_end_date := null;
1547 p_return_status := hr_multi_message.get_return_status_disable;
1548 hr_utility.set_location(' Leaving:' || l_proc, 30);
1549 when others then
1550 --
1551 -- When Multiple Message Detection is enabled catch
1552 -- any Application specific or other unexpected
1553 -- exceptions. Adding appropriate details to the
1554 -- Multiple Message List. Otherwise re-raise the
1555 -- error.
1556 --
1557 rollback to delete_ame_req_attribute_swi;
1558 if hr_multi_message.unexpected_error_add(l_proc) then
1559 hr_utility.set_location(' Leaving:' || l_proc,40);
1560 raise;
1561 end if;
1562 --
1563 -- Reset IN OUT and set OUT parameters
1564 --
1565 p_object_version_number := l_object_version_number;
1566 p_start_date := null;
1567 p_end_date := null;
1568 p_return_status := hr_multi_message.get_return_status_disable;
1569 hr_utility.set_location(' Leaving:' || l_proc,50);
1570 end delete_ame_req_attribute;
1571 -- ----------------------------------------------------------------------------
1572 -- |---------------------------< delete_ame_action >--------------------------|
1573 -- ----------------------------------------------------------------------------
1574 PROCEDURE delete_ame_action
1575 (p_validate in number default hr_api.g_false_num
1576 ,p_action_id in number
1577 ,p_action_type_id in number
1578 ,p_object_version_number in out nocopy number
1579 ,p_start_date out nocopy date
1580 ,p_end_date out nocopy date
1581 ,p_return_status out nocopy varchar2
1582 ) is
1583 --
1584 -- Variables for API Boolean parameters
1585 l_validate boolean;
1586 --
1587 -- Variables for IN/OUT parameters
1588 l_object_version_number number;
1589 --
1590 -- Other variables
1591 l_proc varchar2(72) := g_package ||'delete_ame_action';
1592 Begin
1593 hr_utility.set_location(' Entering:' || l_proc,10);
1594 --
1595 -- Issue a savepoint
1596 --
1597 savepoint delete_ame_action_swi;
1598 --
1599 -- Initialise Multiple Message Detection
1600 --
1601 hr_multi_message.enable_message_list;
1602 --
1603 -- Remember IN OUT parameter IN values
1604 --
1605 l_object_version_number := p_object_version_number;
1606 --
1607 -- Convert constant values to their corresponding boolean value
1608 --
1609 l_validate :=
1610 hr_api.constant_to_boolean
1611 (p_constant_value => p_validate);
1612 --
1613 -- Register Surrogate ID or user key values
1614 --
1615 --
1616 -- Call API
1617 --
1618 ame_action_api.delete_ame_action
1619 (p_validate => l_validate
1620 ,p_action_id => p_action_id
1621 ,p_action_type_id => p_action_type_id
1622 ,p_object_version_number => p_object_version_number
1623 ,p_start_date => p_start_date
1624 ,p_end_date => p_end_date
1625 );
1626 --
1627 -- Convert API warning boolean parameter values to specific
1628 -- messages and add them to Multiple Message List
1629 --
1630 --
1631 -- Convert API non-warning boolean parameter values
1632 --
1633 --
1634 -- Derive the API return status value based on whether
1635 -- messages of any type exist in the Multiple Message List.
1636 -- Also disable Multiple Message Detection.
1637 --
1638 p_return_status := hr_multi_message.get_return_status_disable;
1639 hr_utility.set_location(' Leaving:' || l_proc,20);
1640 --
1641 exception
1642 when hr_multi_message.error_message_exist then
1643 --
1644 -- Catch the Multiple Message List exception which
1645 -- indicates API processing has been aborted because
1646 -- at least one message exists in the list.
1647 --
1648 rollback to delete_ame_action_swi;
1649 --
1650 -- Reset IN OUT parameters and set OUT parameters
1651 --
1652 p_object_version_number := l_object_version_number;
1653 p_start_date := null;
1654 p_end_date := null;
1655 p_return_status := hr_multi_message.get_return_status_disable;
1656 hr_utility.set_location(' Leaving:' || l_proc, 30);
1657 when others then
1658 --
1659 -- When Multiple Message Detection is enabled catch
1660 -- any Application specific or other unexpected
1661 -- exceptions. Adding appropriate details to the
1662 -- Multiple Message List. Otherwise re-raise the
1663 -- error.
1664 --
1665 rollback to delete_ame_action_swi;
1666 if hr_multi_message.unexpected_error_add(l_proc) then
1667 hr_utility.set_location(' Leaving:' || l_proc,40);
1668 raise;
1669 end if;
1670 --
1671 -- Reset IN OUT and set OUT parameters
1672 --
1673 p_object_version_number := l_object_version_number;
1674 p_start_date := null;
1675 p_end_date := null;
1676 p_return_status := hr_multi_message.get_return_status_disable;
1677 hr_utility.set_location(' Leaving:' || l_proc,50);
1678 end delete_ame_action;
1679 end ame_action_swi;