DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_ASSESSMENT_TYPES_API

Source


1 Package Body hr_assessment_types_api as
2 /* $Header: peastapi.pkb 120.1 2006/02/09 07:49:34 sansingh noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  hr_assessment_types_api.';
7 --
8 -- ---------------------------------------------------------------------------
9 -- |---------------------< <create_assessment_type> >-----------------------|
10 -- ---------------------------------------------------------------------------
11 --
12 procedure create_assessment_type
13  (p_assessment_type_id           out nocopy 	number,
14   p_name                         in 	varchar2,
15   p_business_group_id            in 	number,
16   p_description                  in 	varchar2         default null,
17   p_rating_scale_id              in 	number           default null,
18   p_weighting_scale_id           in 	number           default null,
19   p_rating_scale_comment         in 	varchar2         default null,
20   p_weighting_scale_comment      in 	varchar2         default null,
21   p_assessment_classification    in 	varchar2,
22   p_display_assessment_comments  in 	varchar2         default 'Y',
23   p_date_from                    in       date,
24   p_date_to                      in       date,
25   p_comments                     in 	varchar2         default null,
26   p_instructions                 in 	varchar2         default null,
27   p_weighting_classification     in 	varchar2         default null,
28   p_line_score_formula           in 	varchar2         default null,
29   p_total_score_formula          in 	varchar2         default null,
30   p_object_version_number        out nocopy 	number,
31   p_attribute_category           in 	varchar2         default null,
32   p_attribute1                   in 	varchar2         default null,
33   p_attribute2                   in 	varchar2         default null,
34   p_attribute3                   in 	varchar2         default null,
35   p_attribute4                   in 	varchar2         default null,
36   p_attribute5                   in     varchar2         default null,
37   p_attribute6                   in     varchar2         default null,
38   p_attribute7                   in     varchar2         default null,
39   p_attribute8                   in     varchar2         default null,
40   p_attribute9                   in     varchar2         default null,
41   p_attribute10                  in     varchar2         default null,
42   p_attribute11                  in     varchar2         default null,
43   p_attribute12                  in     varchar2         default null,
44   p_attribute13                  in     varchar2         default null,
45   p_attribute14                  in     varchar2         default null,
46   p_attribute15                  in     varchar2         default null,
47   p_attribute16                  in     varchar2         default null,
48   p_attribute17                  in     varchar2         default null,
49   p_attribute18                  in     varchar2         default null,
50   p_attribute19                  in     varchar2         default null,
51   p_attribute20                  in     varchar2         default null,
52   p_type                         in	    varchar2,
53   p_line_score_formula_id        in	    number		    default null,
54   p_default_job_competencies     in	    varchar2	    default null,
55   p_available_flag		         in	    varchar2	    default null,
56   p_validate                     in     boolean		    default false,
57   p_effective_date               in     date
58   ) is
59   --
60   -- Declare cursors and local variables
61   --
62   --
63   l_proc               	varchar2(72) := g_package||'create_assessment_type';
64   l_assessment_type_id 		per_assessment_types.assessment_type_id%TYPE;
65   l_object_version_number	per_assessment_types.object_version_number%TYPE;
66   --
67 begin
68   hr_utility.set_location('Entering:'|| l_proc, 5);
69   --
70   -- Issue a savepoint.
71   --
72   savepoint create_assess_type;
73   hr_utility.set_location(l_proc, 6);
74   --
75   -- Call Before Process User Hook
76   --
77   begin
78 	hr_assessment_types_bk1.create_assessment_type_b	(
79          p_name                         =>   p_name
80         ,p_business_group_id            =>   p_business_group_id
81         ,p_description                  =>   p_description
82         ,p_rating_scale_id              =>   p_rating_scale_id
83         ,p_weighting_scale_id           =>   p_weighting_scale_id
84         ,p_rating_scale_comment         =>   p_rating_scale_comment
85         ,p_weighting_scale_comment      =>   p_weighting_scale_comment
86         ,p_assessment_classification    =>   p_assessment_classification
87         ,p_display_assessment_comments  =>   p_display_assessment_comments
88         ,p_date_from                    =>   p_date_from
89         ,p_date_to                      =>   p_date_to
90         ,p_comments                     =>   p_comments
91         ,p_instructions                 =>   p_instructions
92         ,p_weighting_classification     =>   p_weighting_classification
93         ,p_line_score_formula           =>   p_line_score_formula
94         ,p_total_score_formula          =>   p_total_score_formula
95         ,p_attribute_category           =>   p_attribute_category
96         ,p_attribute1                   =>   p_attribute1
97         ,p_attribute2                   =>   p_attribute2
98         ,p_attribute3                   =>   p_attribute3
99         ,p_attribute4                   =>   p_attribute4
100         ,p_attribute5                   =>   p_attribute5
101         ,p_attribute6                   =>   p_attribute6
102         ,p_attribute7                   =>   p_attribute7
103         ,p_attribute8                   =>   p_attribute8
104         ,p_attribute9                   =>   p_attribute9
105         ,p_attribute10                  =>   p_attribute10
106         ,p_attribute11                  =>   p_attribute11
107         ,p_attribute12                  =>   p_attribute12
108         ,p_attribute13                  =>   p_attribute13
109         ,p_attribute14                  =>   p_attribute14
110         ,p_attribute15                  =>   p_attribute14
111         ,p_attribute16                  =>   p_attribute16
112         ,p_attribute17                  =>   p_attribute17
113         ,p_attribute18                  =>   p_attribute18
114         ,p_attribute19                  =>   p_attribute19
115         ,p_attribute20                  =>   p_attribute20
116         ,p_type                         =>   p_type
117         ,p_line_score_formula_id        =>   p_line_score_formula_id
118         ,p_default_job_competencies     =>   p_default_job_competencies
119         ,p_available_flag               =>   p_available_flag
120         ,p_effective_date               =>   p_effective_date
121       );
122       exception
123 	   when hr_api.cannot_find_prog_unit then
124 		  hr_api.cannot_find_prog_unit_error
125 				(p_module_name	=> 'create_assessment_type',
126 				 p_hook_type	=> 'BP'
127 				);
128   end;
129   --
130   -- End of Before Process User Hook call
131   --
132   -- Validation in addition to Table Handlers
133   --
134   hr_utility.set_location(l_proc, 7);
135   --
136   -- Process Logic
137   --
138   per_ast_ins.ins (p_assessment_type_id =>   l_assessment_type_id
139         ,p_name                         =>   p_name
140         ,p_business_group_id            =>   p_business_group_id
141         ,p_description                  =>   p_description
142         ,p_rating_scale_id              =>   p_rating_scale_id
143         ,p_weighting_scale_id           =>   p_weighting_scale_id
144         ,p_rating_scale_comment         =>   p_rating_scale_comment
145         ,p_weighting_scale_comment      =>   p_weighting_scale_comment
146         ,p_assessment_classification    =>   p_assessment_classification
147         ,p_display_assessment_comments  =>   p_display_assessment_comments
148         ,p_date_from                    =>   p_date_from
149         ,p_date_to                      =>   p_date_to
150         ,p_comments                     =>   p_comments
151         ,p_instructions                 =>   p_instructions
152         ,p_weighting_classification     =>   p_weighting_classification
153         ,p_line_score_formula           =>   p_line_score_formula
154         ,p_total_score_formula          =>   p_total_score_formula
155         ,p_object_version_number        =>   l_object_version_number
156         ,p_attribute_category           =>   p_attribute_category
157         ,p_attribute1                   =>   p_attribute1
158         ,p_attribute2                   =>   p_attribute2
159         ,p_attribute3                   =>   p_attribute3
160         ,p_attribute4                   =>   p_attribute4
161         ,p_attribute5                   =>   p_attribute5
162         ,p_attribute6                   =>   p_attribute6
163         ,p_attribute7                   =>   p_attribute7
164         ,p_attribute8                   =>   p_attribute8
165         ,p_attribute9                   =>   p_attribute9
166         ,p_attribute10                  =>   p_attribute10
167         ,p_attribute11                  =>   p_attribute11
168         ,p_attribute12                  =>   p_attribute12
169         ,p_attribute13                  =>   p_attribute13
170         ,p_attribute14                  =>   p_attribute14
171         ,p_attribute15                  =>   p_attribute14
172         ,p_attribute16                  =>   p_attribute16
173         ,p_attribute17                  =>   p_attribute17
174         ,p_attribute18                  =>   p_attribute18
175         ,p_attribute19                  =>   p_attribute19
176         ,p_attribute20                  =>   p_attribute20
177         ,p_type                         =>   p_type
178         ,p_line_score_formula_id        =>   p_line_score_formula_id
179         ,p_default_job_competencies     =>   p_default_job_competencies
180         ,p_available_flag               =>   p_available_flag
181         ,p_validate                     =>   p_validate
182         ,p_effective_date               =>   p_effective_date
183   );
184   --
185   hr_utility.set_location(l_proc, 8);
186   --
187   -- Call After Process User Hook
188   --
189   begin
190 	hr_assessment_types_bk1.create_assessment_type_a	(
191          p_assessment_type_id           =>   l_assessment_type_id
192         ,p_object_version_number        =>   l_object_version_number
193         ,p_name                         =>   p_name
194         ,p_business_group_id            =>   p_business_group_id
195         ,p_description                  =>   p_description
196         ,p_rating_scale_id              =>   p_rating_scale_id
197         ,p_weighting_scale_id           =>   p_weighting_scale_id
198         ,p_rating_scale_comment         =>   p_rating_scale_comment
199         ,p_weighting_scale_comment      =>   p_weighting_scale_comment
200         ,p_assessment_classification    =>   p_assessment_classification
201         ,p_display_assessment_comments  =>   p_display_assessment_comments
202         ,p_date_from                    =>   p_date_from
203         ,p_date_to                      =>   p_date_to
204         ,p_comments                     =>   p_comments
205         ,p_instructions                 =>   p_instructions
206         ,p_weighting_classification     =>   p_weighting_classification
207         ,p_line_score_formula           =>   p_line_score_formula
208         ,p_total_score_formula          =>   p_total_score_formula
209         ,p_attribute_category           =>   p_attribute_category
210         ,p_attribute1                   =>   p_attribute1
211         ,p_attribute2                   =>   p_attribute2
212         ,p_attribute3                   =>   p_attribute3
213         ,p_attribute4                   =>   p_attribute4
214         ,p_attribute5                   =>   p_attribute5
215         ,p_attribute6                   =>   p_attribute6
216         ,p_attribute7                   =>   p_attribute7
217         ,p_attribute8                   =>   p_attribute8
218         ,p_attribute9                   =>   p_attribute9
219         ,p_attribute10                  =>   p_attribute10
220         ,p_attribute11                  =>   p_attribute11
221         ,p_attribute12                  =>   p_attribute12
222         ,p_attribute13                  =>   p_attribute13
223         ,p_attribute14                  =>   p_attribute14
224         ,p_attribute15                  =>   p_attribute14
225         ,p_attribute16                  =>   p_attribute16
226         ,p_attribute17                  =>   p_attribute17
227         ,p_attribute18                  =>   p_attribute18
228         ,p_attribute19                  =>   p_attribute19
229         ,p_attribute20                  =>   p_attribute20
230         ,p_type                         =>   p_type
231         ,p_line_score_formula_id        =>   p_line_score_formula_id
232         ,p_default_job_competencies     =>   p_default_job_competencies
233         ,p_available_flag               =>   p_available_flag
234         ,p_effective_date               =>   p_effective_date
235       );
236       exception
237 	   when hr_api.cannot_find_prog_unit then
238 		  hr_api.cannot_find_prog_unit_error
239 				(p_module_name	=> 'create_assessment_type',
240 				 p_hook_type	=> 'AP'
241 				);
242   end;
243   --
244   -- End of After process user hook
245   --
246   -- When in validation only mode raise the Validate_Enabled exception
247   --
248   if p_validate then
249     raise hr_api.validate_enabled;
250   end if;
251   --
252   -- Set all output arguments
253   --
254   p_assessment_type_id          := l_assessment_type_id;
255   p_object_version_number  := l_object_version_number;
256   --
257   hr_utility.set_location(' Leaving:'||l_proc, 11);
258 exception
259   when hr_api.validate_enabled then
260     --
261     -- As the Validate_Enabled exception has been raised
262     -- we must rollback to the savepoint
263     --
264     ROLLBACK TO create_assess_type;
265     --
266     -- Only set output warning arguments
267     -- (Any key or derived arguments must be set to null
268     -- when validation only mode is being used.)
269     --
270     p_assessment_type_id          := null;
271     p_object_version_number  := null;
272     --
273   when others then
274     --
275     -- A validation or unexpected error has occurred
276     --
277     -- Added as part of fix to bug 632482
278     --
279     ROLLBACK TO create_assess_type;
280     raise;
281     --
282     -- End of fix.
283     --
284     hr_utility.set_location(' Leaving:'||l_proc, 12);
285 end create_assessment_type;
286 --
287 --
288 -- ---------------------------------------------------------------------------
289 -- |---------------------< <update_assessment_type> >------------------------|
290 -- ---------------------------------------------------------------------------
291 --
292 procedure update_assessment_type
293  (p_assessment_type_id           in number,
294   p_name                         in varchar2         default hr_api.g_varchar2,
295   p_description                  in varchar2         default hr_api.g_varchar2,
296   p_rating_scale_id              in number           default hr_api.g_number,
297   p_weighting_scale_id           in number           default hr_api.g_number,
298   p_rating_scale_comment         in varchar2         default hr_api.g_varchar2,
299   p_weighting_scale_comment      in varchar2         default hr_api.g_varchar2,
300   p_assessment_classification    in varchar2         default hr_api.g_varchar2,
301   p_display_assessment_comments  in varchar2         default hr_api.g_varchar2,
302   p_date_from 			 in date	     default hr_api.g_date,
303   p_date_to 			 in date	     default hr_api.g_date,
304   p_comments                     in varchar2         default hr_api.g_varchar2,
305   p_instructions                 in varchar2         default hr_api.g_varchar2,
306   p_weighting_classification     in varchar2         default hr_api.g_varchar2,
307   p_line_score_formula           in varchar2         default hr_api.g_varchar2,
308   p_total_score_formula          in varchar2         default hr_api.g_varchar2,
309   p_object_version_number        in out nocopy number,
310   --
311   p_attribute_category           in varchar2    default hr_api.g_varchar2,
312   p_attribute1                   in varchar2    default hr_api.g_varchar2,
313   p_attribute2                   in varchar2    default hr_api.g_varchar2,
314   p_attribute3                   in varchar2    default hr_api.g_varchar2,
315   p_attribute4                   in varchar2    default hr_api.g_varchar2,
316   p_attribute5                   in varchar2    default hr_api.g_varchar2,
317   p_attribute6                   in varchar2    default hr_api.g_varchar2,
318   p_attribute7                   in varchar2    default hr_api.g_varchar2,
319   p_attribute8                   in varchar2    default hr_api.g_varchar2,
320   p_attribute9                   in varchar2    default hr_api.g_varchar2,
321   p_attribute10                  in varchar2    default hr_api.g_varchar2,
322   p_attribute11                  in varchar2    default hr_api.g_varchar2,
323   p_attribute12                  in varchar2    default hr_api.g_varchar2,
324   p_attribute13                  in varchar2    default hr_api.g_varchar2,
325   p_attribute14                  in varchar2    default hr_api.g_varchar2,
326   p_attribute15                  in varchar2    default hr_api.g_varchar2,
327   p_attribute16                  in varchar2    default hr_api.g_varchar2,
328   p_attribute17                  in varchar2    default hr_api.g_varchar2,
329   p_attribute18                  in varchar2    default hr_api.g_varchar2,
330   p_attribute19                  in varchar2    default hr_api.g_varchar2,
331   p_attribute20                  in varchar2    default hr_api.g_varchar2,
332   p_type                         in varchar2	default hr_api.g_varchar2,
333   p_line_score_formula_id        in number	    default hr_api.g_number,
334   p_default_job_competencies     in varchar2	default hr_api.g_varchar2,
335   p_available_flag               in varchar2	default hr_api.g_varchar2,
336   p_validate                     in boolean     default false,
337   p_effective_date		in date
338   ) is
339   --
340   -- Declare cursors and local variables
341   --
342   l_proc               	varchar2(72) := g_package||'update_assessment_type';
343   l_object_version_number      per_assessment_types.object_version_number%TYPE;
344   --
345   lv_object_version_number     per_assessment_types.object_version_number%TYPE := p_object_version_number ;
346 begin
347   hr_utility.set_location('Entering:'|| l_proc, 5);
348   --
349   -- Issue a savepoint.
350   --
351   savepoint update_assess_type;
352   hr_utility.set_location(l_proc, 6);
353   --
354   -- Call Before Process User Hook
355   --
356   begin
357 	hr_assessment_types_bk2.update_assessment_type_b	(
358           p_assessment_type_id           =>     p_assessment_type_id,
359           p_object_version_number        =>     p_object_version_number,
360           p_name                         =>     p_name,
361           p_description                  =>     p_description,
362           p_rating_scale_id              =>     p_rating_scale_id,
363           p_weighting_scale_id           =>     p_weighting_scale_id,
364           p_rating_scale_comment         =>     p_rating_scale_comment,
365           p_weighting_scale_comment      =>     p_weighting_scale_comment,
366           p_assessment_classification    =>     p_assessment_classification,
367           p_display_assessment_comments  =>     p_display_assessment_comments,
368           p_date_from                    =>     p_date_from,
369           p_date_to                      =>     p_date_to,
370           p_comments                     =>     p_comments,
371           p_instructions                 =>     p_instructions,
372           p_weighting_classification     =>     p_weighting_classification,
373           p_line_score_formula           =>     p_line_score_formula,
374           p_total_score_formula          =>     p_total_score_formula,
375           p_attribute_category           =>     p_attribute_category,
376           p_attribute1                   =>     p_attribute1,
377           p_attribute2                   =>     p_attribute2,
378           p_attribute3                   =>     p_attribute3,
379           p_attribute4                   =>     p_attribute4,
380           p_attribute5                   =>     p_attribute5,
381           p_attribute6                   =>     p_attribute6,
382           p_attribute7                   =>     p_attribute7,
383           p_attribute8                   =>     p_attribute8,
384           p_attribute9                   =>     p_attribute9,
385           p_attribute10                  =>     p_attribute10,
386           p_attribute11                  =>     p_attribute11,
387           p_attribute12                  =>     p_attribute12,
388           p_attribute13                  =>     p_attribute13,
389           p_attribute14                  =>     p_attribute14,
390           p_attribute15                  =>     p_attribute15,
391           p_attribute16                  =>     p_attribute16,
392           p_attribute17                  =>     p_attribute17,
393           p_attribute18                  =>     p_attribute18,
394           p_attribute19                  =>     p_attribute19,
395           p_attribute20                  =>     p_attribute20,
396           p_type                         =>     p_type,
397           p_line_score_formula_id        =>     p_line_score_formula_id,
398           p_default_job_competencies     =>     p_default_job_competencies,
399           p_available_flag               =>     p_available_flag,
400           p_effective_date               =>     p_effective_date
401 	);
402       exception
403 	   when hr_api.cannot_find_prog_unit then
404 		  hr_api.cannot_find_prog_unit_error
405 				(p_module_name	=> 'update_assessment_type',
406 				 p_hook_type	=> 'BP'
407 				);
408   end;
409   --
410   -- End of Before Process User Hook call
411   --
412   -- Validation in addition to Table Handlers
413   --
414   hr_utility.set_location(l_proc, 7);
415   --
416   -- Process Logic
417   --
418   l_object_version_number := p_object_version_number;
419   --
420   per_ast_upd.upd
421   (p_assessment_type_id          =>     p_assessment_type_id,
422   p_name                         =>     p_name,
423   p_description                  =>     p_description,
424   p_rating_scale_id              =>     p_rating_scale_id,
425   p_weighting_scale_id           =>     p_weighting_scale_id,
426   p_rating_scale_comment         =>     p_rating_scale_comment,
427   p_weighting_scale_comment      =>     p_weighting_scale_comment,
428   p_assessment_classification    =>     p_assessment_classification,
429   p_display_assessment_comments  =>     p_display_assessment_comments,
430   p_date_from                    =>     p_date_from,
431   p_date_to                      =>     p_date_to,
432   p_comments                     =>     p_comments,
433   p_instructions                 =>     p_instructions,
434   p_weighting_classification     =>     p_weighting_classification,
435   p_line_score_formula           =>     p_line_score_formula,
436   p_total_score_formula          =>     p_total_score_formula,
437   p_object_version_number        =>     l_object_version_number,
438   p_attribute1                   =>     p_attribute1,
439   p_attribute2                   =>     p_attribute2,
440   p_attribute3                   =>     p_attribute3,
441   p_attribute4                   =>     p_attribute4,
442   p_attribute5                   =>     p_attribute5,
443   p_attribute6                   =>     p_attribute6,
444   p_attribute7                   =>     p_attribute7,
445   p_attribute8                   =>     p_attribute8,
446   p_attribute9                   =>     p_attribute9,
447   p_attribute10                  =>     p_attribute10,
448   p_attribute11                  =>     p_attribute11,
449   p_attribute12                  =>     p_attribute12,
450   p_attribute13                  =>     p_attribute13,
451   p_attribute14                  =>     p_attribute14,
452   p_attribute15                  =>     p_attribute15,
453   p_attribute16                  =>     p_attribute16,
454   p_attribute17                  =>     p_attribute17,
455   p_attribute18                  =>     p_attribute18,
456   p_attribute19                  =>     p_attribute19,
457   p_attribute20                  =>     p_attribute20,
458   p_type                         =>     p_type,
459   p_line_score_formula_id        =>     p_line_score_formula_id,
460   p_default_job_competencies     =>     p_default_job_competencies,
461   p_available_flag               =>     p_available_flag,
462   p_validate                     =>     p_validate,
463   p_effective_date               =>     p_effective_date
464   );
465   --
466   --
467   hr_utility.set_location(l_proc, 8);
468   --
469   -- Call After Process User Hook
470   --
471   begin
472 	hr_assessment_types_bk2.update_assessment_type_a	(
473           p_assessment_type_id           =>     p_assessment_type_id,
474           p_object_version_number        =>     l_object_version_number,
475           p_name                         =>     p_name,
476           p_description                  =>     p_description,
477           p_rating_scale_id              =>     p_rating_scale_id,
478           p_weighting_scale_id           =>     p_weighting_scale_id,
479           p_rating_scale_comment         =>     p_rating_scale_comment,
480           p_weighting_scale_comment      =>     p_weighting_scale_comment,
481           p_assessment_classification    =>     p_assessment_classification,
482           p_display_assessment_comments  =>     p_display_assessment_comments,
483           p_date_from                    =>     p_date_from,
484           p_date_to                      =>     p_date_to,
485           p_comments                     =>     p_comments,
486           p_instructions                 =>     p_instructions,
487           p_weighting_classification     =>     p_weighting_classification,
488           p_line_score_formula           =>     p_line_score_formula,
489           p_total_score_formula          =>     p_total_score_formula,
490           p_attribute_category           =>     p_attribute_category,
491           p_attribute1                   =>     p_attribute1,
492           p_attribute2                   =>     p_attribute2,
493           p_attribute3                   =>     p_attribute3,
494           p_attribute4                   =>     p_attribute4,
495           p_attribute5                   =>     p_attribute5,
496           p_attribute6                   =>     p_attribute6,
497           p_attribute7                   =>     p_attribute7,
498           p_attribute8                   =>     p_attribute8,
499           p_attribute9                   =>     p_attribute9,
500           p_attribute10                  =>     p_attribute10,
501           p_attribute11                  =>     p_attribute11,
502           p_attribute12                  =>     p_attribute12,
503           p_attribute13                  =>     p_attribute13,
504           p_attribute14                  =>     p_attribute14,
505           p_attribute15                  =>     p_attribute15,
506           p_attribute16                  =>     p_attribute16,
507           p_attribute17                  =>     p_attribute17,
508           p_attribute18                  =>     p_attribute18,
509           p_attribute19                  =>     p_attribute19,
510           p_attribute20                  =>     p_attribute20,
511           p_type                         =>     p_type,
512           p_line_score_formula_id        =>     p_line_score_formula_id,
513           p_default_job_competencies     =>     p_default_job_competencies,
514           p_available_flag               =>     p_available_flag,
515           p_effective_date               =>     p_effective_date
516 		);
517       exception
518 	   when hr_api.cannot_find_prog_unit then
519 		  hr_api.cannot_find_prog_unit_error
520 				(p_module_name	=> 'update_assessment_type',
521 				 p_hook_type	=> 'AP'
522 				);
523   end;
524   --
525   -- End After Process User Hook
526   --
527   -- When in validation only mode raise the Validate_Enabled exception
528   --
529   if p_validate then
530     raise hr_api.validate_enabled;
531   end if;
532   --
533   -- Set all output arguments. l_object_version_number now has the new
534   -- object version number as the update was successful
535   --
536   p_object_version_number  := l_object_version_number;
537   --
538   hr_utility.set_location(' Leaving:'||l_proc, 11);
539 exception
540   when hr_api.validate_enabled then
541     --
542     -- As the Validate_Enabled exception has been raised
543     -- we must rollback to the savepoint
544     --
545     ROLLBACK TO update_assess_type;
546     --
547     -- Only set output warning arguments and in out arguments back
548     -- to their IN value
549     -- (Any key or derived arguments must be set to null
550     -- when validation only mode is being used.)
551     --
552     p_object_version_number  := l_object_version_number;
553     --
554   when others then
555     --
556     -- A validation or unexpected error has occurred
557     --
558     -- Added as part of fix to bug 632482
559     --
560     p_object_version_number  := lv_object_version_number;
561 
562     ROLLBACK TO update_assess_type;
563     raise;
564     --
565     -- End of fix.
566     --
567     hr_utility.set_location(' Leaving:'||l_proc, 12);
568 --
569 end update_assessment_type;
570 --
571 --
572 -- ---------------------------------------------------------------------------
573 -- |-----------------------< delete_assessment_type >-----------------------|
574 -- ---------------------------------------------------------------------------
575 --
576 procedure delete_assessment_type
577 (p_validate                           in boolean default false,
578  p_assessment_type_id 		      in number,
579  p_object_version_number              in number
580 ) is
581   --
582   -- Declare cursors and local variables
583   --
584   l_proc                varchar2(72) := g_package||'delete_assessment_type';
585 begin
586   hr_utility.set_location('Entering:'|| l_proc, 5);
587   --
588   -- Issue a savepoint.
589   --
590   savepoint delete_assess_type;
591   hr_utility.set_location(l_proc, 6);
592   --
593   -- Call Before Process User Hook
594   --
595   begin
596 	hr_assessment_types_bk3.delete_assessment_type_b
597 		(
598              p_assessment_type_id        =>   p_assessment_type_id
599             ,p_object_version_number     =>   p_object_version_number
600 		);
601       exception
602 	   when hr_api.cannot_find_prog_unit then
603 		  hr_api.cannot_find_prog_unit_error
604 				(p_module_name	=> 'delete_assessment_type',
605 				 p_hook_type	=> 'BP'
606 				);
607   end;
608   --
609   -- End of Before Process User hook
610   --
611   -- Validation in addition to Table Handlers
612   --
613   hr_utility.set_location(l_proc, 7);
614   --
615   -- Process Logic
616   --
617   --  The check to see whether the assessment_type is being used by an
618   --  assessment is done in the row handler
619   --
620   per_ast_del.del
621      (p_validate                    => FALSE
622      ,p_assessment_type_id		=> p_assessment_type_id
623      ,p_object_version_number 	=> p_object_version_number
624      );
625   --
626   hr_utility.set_location(l_proc, 8);
627   --
628   -- Call After Process User Hook
629   --
630   begin
631 	hr_assessment_types_bk3.delete_assessment_type_a (
632              p_assessment_type_id        =>   p_assessment_type_id
633             ,p_object_version_number     =>   p_object_version_number
634 		);
635       exception
636 	   when hr_api.cannot_find_prog_unit then
637 		  hr_api.cannot_find_prog_unit_error
638 				(p_module_name	=> 'delete_assessment_type',
639 				 p_hook_type	=> 'AP'
640 				);
641   end;
642   --
643   -- End of After Process User hook
644   --
645   -- When in validation only mode raise the Validate_Enabled exception
646   --
647   if p_validate then
648     raise hr_api.validate_enabled;
649   end if;
650   --
651   hr_utility.set_location(' Leaving:'||l_proc, 11);
652 exception
653   when hr_api.validate_enabled then
654     --
655     -- As the Validate_Enabled exception has been raised
656     -- we must rollback to the savepoint
657     --
658     ROLLBACK TO delete_assess_type;
659     --
660     --
661   when others then
662     --
663     -- A validation or unexpected error has occurred
664     --
665     -- Added as part of fix to bug 632482
666     --
667     ROLLBACK TO delete_assess_type;
668     raise;
669     --
670     -- End of fix.
671     --
672     hr_utility.set_location(' Leaving:'||l_proc, 12);
673 end delete_assessment_type;
674 --
675 end hr_assessment_types_api;