[Home] [Help]
PACKAGE BODY: APPS.HR_APPRAISAL_TEMPLATES_API
Source
1 Package Body hr_appraisal_templates_api as
2 /* $Header: peaptapi.pkb 120.2 2007/06/20 07:47:12 rapandi ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' hr_appraisal_templates_api.';
7 --
8 -- ---------------------------------------------------------------------------
9 -- |-----------------------< <create_appraisal_template> >--------------------------|
10 -- ---------------------------------------------------------------------------
11 --
12 procedure create_appraisal_template
13 (p_validate in boolean default false,
14 p_effective_date in date,
15 p_business_group_id in number,
16 p_name in varchar2,
17 p_description in varchar2 default null,
18 p_instructions in varchar2 default null,
19 p_date_from in date default null,
20 p_date_to in date default null,
21 p_assessment_type_id in number default null,
22 p_rating_scale_id in number default null,
23 p_questionnaire_template_id in number default null,
24 p_attribute_category in varchar2 default null,
25 p_attribute1 in varchar2 default null,
26 p_attribute2 in varchar2 default null,
27 p_attribute3 in varchar2 default null,
28 p_attribute4 in varchar2 default null,
29 p_attribute5 in varchar2 default null,
30 p_attribute6 in varchar2 default null,
31 p_attribute7 in varchar2 default null,
32 p_attribute8 in varchar2 default null,
33 p_attribute9 in varchar2 default null,
34 p_attribute10 in varchar2 default null,
35 p_attribute11 in varchar2 default null,
36 p_attribute12 in varchar2 default null,
37 p_attribute13 in varchar2 default null,
38 p_attribute14 in varchar2 default null,
39 p_attribute15 in varchar2 default null,
40 p_attribute16 in varchar2 default null,
41 p_attribute17 in varchar2 default null,
42 p_attribute18 in varchar2 default null,
43 p_attribute19 in varchar2 default null,
44 p_attribute20 in varchar2 default null
45 ,p_objective_asmnt_type_id in number default null
46 ,p_ma_quest_template_id in number default null
47 ,p_link_appr_to_learning_path in varchar2 default null
48 ,p_final_score_formula_id in number default null
49 ,p_update_personal_comp_profile in varchar2 default null
50 ,p_comp_profile_source_type in varchar2 default null
51 ,p_show_competency_ratings in varchar2 default null
52 ,p_show_objective_ratings in varchar2 default null
53 ,p_show_overall_ratings in varchar2 default null
54 ,p_show_overall_comments in varchar2 default null
55 ,p_provide_overall_feedback in varchar2 default null
56 ,p_show_participant_details in varchar2 default null
57 ,p_allow_add_participant in varchar2 default null
58 ,p_show_additional_details in varchar2 default null
59 ,p_show_participant_names in varchar2 default null
60 ,p_show_participant_ratings in varchar2 default null
61 ,p_available_flag in varchar2 default null
62 ,p_show_questionnaire_info in varchar2 default null
63 ,p_ma_off_template_code in varchar2 default null
64 ,p_appraisee_off_template_code in varchar2 default null
65 ,p_other_part_off_template_code in varchar2 default null
66 ,p_part_app_off_template_code in varchar2 default null
67 ,p_part_rev_off_template_code in varchar2 default null,
68 p_appraisal_template_id out nocopy number,
69 p_object_version_number out nocopy number
70 )
71 is
72 --
73 -- Declare cursors and local variables
74 --
75 --
76 l_proc varchar2(72) := g_package||'create_appraisal_template';
77 l_appraisal_template_id per_appraisal_templates.appraisal_template_id%TYPE;
78 l_object_version_number per_appraisal_templates.object_version_number%TYPE;
79 begin
80 hr_utility.set_location('Entering:'|| l_proc, 5);
81 --
82 -- Issue a savepoint.
83 --
84 savepoint create_appraisal_template;
85 hr_utility.set_location(l_proc, 6);
86 --
87 -- Call Before Process User Hook
88 --
89 begin
90 hr_appraisal_templates_bk1.create_appraisal_template_b (
91 p_effective_date => p_effective_date,
92 p_business_group_id => p_business_group_id,
93 p_name => p_name,
94 p_description => p_description,
95 p_instructions => p_instructions,
96 p_date_from => trunc(p_date_from),
97 p_date_to => trunc(p_date_to),
98 p_assessment_type_id => p_assessment_type_id,
99 p_rating_scale_id => p_rating_scale_id,
100 p_questionnaire_template_id => p_questionnaire_template_id,
101 p_attribute_category => p_attribute_category,
102 p_attribute1 => p_attribute1,
103 p_attribute2 => p_attribute2,
104 p_attribute3 => p_attribute3,
105 p_attribute4 => p_attribute4,
106 p_attribute5 => p_attribute5,
107 p_attribute6 => p_attribute6,
108 p_attribute7 => p_attribute7,
109 p_attribute8 => p_attribute8,
110 p_attribute9 => p_attribute9,
111 p_attribute10 => p_attribute10,
112 p_attribute11 => p_attribute11,
113 p_attribute12 => p_attribute12,
114 p_attribute13 => p_attribute13,
115 p_attribute14 => p_attribute14,
116 p_attribute15 => p_attribute15,
117 p_attribute16 => p_attribute16,
118 p_attribute17 => p_attribute17,
119 p_attribute18 => p_attribute18,
120 p_attribute19 => p_attribute19,
121 p_attribute20 => p_attribute20
122 ,p_objective_asmnt_type_id
123 => p_objective_asmnt_type_id
124 ,p_ma_quest_template_id
125 => p_ma_quest_template_id
126 ,p_link_appr_to_learning_path
127 => p_link_appr_to_learning_path
128 ,p_final_score_formula_id
129 => p_final_score_formula_id
130 ,p_update_personal_comp_profile
131 => p_update_personal_comp_profile
132 ,p_comp_profile_source_type
133 => p_comp_profile_source_type
134 ,p_show_competency_ratings
135 => p_show_competency_ratings
136 ,p_show_objective_ratings
137 => p_show_objective_ratings
138 ,p_show_overall_ratings
139 => p_show_overall_ratings
140 ,p_show_overall_comments
141 => p_show_overall_comments
142 ,p_provide_overall_feedback
143 => p_provide_overall_feedback
144 ,p_show_participant_details
145 => p_show_participant_details
146 ,p_allow_add_participant
147 => p_allow_add_participant
148 ,p_show_additional_details
149 => p_show_additional_details
150 ,p_show_participant_names
151 => p_show_participant_names
152 ,p_show_participant_ratings
153 => p_show_participant_ratings
154 ,p_available_flag
155 => p_available_flag
156 ,p_show_questionnaire_info => p_show_questionnaire_info
157 ,p_ma_off_template_code => p_ma_off_template_code
158 ,p_appraisee_off_template_code => p_appraisee_off_template_code
159 ,p_other_part_off_template_code => p_other_part_off_template_code
160 ,p_part_app_off_template_code => p_part_app_off_template_code
161 ,p_part_rev_off_template_code => p_part_rev_off_template_code
162 );
163 exception
164 when hr_api.cannot_find_prog_unit then
165 hr_api.cannot_find_prog_unit_error
166 (p_module_name => 'create_appraisal_template',
167 p_hook_type => 'BP'
168 );
169 end;
170 --
171 -- End of Before Process User Hook call
172 --
173 -- Validation in addition to Table Handlers
174 --
175 hr_utility.set_location(l_proc, 7);
176 --
177 -- Process Logic
178 --
179 per_apt_ins.ins
180 (p_validate => p_validate,
181 p_effective_date => p_effective_date,
182 p_business_group_id => p_business_group_id,
183 p_name => p_name,
184 p_description => p_description,
185 p_instructions => p_instructions,
186 p_date_from => trunc(p_date_from),
187 p_date_to => trunc(p_date_to),
188 p_assessment_type_id => p_assessment_type_id,
189 p_rating_scale_id => p_rating_scale_id,
190 p_questionnaire_template_id => p_questionnaire_template_id,
191 p_attribute_category => p_attribute_category,
192 p_attribute1 => p_attribute1,
193 p_attribute2 => p_attribute2,
194 p_attribute3 => p_attribute3,
195 p_attribute4 => p_attribute4,
196 p_attribute5 => p_attribute5,
197 p_attribute6 => p_attribute6,
198 p_attribute7 => p_attribute7,
199 p_attribute8 => p_attribute8,
200 p_attribute9 => p_attribute9,
201 p_attribute10 => p_attribute10,
202 p_attribute11 => p_attribute11,
203 p_attribute12 => p_attribute12,
204 p_attribute13 => p_attribute13,
205 p_attribute14 => p_attribute14,
206 p_attribute15 => p_attribute15,
207 p_attribute16 => p_attribute16,
208 p_attribute17 => p_attribute17,
209 p_attribute18 => p_attribute18,
210 p_attribute19 => p_attribute19,
211 p_attribute20 => p_attribute20
212 ,p_objective_asmnt_type_id
213 => p_objective_asmnt_type_id
214 ,p_ma_quest_template_id
215 => p_ma_quest_template_id
216 ,p_link_appr_to_learning_path
217 => p_link_appr_to_learning_path
218 ,p_final_score_formula_id
219 => p_final_score_formula_id
220 ,p_update_personal_comp_profile
221 => p_update_personal_comp_profile
222 ,p_comp_profile_source_type
223 => p_comp_profile_source_type
224 ,p_show_competency_ratings
225 => p_show_competency_ratings
226 ,p_show_objective_ratings
227 => p_show_objective_ratings
228 ,p_show_overall_ratings
229 => p_show_overall_ratings
230 ,p_show_overall_comments
231 => p_show_overall_comments
232 ,p_provide_overall_feedback
233 => p_provide_overall_feedback
234 ,p_show_participant_details
235 => p_show_participant_details
236 ,p_allow_add_participant
237 => p_allow_add_participant
238 ,p_show_additional_details
239 => p_show_additional_details
240 ,p_show_participant_names
241 => p_show_participant_names
242 ,p_show_participant_ratings
243 => p_show_participant_ratings
244 ,p_available_flag
245 => p_available_flag
246 ,p_show_questionnaire_info => p_show_questionnaire_info
247 ,p_ma_off_template_code => p_ma_off_template_code
248 ,p_appraisee_off_template_code => p_appraisee_off_template_code
249 ,p_other_part_off_template_code => p_other_part_off_template_code
250 ,p_part_app_off_template_code => p_part_app_off_template_code
251 ,p_part_rev_off_template_code => p_part_rev_off_template_code,
252 p_appraisal_template_id => l_appraisal_template_id,
253 p_object_version_number => l_object_version_number
254 );
255 --
256 hr_utility.set_location(l_proc, 8);
257 --
258 -- Call After Process User Hook
259 --
260 begin
261 hr_appraisal_templates_bk1.create_appraisal_template_a (
262 p_appraisal_template_id => l_appraisal_template_id,
263 p_object_version_number => l_object_version_number,
264 p_effective_date => p_effective_date,
265 p_business_group_id => p_business_group_id,
266 p_name => p_name,
267 p_description => p_description,
268 p_instructions => p_instructions,
269 p_date_from => trunc(p_date_from),
270 p_date_to => trunc(p_date_to),
271 p_assessment_type_id => p_assessment_type_id,
272 p_rating_scale_id => p_rating_scale_id,
273 p_questionnaire_template_id => p_questionnaire_template_id,
274 p_attribute_category => p_attribute_category,
275 p_attribute1 => p_attribute1,
276 p_attribute2 => p_attribute2,
277 p_attribute3 => p_attribute3,
278 p_attribute4 => p_attribute4,
279 p_attribute5 => p_attribute5,
280 p_attribute6 => p_attribute6,
281 p_attribute7 => p_attribute7,
282 p_attribute8 => p_attribute8,
283 p_attribute9 => p_attribute9,
284 p_attribute10 => p_attribute10,
285 p_attribute11 => p_attribute11,
286 p_attribute12 => p_attribute12,
287 p_attribute13 => p_attribute13,
288 p_attribute14 => p_attribute14,
289 p_attribute15 => p_attribute15,
290 p_attribute16 => p_attribute16,
291 p_attribute17 => p_attribute17,
292 p_attribute18 => p_attribute18,
293 p_attribute19 => p_attribute19,
294 p_attribute20 => p_attribute20
295 ,p_objective_asmnt_type_id
296 => p_objective_asmnt_type_id
297 ,p_ma_quest_template_id
298 => p_ma_quest_template_id
299 ,p_link_appr_to_learning_path
300 => p_link_appr_to_learning_path
301 ,p_final_score_formula_id
302 => p_final_score_formula_id
303 ,p_update_personal_comp_profile
304 => p_update_personal_comp_profile
305 ,p_comp_profile_source_type
306 => p_comp_profile_source_type
307 ,p_show_competency_ratings
308 => p_show_competency_ratings
309 ,p_show_objective_ratings
310 => p_show_objective_ratings
311 ,p_show_overall_ratings
312 => p_show_overall_ratings
313 ,p_show_overall_comments
314 => p_show_overall_comments
315 ,p_provide_overall_feedback
316 => p_provide_overall_feedback
317 ,p_show_participant_details
318 => p_show_participant_details
319 ,p_allow_add_participant
320 => p_allow_add_participant
321 ,p_show_additional_details
322 => p_show_additional_details
323 ,p_show_participant_names
324 => p_show_participant_names
325 ,p_show_participant_ratings
326 => p_show_participant_ratings
327 ,p_available_flag
328 => p_available_flag
329 ,p_show_questionnaire_info => p_show_questionnaire_info
330 ,p_ma_off_template_code => p_ma_off_template_code
331 ,p_appraisee_off_template_code => p_appraisee_off_template_code
332 ,p_other_part_off_template_code => p_other_part_off_template_code
333 ,p_part_app_off_template_code => p_part_app_off_template_code
334 ,p_part_rev_off_template_code => p_part_rev_off_template_code
335 );
336 exception
337 when hr_api.cannot_find_prog_unit then
338 hr_api.cannot_find_prog_unit_error
339 (p_module_name => 'create_appraisal_template',
340 p_hook_type => 'AP'
341 );
342 end;
343 --
344 -- End of After process user hook
345 --
346 -- When in validation only mode raise the Validate_Enabled exception
347 --
348 if p_validate then
349 raise hr_api.validate_enabled;
350 end if;
351 --
352 -- Set all output arguments
353 --
354 p_appraisal_template_id := l_appraisal_template_id;
355 p_object_version_number := l_object_version_number;
356 --
357 hr_utility.set_location(' Leaving:'||l_proc, 11);
358 exception
359 when hr_api.validate_enabled then
360 --
361 -- As the Validate_Enabled exception has been raised
362 -- we must rollback to the savepoint
363 --
364 ROLLBACK TO create_appraisal_template;
365 --
366 -- Only set output warning arguments
367 -- (Any key or derived arguments must be set to null
368 -- when validation only mode is being used.)
369 --
370 p_appraisal_template_id := null;
371 p_object_version_number := null;
372 --
373 when others then
374 --
375 -- A validation or unexpected error has occurred
376 --
377 -- Added as part of fix to bug 632482
378 --
379 ROLLBACK TO create_appraisal_template;
380 raise;
381 --
382 -- End of fix.
383 --
384 hr_utility.set_location(' Leaving:'||l_proc, 12);
385 end create_appraisal_template;
386 --
387 --
388 -- ---------------------------------------------------------------------------
389 -- |-----------------------< <update_appraisal_template> >--------------------------|
390 -- ---------------------------------------------------------------------------
391 --
392 procedure update_appraisal_template
393 (p_validate in boolean default false,
394 p_effective_date in date,
395 p_appraisal_template_id in number,
396 p_object_version_number in out nocopy number,
397 p_name in varchar2 default hr_api.g_varchar2,
398 p_description in varchar2 default hr_api.g_varchar2,
399 p_instructions in varchar2 default hr_api.g_varchar2,
400 p_date_from in date default hr_api.g_date,
401 p_date_to in date default hr_api.g_date,
402 p_assessment_type_id in number default hr_api.g_number,
403 p_rating_scale_id in number default hr_api.g_number,
404 p_questionnaire_template_id in number default hr_api.g_number,
405 p_attribute_category in varchar2 default hr_api.g_varchar2,
406 p_attribute1 in varchar2 default hr_api.g_varchar2,
407 p_attribute2 in varchar2 default hr_api.g_varchar2,
408 p_attribute3 in varchar2 default hr_api.g_varchar2,
409 p_attribute4 in varchar2 default hr_api.g_varchar2,
410 p_attribute5 in varchar2 default hr_api.g_varchar2,
411 p_attribute6 in varchar2 default hr_api.g_varchar2,
412 p_attribute7 in varchar2 default hr_api.g_varchar2,
413 p_attribute8 in varchar2 default hr_api.g_varchar2,
414 p_attribute9 in varchar2 default hr_api.g_varchar2,
415 p_attribute10 in varchar2 default hr_api.g_varchar2,
416 p_attribute11 in varchar2 default hr_api.g_varchar2,
417 p_attribute12 in varchar2 default hr_api.g_varchar2,
418 p_attribute13 in varchar2 default hr_api.g_varchar2,
419 p_attribute14 in varchar2 default hr_api.g_varchar2,
420 p_attribute15 in varchar2 default hr_api.g_varchar2,
421 p_attribute16 in varchar2 default hr_api.g_varchar2,
422 p_attribute17 in varchar2 default hr_api.g_varchar2,
423 p_attribute18 in varchar2 default hr_api.g_varchar2,
424 p_attribute19 in varchar2 default hr_api.g_varchar2,
425 p_attribute20 in varchar2 default hr_api.g_varchar2,
426 p_objective_asmnt_type_id in number default hr_api.g_number
427 ,p_ma_quest_template_id in number default hr_api.g_number
428 ,p_link_appr_to_learning_path in varchar2 default hr_api.g_varchar2
429 ,p_final_score_formula_id in number default hr_api.g_number
430 ,p_update_personal_comp_profile in varchar2 default hr_api.g_varchar2
431 ,p_comp_profile_source_type in varchar2 default hr_api.g_varchar2
432 ,p_show_competency_ratings in varchar2 default hr_api.g_varchar2
433 ,p_show_objective_ratings in varchar2 default hr_api.g_varchar2
434 ,p_show_overall_ratings in varchar2 default hr_api.g_varchar2
435 ,p_show_overall_comments in varchar2 default hr_api.g_varchar2
436 ,p_provide_overall_feedback in varchar2 default hr_api.g_varchar2
437 ,p_show_participant_details in varchar2 default hr_api.g_varchar2
438 ,p_allow_add_participant in varchar2 default hr_api.g_varchar2
439 ,p_show_additional_details in varchar2 default hr_api.g_varchar2
440 ,p_show_participant_names in varchar2 default hr_api.g_varchar2
441 ,p_show_participant_ratings in varchar2 default hr_api.g_varchar2
442 ,p_available_flag in varchar2 default hr_api.g_varchar2
443 ,p_show_questionnaire_info in varchar2 default hr_api.g_varchar2
444 ,p_ma_off_template_code in varchar2 default hr_api.g_varchar2
445 ,p_appraisee_off_template_code in varchar2 default hr_api.g_varchar2
446 ,p_other_part_off_template_code in varchar2 default hr_api.g_varchar2
447 ,p_part_app_off_template_code in varchar2 default hr_api.g_varchar2
448 ,p_part_rev_off_template_code in varchar2 default hr_api.g_varchar2
449 ) is
450 --
451 -- Declare cursors and local variables
452 --
453
454 l_proc varchar2(72) := g_package||'update_appraisal_template';
455 l_object_version_number per_appraisal_templates.object_version_number%TYPE;
456 --
457 lv_object_version_number per_appraisal_templates.object_version_number%TYPE := p_object_version_number ;
458 --
459 begin
460 hr_utility.set_location('Entering:'|| l_proc, 5);
461 --
462 -- Issue a savepoint.
463 --
464 savepoint update_appraisal_template;
465 hr_utility.set_location(l_proc, 6);
466 --
467 --
468 -- Call Before Process User Hook
469 --
470 begin
471 hr_appraisal_templates_bk2.update_appraisal_template_b (
472 p_effective_date => p_effective_date,
473 p_appraisal_template_id => p_appraisal_template_id,
474 p_object_version_number => p_object_version_number,
475 p_name => p_name,
476 p_description => p_description,
477 p_instructions => p_instructions,
478 p_date_from => trunc(p_date_from),
479 p_date_to => trunc(p_date_to),
480 p_assessment_type_id => p_assessment_type_id,
481 p_rating_scale_id => p_rating_scale_id,
482 p_questionnaire_template_id => p_questionnaire_template_id,
483 p_attribute_category => p_attribute_category,
484 p_attribute1 => p_attribute1,
485 p_attribute2 => p_attribute2,
486 p_attribute3 => p_attribute3,
487 p_attribute4 => p_attribute4,
488 p_attribute5 => p_attribute5,
489 p_attribute6 => p_attribute6,
490 p_attribute7 => p_attribute7,
491 p_attribute8 => p_attribute8,
492 p_attribute9 => p_attribute9,
493 p_attribute10 => p_attribute10,
494 p_attribute11 => p_attribute11,
495 p_attribute12 => p_attribute12,
496 p_attribute13 => p_attribute13,
497 p_attribute14 => p_attribute14,
498 p_attribute15 => p_attribute15,
499 p_attribute16 => p_attribute16,
500 p_attribute17 => p_attribute17,
501 p_attribute18 => p_attribute18,
502 p_attribute19 => p_attribute19,
503 p_attribute20 => p_attribute20
504 ,p_objective_asmnt_type_id
505 => p_objective_asmnt_type_id
506 ,p_ma_quest_template_id
507 => p_ma_quest_template_id
508 ,p_link_appr_to_learning_path
509 => p_link_appr_to_learning_path
510 ,p_final_score_formula_id
511 => p_final_score_formula_id
512 ,p_update_personal_comp_profile
513 => p_update_personal_comp_profile
514 ,p_comp_profile_source_type
515 => p_comp_profile_source_type
516 ,p_show_competency_ratings
517 => p_show_competency_ratings
518 ,p_show_objective_ratings
519 => p_show_objective_ratings
520 ,p_show_overall_ratings
521 => p_show_overall_ratings
522 ,p_show_overall_comments
523 => p_show_overall_comments
524 ,p_provide_overall_feedback
525 => p_provide_overall_feedback
526 ,p_show_participant_details
527 => p_show_participant_details
528 ,p_allow_add_participant
529 => p_allow_add_participant
530 ,p_show_additional_details
531 => p_show_additional_details
532 ,p_show_participant_names
533 => p_show_participant_names
534 ,p_show_participant_ratings
535 => p_show_participant_ratings
536 ,p_available_flag
537 => p_available_flag
538 ,p_show_questionnaire_info => p_show_questionnaire_info
539 ,p_ma_off_template_code => p_ma_off_template_code
540 ,p_appraisee_off_template_code => p_appraisee_off_template_code
541 ,p_other_part_off_template_code => p_other_part_off_template_code
542 ,p_part_app_off_template_code => p_part_app_off_template_code
543 ,p_part_rev_off_template_code => p_part_rev_off_template_code
544 );
545 exception
546 when hr_api.cannot_find_prog_unit then
547 hr_api.cannot_find_prog_unit_error
548 (p_module_name => 'update_appraisal_template',
549 p_hook_type => 'BP'
550 );
551 end;
552 --
553 -- Validation in addition to Table Handlers
554 --
555 hr_utility.set_location(l_proc, 7);
556 --
557 -- Process Logic
558 --
559 l_object_version_number := p_object_version_number;
560 --
561 per_apt_upd.upd
562 (p_validate => p_validate,
563 p_effective_date => p_effective_date,
564 p_appraisal_template_id => p_appraisal_template_id,
565 p_object_version_number => l_object_version_number,
566 p_name => p_name,
567 p_description => p_description,
568 p_instructions => p_instructions,
569 p_date_from => trunc(p_date_from),
570 p_date_to => trunc(p_date_to),
571 p_assessment_type_id => p_assessment_type_id,
572 p_rating_scale_id => p_rating_scale_id,
573 p_questionnaire_template_id => p_questionnaire_template_id,
574 p_attribute_category => p_attribute_category,
575 p_attribute1 => p_attribute1,
576 p_attribute2 => p_attribute2,
577 p_attribute3 => p_attribute3,
578 p_attribute4 => p_attribute4,
579 p_attribute5 => p_attribute5,
580 p_attribute6 => p_attribute6,
581 p_attribute7 => p_attribute7,
582 p_attribute8 => p_attribute8,
583 p_attribute9 => p_attribute9,
584 p_attribute10 => p_attribute10,
585 p_attribute11 => p_attribute11,
586 p_attribute12 => p_attribute12,
587 p_attribute13 => p_attribute13,
588 p_attribute14 => p_attribute14,
589 p_attribute15 => p_attribute15,
590 p_attribute16 => p_attribute16,
591 p_attribute17 => p_attribute17,
592 p_attribute18 => p_attribute18,
593 p_attribute19 => p_attribute19,
594 p_attribute20 => p_attribute20
595 ,p_objective_asmnt_type_id
596 => p_objective_asmnt_type_id
597 ,p_ma_quest_template_id
598 => p_ma_quest_template_id
599 ,p_link_appr_to_learning_path
600 => p_link_appr_to_learning_path
601 ,p_final_score_formula_id
602 => p_final_score_formula_id
603 ,p_update_personal_comp_profile
604 => p_update_personal_comp_profile
605 ,p_comp_profile_source_type
606 => p_comp_profile_source_type
607 ,p_show_competency_ratings
608 => p_show_competency_ratings
609 ,p_show_objective_ratings
610 => p_show_objective_ratings
611 ,p_show_overall_ratings
612 => p_show_overall_ratings
613 ,p_show_overall_comments
614 => p_show_overall_comments
615 ,p_provide_overall_feedback
616 => p_provide_overall_feedback
617 ,p_show_participant_details
618 => p_show_participant_details
619 ,p_allow_add_participant
620 => p_allow_add_participant
621 ,p_show_additional_details
622 => p_show_additional_details
623 ,p_show_participant_names
624 => p_show_participant_names
625 ,p_show_participant_ratings
626 => p_show_participant_ratings
627 ,p_available_flag
628 => p_available_flag
629 ,p_show_questionnaire_info => p_show_questionnaire_info
630 ,p_ma_off_template_code => p_ma_off_template_code
631 ,p_appraisee_off_template_code => p_appraisee_off_template_code
632 ,p_other_part_off_template_code => p_other_part_off_template_code
633 ,p_part_app_off_template_code => p_part_app_off_template_code
634 ,p_part_rev_off_template_code => p_part_rev_off_template_code
635 );
636 --
637 --
638 hr_utility.set_location(l_proc, 8);
639 --
640 -- Call After Process User Hook
641 --
642 begin
643 hr_appraisal_templates_bk2.update_appraisal_template_a (
644 p_effective_date => p_effective_date,
645 p_appraisal_template_id => p_appraisal_template_id,
646 p_object_version_number => l_object_version_number,
647 p_name => p_name,
648 p_description => p_description,
649 p_instructions => p_instructions,
650 p_date_from => trunc(p_date_from),
651 p_date_to => trunc(p_date_to),
652 p_assessment_type_id => p_assessment_type_id,
653 p_rating_scale_id => p_rating_scale_id,
654 p_questionnaire_template_id => p_questionnaire_template_id,
655 p_attribute_category => p_attribute_category,
656 p_attribute1 => p_attribute1,
657 p_attribute2 => p_attribute2,
658 p_attribute3 => p_attribute3,
659 p_attribute4 => p_attribute4,
660 p_attribute5 => p_attribute5,
661 p_attribute6 => p_attribute6,
662 p_attribute7 => p_attribute7,
663 p_attribute8 => p_attribute8,
664 p_attribute9 => p_attribute9,
665 p_attribute10 => p_attribute10,
666 p_attribute11 => p_attribute11,
667 p_attribute12 => p_attribute12,
668 p_attribute13 => p_attribute13,
669 p_attribute14 => p_attribute14,
670 p_attribute15 => p_attribute15,
671 p_attribute16 => p_attribute16,
672 p_attribute17 => p_attribute17,
673 p_attribute18 => p_attribute18,
674 p_attribute19 => p_attribute19,
675 p_attribute20 => p_attribute20
676 ,p_objective_asmnt_type_id
677 => p_objective_asmnt_type_id
678 ,p_ma_quest_template_id
679 => p_ma_quest_template_id
680 ,p_link_appr_to_learning_path
681 => p_link_appr_to_learning_path
682 ,p_final_score_formula_id
683 => p_final_score_formula_id
684 ,p_update_personal_comp_profile
685 => p_update_personal_comp_profile
686 ,p_comp_profile_source_type
687 => p_comp_profile_source_type
688 ,p_show_competency_ratings
689 => p_show_competency_ratings
690 ,p_show_objective_ratings
691 => p_show_objective_ratings
692 ,p_show_overall_ratings
693 => p_show_overall_ratings
694 ,p_show_overall_comments
695 => p_show_overall_comments
696 ,p_provide_overall_feedback
697 => p_provide_overall_feedback
698 ,p_show_participant_details
699 => p_show_participant_details
700 ,p_allow_add_participant
701 => p_allow_add_participant
702 ,p_show_additional_details
703 => p_show_additional_details
704 ,p_show_participant_names
705 => p_show_participant_names
706 ,p_show_participant_ratings
707 => p_show_participant_ratings
708 ,p_available_flag
709 => p_available_flag
710 ,p_show_questionnaire_info => p_show_questionnaire_info
711 ,p_ma_off_template_code => p_ma_off_template_code
712 ,p_appraisee_off_template_code => p_appraisee_off_template_code
713 ,p_other_part_off_template_code => p_other_part_off_template_code
714 ,p_part_app_off_template_code => p_part_app_off_template_code
715 ,p_part_rev_off_template_code => p_part_rev_off_template_code
716 );
717 exception
718 when hr_api.cannot_find_prog_unit then
719 hr_api.cannot_find_prog_unit_error
720 (p_module_name => 'update_appraisal_template',
721 p_hook_type => 'AP'
722 );
723 end;
724 --
725 -- End After Process User Hook
726 --
727 -- When in validation only mode raise the Validate_Enabled exception
728 --
729 if p_validate then
730 raise hr_api.validate_enabled;
731 end if;
732 --
733 -- Set all output arguments. l_object_version_number now has the new
734 -- object version number as the update was successful
735 --
736 p_object_version_number := l_object_version_number;
737 --
738 hr_utility.set_location(' Leaving:'||l_proc, 11);
739 exception
740 when hr_api.validate_enabled then
741 --
742 -- As the Validate_Enabled exception has been raised
743 -- we must rollback to the savepoint
744 --
745 ROLLBACK TO update_appraisal_template;
746 --
747 -- Only set output warning arguments and in out arguments back
748 -- to their IN value
749 -- (Any key or derived arguments must be set to null
750 -- when validation only mode is being used.)
751 --
752 p_object_version_number := l_object_version_number;
753 --
754 when others then
755 --
756 -- A validation or unexpected error has occurred
757 --
758 -- Added as part of fix to bug 632482
759 --
760 p_object_version_number := lv_object_version_number;
761
762 ROLLBACK TO update_appraisal_template;
763 raise;
764 --
765 -- End of fix.
766 --
767 hr_utility.set_location(' Leaving:'||l_proc, 12);
768 --
769 end update_appraisal_template;
770 --
771 --
772 -- ---------------------------------------------------------------------------
773 -- |-----------------------< <delete_appraisal_template> >--------------------------|
774 -- ---------------------------------------------------------------------------
775 --
776 procedure delete_appraisal_template
777 (p_validate in boolean default false,
778 p_appraisal_template_id in number,
779 p_object_version_number in number
780 ) is
781 --
782 -- Declare cursors and local variables
783 --
784 --
785 l_proc varchar2(72) := g_package||'delete_appraisal_template';
786 begin
787 hr_utility.set_location('Entering:'|| l_proc, 5);
788 --
789 -- Issue a savepoint.
790 --
791 savepoint delete_appraisal_template;
792 hr_utility.set_location(l_proc, 6);
793 --
794 -- Call Before Process User Hook
795 --
796 begin
797 hr_appraisal_templates_bk3.delete_appraisal_template_b
798 (
799 p_appraisal_template_id => p_appraisal_template_id,
800 p_object_version_number => p_object_version_number
801 );
802 exception
803 when hr_api.cannot_find_prog_unit then
804 hr_api.cannot_find_prog_unit_error
805 (p_module_name => 'delete_appraisal_template',
806 p_hook_type => 'BP'
807 );
808 end;
809 --
810 -- End of Before Process User hook
811 --
812 -- Validation in addition to Table Handlers
813 --
814 hr_utility.set_location(l_proc, 7);
815 --
816 -- Process Logic
817 --
818 -- now delete the appraisal template
819 --
820 per_apt_del.del
821 (p_validate => FALSE
822 ,p_appraisal_template_id => p_appraisal_template_id
823 ,p_object_version_number => p_object_version_number
824 );
825 --
826 hr_utility.set_location(l_proc, 8);
827 --
828 -- Call After Process User Hook
829 --
830 begin
831 hr_appraisal_templates_bk3.delete_appraisal_template_a (
832 p_appraisal_template_id => p_appraisal_template_id,
833 p_object_version_number => p_object_version_number );
834 exception
835 when hr_api.cannot_find_prog_unit then
836 hr_api.cannot_find_prog_unit_error
837 (p_module_name => 'delete_appraisal_template',
838 p_hook_type => 'AP'
839 );
840 end;
841 --
842 -- End of After Process User hook
843 --
844 -- When in validation only mode raise the Validate_Enabled exception
845 --
846 if p_validate then
847 raise hr_api.validate_enabled;
848 end if;
849 --
850 hr_utility.set_location(' Leaving:'||l_proc, 11);
851 exception
852 when hr_api.validate_enabled then
853 --
854 -- As the Validate_Enabled exception has been raised
855 -- we must rollback to the savepoint
856 --
857 ROLLBACK TO delete_appraisal_template;
858 --
859 --
860 when others then
861 --
862 -- A validation or unexpected error has occurred
863 --
864 -- Added as part of fix to bug 632482
865 --
866 ROLLBACK TO delete_appraisal_template;
867 raise;
868 --
869 -- End of fix.
870 --
871 hr_utility.set_location(' Leaving:'||l_proc, 12);
872 end delete_appraisal_template;
873 --
874 end hr_appraisal_templates_api;