1 Package hr_appraisal_templates_api AUTHID CURRENT_USER as
2 /* $Header: peaptapi.pkh 120.9 2010/02/09 15:05:15 psugumar ship $*/
3 /*#
4 * This API contains Appraisal Template APIs.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Appraisal Template
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------< create_appraisal_template >---------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates a new appraisal template.
17 *
18 * An appraisal template is the header or group for a number of appraisal
19 * questions. Each appraisal template defines a type of appraisal.
20 *
21 * <p><b>Licensing</b><br>
22 * This API is licensed for use with Human Resources.
23 *
24 * <p><b>Prerequisites</b><br>
25 * A valid assessment type and rating scale must exist for the business group
26 * of this template. A valid questionnaire template (proposal template) must
27 * also exist.
28 *
29 * <p><b>Post Success</b><br>
30 * An appraisal template is created.
31 *
32 * <p><b>Post Failure</b><br>
33 * The appraisal template is not created and an error is raised.
34 * @param p_validate If true, then validation alone will be performed and the
35 * database will remain unchanged. If false and all validation checks pass,
36 * then the database will be modified.
37 * @param p_effective_date Reference date for validating lookup values are
38 * applicable during the start to end active date range. This date does not
39 * determine when the changes take effect.
40 * @param p_business_group_id Business group for which the appraisal template
41 * is created.
42 * @param p_name Unique name or title of the template.
43 * @param p_description A description of the appraisal template
44 * @param p_instructions General Instructions on how to complete the appraisal
45 * @param p_date_from Date from which the template is valid
46 * @param p_date_to The date until which the appraisal template is valid.
47 * @param p_assessment_type_id The assessment type to be used in this template
48 * @param p_rating_scale_id Default rating scale to be used for this appraisal.
49 * @param p_questionnaire_template_id Appraisee Questionnaire template (proposal
50 * template) for this appraisal template
54 * @param p_attribute2 Descriptive flexfield segment.
51 * @param p_attribute_category This context value determines which flexfield
52 * structure to use with the descriptive flexfield segments.
53 * @param p_attribute1 Descriptive flexfield segment.
55 * @param p_attribute3 Descriptive flexfield segment.
56 * @param p_attribute4 Descriptive flexfield segment.
57 * @param p_attribute5 Descriptive flexfield segment.
58 * @param p_attribute6 Descriptive flexfield segment.
59 * @param p_attribute7 Descriptive flexfield segment.
60 * @param p_attribute8 Descriptive flexfield segment.
61 * @param p_attribute9 Descriptive flexfield segment.
62 * @param p_attribute10 Descriptive flexfield segment.
63 * @param p_attribute11 Descriptive flexfield segment.
64 * @param p_attribute12 Descriptive flexfield segment.
65 * @param p_attribute13 Descriptive flexfield segment.
66 * @param p_attribute14 Descriptive flexfield segment.
67 * @param p_attribute15 Descriptive flexfield segment.
68 * @param p_attribute16 Descriptive flexfield segment.
69 * @param p_attribute17 Descriptive flexfield segment.
70 * @param p_attribute18 Descriptive flexfield segment.
71 * @param p_attribute19 Descriptive flexfield segment.
72 * @param p_attribute20 Descriptive flexfield segment.
73 * @param p_objective_asmnt_type_id The objective assessment type to be used in this template
74 * @param p_ma_quest_template_id MA Questionnaire template (proposal
75 * template) for this appraisal template
76 * @param p_link_appr_to_learning_path indicates if appraisal would be linked to learning path
77 * @param p_final_score_formula_id store fast formula id for calculating appraisal final score
78 * @param p_update_personal_comp_profile indicates whether appraisal competencies should be updating
79 * personal competencies or not
80 * @param p_comp_profile_source_type Value which will be passed to column source_of_proficiency_level
81 * @param p_show_competency_ratings indicates if appraisee can see competency ratings or not
82 * @param p_show_objective_ratings indicates if appraisee can see objective ratings or not
83 * @param p_show_overall_ratings indicates if appraisee can see overall ratings or not
84 * @param p_show_overall_comments indicates if appraisee can see objective comments or not
85 * @param p_provide_overall_feedback indicates if appraisee can provide overall feedback or not
86 * @param p_show_participant_details indicates if appraisee can see participant details on
87 * appraisal completion
88 * @param p_allow_add_participant indicates if appraisee can add participant or not
89 * @param p_show_additional_details indicates if appraisee can see additional details on
90 * appraisal completion
91 * @param p_show_participant_names indicates if appraisee can see participant names on
92 * appraisal completion
93 * @param p_show_participant_ratings indicates if appraisee can see participant ratings on
94 * appraisal completion
95 * @param p_available_flag indicates if template is Unpublished or published.Values are
96 * validated against lookup TEMPLATE_AVAILABILITY_FLAG
97 * @param p_show_questionnaire_info indicates if appraisee can see ma completed questionnaire on
98 * appraisal completion
99 * @param p_ma_off_template_code Excel template code (registered in XML Publisher Templates)
100 * for Main Appraiser.
101 * @param p_appraisee_off_template_code Excel template code (registered in XML Publisher
102 * Templates) for appraisee.
103 * @param p_other_part_off_template_code Excel template code (registered in XML Publisher
104 * Templates) for Other Participants.
105 * @param p_part_app_off_template_code Excel template code (registered in XML Publisher
106 * Templates) for participants of type appraiser.
107 * @param p_part_rev_off_template_code Excel template code (registered in XML Publisher
108 * Templates) for participants of type reviewer.
109 * @param p_appraisal_template_id If p_validate is false, then this uniquely
110 * identifies the appraisal template created. If p_validate is true, then set to
111 * null.
112 * @param p_object_version_number If p_validate is false, then set to
113 * the version number of the created appraisal period. If p_validate is true,
114 * then the value will be null.
115 * @rep:displayname Create Appraisal Template
116 * @rep:category BUSINESS_ENTITY PER_APPRAISAL
117 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
118 * @rep:scope public
119 * @rep:lifecycle active
120 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
121 */
122 --
123 -- {End Of Comments}
124 --
125 procedure create_appraisal_template
126 (p_validate in boolean default false,
127 p_effective_date in date,
128 p_business_group_id in number,
129 p_name in varchar2,
130 p_description in varchar2 default null,
131 p_instructions in varchar2 default null,
132 p_date_from in date default null,
133 p_date_to in date default null,
134 p_assessment_type_id in number default null,
135 p_rating_scale_id in number default null,
136 p_questionnaire_template_id in number default null,
137 p_attribute_category in varchar2 default null,
138 p_attribute1 in varchar2 default null,
139 p_attribute2 in varchar2 default null,
140 p_attribute3 in varchar2 default null,
141 p_attribute4 in varchar2 default null,
142 p_attribute5 in varchar2 default null,
143 p_attribute6 in varchar2 default null,
144 p_attribute7 in varchar2 default null,
145 p_attribute8 in varchar2 default null,
146 p_attribute9 in varchar2 default null,
150 p_attribute13 in varchar2 default null,
147 p_attribute10 in varchar2 default null,
148 p_attribute11 in varchar2 default null,
149 p_attribute12 in varchar2 default null,
151 p_attribute14 in varchar2 default null,
152 p_attribute15 in varchar2 default null,
153 p_attribute16 in varchar2 default null,
154 p_attribute17 in varchar2 default null,
155 p_attribute18 in varchar2 default null,
156 p_attribute19 in varchar2 default null,
157 p_attribute20 in varchar2 default null
158 ,p_objective_asmnt_type_id in number default null
159 ,p_ma_quest_template_id in number default null
160 ,p_link_appr_to_learning_path in varchar2 default null
161 ,p_final_score_formula_id in number default null
162 ,p_update_personal_comp_profile in varchar2 default null
163 ,p_comp_profile_source_type in varchar2 default null
164 ,p_show_competency_ratings in varchar2 default null
165 ,p_show_objective_ratings in varchar2 default null
166 ,p_show_overall_ratings in varchar2 default null
167 ,p_show_overall_comments in varchar2 default null
168 ,p_provide_overall_feedback in varchar2 default null
169 ,p_show_participant_details in varchar2 default null
170 ,p_allow_add_participant in varchar2 default null
171 ,p_show_additional_details in varchar2 default null
172 ,p_show_participant_names in varchar2 default null
173 ,p_show_participant_ratings in varchar2 default null
174 ,p_available_flag in varchar2 default null
175 ,p_show_questionnaire_info in varchar2 default null
176 ,p_ma_off_template_code in varchar2 default null
177 ,p_appraisee_off_template_code in varchar2 default null
178 ,p_other_part_off_template_code in varchar2 default null
179 ,p_part_app_off_template_code in varchar2 default null
180 ,p_part_rev_off_template_code in varchar2 default null,
181 p_appraisal_template_id out nocopy number,
182 p_object_version_number out nocopy number,
183 p_show_participant_comments in varchar2 default null -- 8651478 bug fix
184 ,p_show_term_employee in varchar2 default null -- 6181267 bug fix
185 ,p_show_term_contigent in varchar2 default null -- 6181267 bug fix
186 ,p_disp_term_emp_period_from in number default null -- 6181267 bug fix
187 ,p_SHOW_FUTURE_TERM_EMPLOYEE in varchar2 default null -- 6181267 bug fix
188 );
189 --
190 -- ----------------------------------------------------------------------------
191 -- |------------------------< update_appraisal_template >---------------------|
192 -- ----------------------------------------------------------------------------
193 --
194 -- {Start Of Comments}
195 /*#
196 * This API updates appraisal template.
197 *
198 * An appraisal template is the header or group for a number of appraisal
199 * questions. Each appraisal template defines a type of appraisal.
200 *
201 * <p><b>Licensing</b><br>
202 * This API is licensed for use with Human Resources.
203 *
204 * <p><b>Prerequisites</b><br>
205 * A valid existing appraisal template must be passed to the API.
206 *
207 * <p><b>Post Success</b><br>
208 * Appraisal template is updated.
209 *
210 * <p><b>Post Failure</b><br>
211 * Appraisal template remains unchanged and an error is raised.
212 * @param p_validate If true, then only validation will be performed and the
213 * database remains unchanged. If false, then all validation checks pass the
214 * database will be modified.
215 * @param p_effective_date Reference date for validating lookup values are
216 * applicable during the start to end active date range. This date does not
217 * determine when the changes take effect.
218 * @param p_appraisal_template_id Identifier of the appraisal template to be
219 * updated.
220 * @param p_object_version_number Pass in the current version number of the
221 * appraisal template to be updated. When the API completes if p_validate is
222 * false, will be set to the new version number of the updated appraisal
223 * template. If p_validate is true will be set to the same value which was
224 * passed in.
225 * @param p_name Unique name or title of the template.
226 * @param p_description A description of the appraisal template
227 * @param p_instructions General Instructions on how to complete the appraisal
228 * @param p_date_from Date from which the template is valid
229 * @param p_date_to The date until which the appraisal template is valid.
230 * @param p_assessment_type_id The assessment type to be used in this template
231 * @param p_rating_scale_id Default rating scale to be used for this appraisal.
232 * @param p_questionnaire_template_id Questionnaire template (proposal
233 * template) for this appraisal template
234 * @param p_attribute_category This context value determines which flexfield
235 * structure to use with the descriptive flexfield segments.
236 * @param p_attribute1 Descriptive flexfield segment.
237 * @param p_attribute2 Descriptive flexfield segment.
238 * @param p_attribute3 Descriptive flexfield segment.
239 * @param p_attribute4 Descriptive flexfield segment.
240 * @param p_attribute5 Descriptive flexfield segment.
241 * @param p_attribute6 Descriptive flexfield segment.
242 * @param p_attribute7 Descriptive flexfield segment.
243 * @param p_attribute8 Descriptive flexfield segment.
244 * @param p_attribute9 Descriptive flexfield segment.
245 * @param p_attribute10 Descriptive flexfield segment.
246 * @param p_attribute11 Descriptive flexfield segment.
250 * @param p_attribute15 Descriptive flexfield segment.
247 * @param p_attribute12 Descriptive flexfield segment.
248 * @param p_attribute13 Descriptive flexfield segment.
249 * @param p_attribute14 Descriptive flexfield segment.
251 * @param p_attribute16 Descriptive flexfield segment.
252 * @param p_attribute17 Descriptive flexfield segment.
253 * @param p_attribute18 Descriptive flexfield segment.
254 * @param p_attribute19 Descriptive flexfield segment.
255 * @param p_attribute20 Descriptive flexfield segment.
256 * @param p_objective_asmnt_type_id The objective assessment type to be used in this template
257 * @param p_ma_quest_template_id MA Questionnaire template (proposal
258 * template) for this appraisal template
259 * @param p_link_appr_to_learning_path indicates if appraisal would be linked to learning path
260 * @param p_final_score_formula_id store fast formula id for calculating appraisal final score
261 * @param p_update_personal_comp_profile indicates whether appraisal competencies should be updating
262 * personal competencies or not
263 * @param p_comp_profile_source_type Value which will be passed to column source_of_proficiency_level
264 * @param p_show_competency_ratings indicates if appraisee can see competency ratings or not
265 * @param p_show_objective_ratings indicates if appraisee can see objective ratings or not
266 * @param p_show_overall_ratings indicates if appraisee can see overall ratings or not
267 * @param p_show_overall_comments indicates if appraisee can see objective comments or not
268 * @param p_provide_overall_feedback indicates if appraisee can provide overall feedback or not
269 * @param p_show_participant_details indicates if appraisee can see participant details on
270 * appraisal completion
271 * @param p_allow_add_participant indicates if appraisee can add participant or not
272 * @param p_show_additional_details indicates if appraisee can see additional details on
273 * appraisal completion
274 * @param p_show_participant_names indicates if appraisee can see participant names on
275 * appraisal completion
276 * @param p_show_participant_ratings indicates if appraisee can see participant ratings on
277 * appraisal completion
278 * @param p_available_flag indicates if template is Unpublished or published.Values are
279 * validated against lookup TEMPLATE_AVAILABILITY_FLAG
280 * @param p_show_questionnaire_info indicates if appraisee can see ma completed questionnaire on
281 * appraisal completion
282 * @param p_ma_off_template_code Excel template code (registered in XML Publisher Templates)
283 * for Main Appraiser.
284 * @param p_appraisee_off_template_code Excel template code (registered in XML Publisher
285 * Templates) for appraisee.
286 * @param p_other_part_off_template_code Excel template code (registered in XML Publisher
287 * Templates) for Other Participants.
288 * @param p_part_app_off_template_code Excel template code (registered in XML Publisher
289 * Templates) for participants of type appraiser.
290 * @param p_part_rev_off_template_code Excel template code (registered in XML Publisher
291 * Templates) for participants of type reviewer.
292 * @rep:displayname Update Appraisal Template
293 * @rep:category BUSINESS_ENTITY PER_APPRAISAL
294 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
295 * @rep:scope public
296 * @rep:lifecycle active
297 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
298 */
299 --
300 -- {End Of Comments}
301 --
302 procedure update_appraisal_template
303 (p_validate in boolean default false,
304 p_effective_date in date,
305 p_appraisal_template_id in number,
306 p_object_version_number in out nocopy number,
307 p_name in varchar2 default hr_api.g_varchar2,
308 p_description in varchar2 default hr_api.g_varchar2,
309 p_instructions in varchar2 default hr_api.g_varchar2,
310 p_date_from in date default hr_api.g_date,
311 p_date_to in date default hr_api.g_date,
312 p_assessment_type_id in number default hr_api.g_number,
313 p_rating_scale_id in number default hr_api.g_number,
314 p_questionnaire_template_id in number default hr_api.g_number,
315 p_attribute_category in varchar2 default hr_api.g_varchar2,
316 p_attribute1 in varchar2 default hr_api.g_varchar2,
317 p_attribute2 in varchar2 default hr_api.g_varchar2,
318 p_attribute3 in varchar2 default hr_api.g_varchar2,
319 p_attribute4 in varchar2 default hr_api.g_varchar2,
320 p_attribute5 in varchar2 default hr_api.g_varchar2,
321 p_attribute6 in varchar2 default hr_api.g_varchar2,
322 p_attribute7 in varchar2 default hr_api.g_varchar2,
323 p_attribute8 in varchar2 default hr_api.g_varchar2,
324 p_attribute9 in varchar2 default hr_api.g_varchar2,
325 p_attribute10 in varchar2 default hr_api.g_varchar2,
326 p_attribute11 in varchar2 default hr_api.g_varchar2,
327 p_attribute12 in varchar2 default hr_api.g_varchar2,
328 p_attribute13 in varchar2 default hr_api.g_varchar2,
329 p_attribute14 in varchar2 default hr_api.g_varchar2,
330 p_attribute15 in varchar2 default hr_api.g_varchar2,
331 p_attribute16 in varchar2 default hr_api.g_varchar2,
332 p_attribute17 in varchar2 default hr_api.g_varchar2,
333 p_attribute18 in varchar2 default hr_api.g_varchar2,
334 p_attribute19 in varchar2 default hr_api.g_varchar2,
335 p_attribute20 in varchar2 default hr_api.g_varchar2,
336 p_objective_asmnt_type_id in number default hr_api.g_number
337 ,p_ma_quest_template_id in number default hr_api.g_number
338 ,p_link_appr_to_learning_path in varchar2 default hr_api.g_varchar2
339 ,p_final_score_formula_id in number default hr_api.g_number
340 ,p_update_personal_comp_profile in varchar2 default hr_api.g_varchar2
341 ,p_comp_profile_source_type in varchar2 default hr_api.g_varchar2
342 ,p_show_competency_ratings in varchar2 default hr_api.g_varchar2
343 ,p_show_objective_ratings in varchar2 default hr_api.g_varchar2
344 ,p_show_overall_ratings in varchar2 default hr_api.g_varchar2
345 ,p_show_overall_comments in varchar2 default hr_api.g_varchar2
346 ,p_provide_overall_feedback in varchar2 default hr_api.g_varchar2
347 ,p_show_participant_details in varchar2 default hr_api.g_varchar2
348 ,p_allow_add_participant in varchar2 default hr_api.g_varchar2
349 ,p_show_additional_details in varchar2 default hr_api.g_varchar2
350 ,p_show_participant_names in varchar2 default hr_api.g_varchar2
351 ,p_show_participant_ratings in varchar2 default hr_api.g_varchar2
352 ,p_available_flag in varchar2 default hr_api.g_varchar2
353 ,p_show_questionnaire_info in varchar2 default hr_api.g_varchar2
354 ,p_ma_off_template_code in varchar2 default hr_api.g_varchar2
355 ,p_appraisee_off_template_code in varchar2 default hr_api.g_varchar2
356 ,p_other_part_off_template_code in varchar2 default hr_api.g_varchar2
357 ,p_part_app_off_template_code in varchar2 default hr_api.g_varchar2
358 ,p_part_rev_off_template_code in varchar2 default hr_api.g_varchar2
359 , p_show_participant_comments in varchar2 default hr_api.g_varchar2 -- 8651478 bug fix
360 ,p_show_term_employee in varchar2 default hr_api.g_varchar2 -- 6181267 bug fix
361 ,p_show_term_contigent in varchar2 default hr_api.g_varchar2 -- 6181267 bug fix
362 ,p_disp_term_emp_period_from in number default hr_api.g_number -- 6181267 bug fix
363 ,p_SHOW_FUTURE_TERM_EMPLOYEE in varchar2 default hr_api.g_varchar2 -- 6181267 bug fix
364 );
365 --
366 -- ----------------------------------------------------------------------------
367 -- |------------------------< delete_appraisal_template >---------------------|
368 -- ----------------------------------------------------------------------------
369 --
370 -- {Start Of Comments}
371 /*#
372 * This API deletes appraisal template.
373 *
374 * You can not delete an appraisal template if this template is used in any
375 * appraisal.
376 *
377 * <p><b>Licensing</b><br>
378 * This API is licensed for use with Human Resources.
379 *
380 * <p><b>Prerequisites</b><br>
381 * A valid appraisal template must already exist and this template must not be
382 * used in any appraisals.
383 *
384 * <p><b>Post Success</b><br>
385 * Appraisal template is deleted.
386 *
387 * <p><b>Post Failure</b><br>
388 * Appraisal template is not deleted and an error is raised.
389 * @param p_validate If true, then only validation will be performed and the
390 * database remains unchanged. If false, then all validation checks pass the
391 * database will be modified.
392 * @param p_appraisal_template_id Appraisal template to be deleted. If
393 * p_validate is false, uniquely identifies the appraisal template to be
394 * deleted. If p_validate is true, set to null.
395 * @param p_object_version_number Current version number of the appraisal
396 * template to be deleted.
397 * @rep:displayname Delete Appraisal Template
398 * @rep:category BUSINESS_ENTITY PER_APPRAISAL
399 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
400 * @rep:scope public
401 * @rep:lifecycle active
402 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
403 */
404 --
405 -- {End Of Comments}
406 --
407 procedure delete_appraisal_template
408 (p_validate in boolean default false,
409 p_appraisal_template_id in number,
410 p_object_version_number in number
411 );
412 --
413 end hr_appraisal_templates_api;