1 PACKAGE HR_MX_APPLICANT_API AS
2 /* $Header: hrmxwraa.pkh 120.1 2005/10/02 02:36:06 aroussel $ */
3 /*#
4 * This package contains applicant APIs for Mexico.
5 * @rep:scope public
6 * @rep:product PER
7 * @rep:displayname Applicant for Mexico
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |---------------------------< create_mx_applicant >------------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates a new applicant for Mexico.
17 *
18 * This API creates person details, an application, a default applicant
19 * assignment, and (if required) associated assignment budget values and a
20 * letter request. The process adds the applicant to the security lists so that
21 * secure users can see the applicant.
22 *
23 * <p><b>Licensing</b><br>
24 * This API is licensed for use with Human Resources and iRecruitment.
25 *
26 * <p><b>Prerequisites</b><br>
27 * The business group must exist on the effective date. The APL type must be
28 * active in the same business group as the applicant you are creating. If you
29 * do not specify a person_type_id, the API uses the default APL type for the
30 * business group.
31 *
32 * <p><b>Post Success</b><br>
33 * The application, default applicant assignment, and (if required) associated
34 * assignment budget values and a letter request are created.
35 *
36 * <p><b>Post Failure</b><br>
37 * The applicant is not created and an error is raised.
38 *
39 * @param p_validate If true, then validation alone will be performed and the
40 * database will remain unchanged. If false and all validation checks pass,
41 * then the database will be modified.
42 * @param p_date_received Date an application was received.
43 * @param p_business_group_id Business group of the person.
44 * @param p_paternal_last_name Paternal Last Name of the person.
45 * @param p_person_type_id Type of applicant being created.
46 * @param p_applicant_number Identifies the applicant number. If the number
47 * generation method is Manual, then this parameter is mandatory. If the number
48 * generation method is Automatic, then the value of this parameter must be
49 * null. If p_validate is false and the applicant number generation method is
50 * Automatic, then this will be set to the generated applicant number of the
51 * person created. If p_validate is false and the applicant number generation
52 * method is manual, then this will be set to the same value passed in. If
53 * p_validate is true, then this will be set to the same value as passed in.
54 * @param p_per_comments Person comment text.
55 * @param p_date_employee_data_verified Date on which the applicant data was
56 * last verified.
57 * @param p_date_of_birth Date of birth.
58 * @param p_email_address Email address.
59 * @param p_expense_check_send_to_addres Mailing address.
60 * @param p_first_name First name.
61 * @param p_known_as Preferred name.
62 * @param p_marital_status Marital status. Valid values are defined by the
63 * MAR_STATUS lookup type.
64 * @param p_second_name Second name.
65 * @param p_nationality Nationality. Valid values are defined by the
66 * NATIONALITY lookup type.
67 * @param p_curp_id Mexican National Identifier
68 * @param p_previous_last_name Obsolete parameter, do not use.
69 * @param p_registered_disabled_flag Flag indicating whether the person is
70 * classified as disabled.
71 * @param p_sex Legal gender. Valid values are defined by the SEX lookup type.
72 * @param p_title Title. Valid values are defined by the TITLE lookup type.
73 * @param p_work_telephone Obsolete parameter, do not use.
74 * @param p_attribute_category This context value determines which flexfield
75 * structure to use with the descriptive flexfield segments.
76 * @param p_attribute1 Descriptive flexfield segment.
77 * @param p_attribute2 Descriptive flexfield segment.
78 * @param p_attribute3 Descriptive flexfield segment.
79 * @param p_attribute4 Descriptive flexfield segment.
80 * @param p_attribute5 Descriptive flexfield segment.
81 * @param p_attribute6 Descriptive flexfield segment.
82 * @param p_attribute7 Descriptive flexfield segment.
83 * @param p_attribute8 Descriptive flexfield segment.
84 * @param p_attribute9 Descriptive flexfield segment.
85 * @param p_attribute10 Descriptive flexfield segment.
86 * @param p_attribute11 Descriptive flexfield segment.
87 * @param p_attribute12 Descriptive flexfield segment.
88 * @param p_attribute13 Descriptive flexfield segment.
89 * @param p_attribute14 Descriptive flexfield segment.
90 * @param p_attribute15 Descriptive flexfield segment.
91 * @param p_attribute16 Descriptive flexfield segment.
92 * @param p_attribute17 Descriptive flexfield segment.
93 * @param p_attribute18 Descriptive flexfield segment.
94 * @param p_attribute19 Descriptive flexfield segment.
95 * @param p_attribute20 Descriptive flexfield segment.
96 * @param p_attribute21 Descriptive flexfield segment.
97 * @param p_attribute22 Descriptive flexfield segment.
98 * @param p_attribute23 Descriptive flexfield segment.
99 * @param p_attribute24 Descriptive flexfield segment.
100 * @param p_attribute25 Descriptive flexfield segment.
101 * @param p_attribute26 Descriptive flexfield segment.
102 * @param p_attribute27 Descriptive flexfield segment.
103 * @param p_attribute28 Descriptive flexfield segment.
104 * @param p_attribute29 Descriptive flexfield segment.
105 * @param p_attribute30 Descriptive flexfield segment.
106 * @param p_maternal_last_name Maternal Last Name of the person.
107 * @param p_rfc_id Federal Contributor Identifier (Registro Federal de
108 * Contribuyentes).
109 * @param p_ss_id Social Security Identifier.
110 * @param p_imss_med_center Social Security Medical Center.
111 * @param p_fed_gov_affil_id Federal Government Affiliation Identifier (Clave
112 * de Afiliacion).
113 * @param p_mil_serv_id Military Service Identifier (Cartilla Militar).
114 * @param p_background_check_status Flag indicating whether the person's
115 * background has been checked.
116 * @param p_background_date_check Date on which the background check was
117 * performed.
118 * @param p_correspondence_language Preferred language for correspondence.
119 * @param p_fte_capacity Obsolete parameter, do not use.
120 * @param p_hold_applicant_date_until Date until when the applicant's
121 * information is to be maintained.
122 * @param p_honors Honors awarded.
123 * @param p_mailstop Internal mail location.
124 * @param p_office_number Office number.
125 * @param p_on_military_service Flag indicating whether the person is on
126 * military service.
127 * @param p_pre_name_adjunct Prefix before the person's name.
128 * @param p_projected_start_date Obsolete parameter, do not use.
129 * @param p_resume_exists Flag indicating whether the person's resume is on
130 * file.
131 * @param p_resume_last_updated Date on which the resume was last updated.
132 * @param p_student_status If this applicant is a student, this field is used
133 * to capture their status. Valid values are defined by the STUDENT_STATUS
134 * lookup type.
135 * @param p_work_schedule Days on which this person will work.
136 * @param p_suffix Suffix after the person's last name e.g. Sr., Jr., III.
137 * @param p_date_of_death Date of death.
138 * @param p_benefit_group_id Benefit group to which this person will belong.
139 * @param p_receipt_of_death_cert_date Date death certificate was received.
140 * @param p_coord_ben_med_pln_no Secondary medical plan name. Column used for
141 * external processing.
142 * @param p_coord_ben_no_cvg_flag No secondary medical plan coverage. Column
143 * used for external processing.
144 * @param p_uses_tobacco_flag Flag indicating whether the person uses tobacco.
145 * @param p_dpdnt_adoption_date Date on which the dependent was adopted.
146 * @param p_dpdnt_vlntry_svce_flag Flag indicating whether the dependent is on
147 * voluntary service.
148 * @param p_original_date_of_hire Original date of hire.
149 * @param p_town_of_birth Town or city of birth.
150 * @param p_region_of_birth Geographical region of birth.
151 * @param p_country_of_birth Country of birth.
152 * @param p_global_person_id Obsolete parameter, do not use.
153 * @param p_party_id TCA party for whom you create the person record.
154 * @param p_vacancy_id Identifies the vacancy for which this person has
155 * applied.
156 * @param p_person_id If p_validate is false, then this uniquely identifies the
157 * person created. If p_validate is true, then set to null.
158 * @param p_assignment_id If p_validate is false, then this uniquely identifies
159 * the created assignment. If p_validate is true, then set to null.
160 * @param p_application_id If p_validate is false, then this uniquely
161 * identifies the application created. If p_validate is true, then set to null.
162 * @param p_per_object_version_number If p_validate is false, then set to the
163 * version number of the created person. If p_validate is true, then set to
164 * null.
165 * @param p_asg_object_version_number If p_validate is false, then this
166 * parameter is set to the version number of the assignment created. If
167 * p_validate is true, then this parameter is null.
168 * @param p_apl_object_version_number If p_validate is false, then set to the
169 * version number of the created application. If p_validate is true, then set
170 * to null.
171 * @param p_per_effective_start_date If p_validate is false, then set to the
172 * earliest effective start date for the created person. If p_validate is true,
173 * then set to null.
174 * @param p_per_effective_end_date If p_validate is false, then set to the
175 * effective end date for the created person. If p_validate is true, then set
176 * to null.
177 * @param p_full_name If p_validate is false, then set to the complete full
178 * name of the person. If p_validate is true, then set to null.
179 * @param p_per_comment_id If p_validate is false and comment text was
180 * provided, then will be set to the identifier of the created person comment
181 * record. If p_validate is true or no comment text was provided, then will be
182 * null.
183 * @param p_assignment_sequence If p_validate is false, then set to the
184 * sequence number of the default assignment. If p_validate is true, then set
185 * to null.
186 * @param p_name_combination_warning If set to true, then the combination of
187 * last name, first name and date of birth existed prior to calling this API.
188 * @param p_orig_hire_warning If set to true, an orginal date of hire exists
189 * for an applicant who has never been an employee.
190 * @rep:displayname Create Applicant for Mexico
191 * @rep:category BUSINESS_ENTITY PER_APPLICANT
192 * @rep:lifecycle active
193 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
194 * @rep:scope public
195 */
196 --
197 -- {End Of Comments}
198 --
199 procedure create_mx_applicant
200 (p_validate in boolean default false
201 ,p_date_received in date
202 ,p_business_group_id in number
203 ,p_paternal_last_name in varchar2
204 ,p_person_type_id in number default null
205 ,p_applicant_number in out nocopy varchar2
206 ,p_per_comments in varchar2 default null
207 ,p_date_employee_data_verified in date default null
208 ,p_date_of_birth in date default null
209 ,p_email_address in varchar2 default null
210 ,p_expense_check_send_to_addres in varchar2 default null
211 ,p_first_name in varchar2 default null /* Bug 3695738 */
212 ,p_known_as in varchar2 default null
213 ,p_marital_status in varchar2 default null
214 ,p_second_name in varchar2 default null
215 ,p_nationality in varchar2 default null
216 ,p_curp_id in varchar2 default null
217 ,p_previous_last_name in varchar2 default null
218 ,p_registered_disabled_flag in varchar2 default null
219 ,p_sex in varchar2 default null
220 ,p_title in varchar2 default null
221 ,p_work_telephone in varchar2 default null
222 ,p_attribute_category in varchar2 default null
223 ,p_attribute1 in varchar2 default null
224 ,p_attribute2 in varchar2 default null
225 ,p_attribute3 in varchar2 default null
226 ,p_attribute4 in varchar2 default null
227 ,p_attribute5 in varchar2 default null
228 ,p_attribute6 in varchar2 default null
229 ,p_attribute7 in varchar2 default null
230 ,p_attribute8 in varchar2 default null
231 ,p_attribute9 in varchar2 default null
232 ,p_attribute10 in varchar2 default null
233 ,p_attribute11 in varchar2 default null
234 ,p_attribute12 in varchar2 default null
235 ,p_attribute13 in varchar2 default null
236 ,p_attribute14 in varchar2 default null
237 ,p_attribute15 in varchar2 default null
238 ,p_attribute16 in varchar2 default null
239 ,p_attribute17 in varchar2 default null
240 ,p_attribute18 in varchar2 default null
241 ,p_attribute19 in varchar2 default null
242 ,p_attribute20 in varchar2 default null
243 ,p_attribute21 in varchar2 default null
244 ,p_attribute22 in varchar2 default null
245 ,p_attribute23 in varchar2 default null
246 ,p_attribute24 in varchar2 default null
247 ,p_attribute25 in varchar2 default null
248 ,p_attribute26 in varchar2 default null
249 ,p_attribute27 in varchar2 default null
250 ,p_attribute28 in varchar2 default null
251 ,p_attribute29 in varchar2 default null
252 ,p_attribute30 in varchar2 default null
253 ,p_maternal_last_name in varchar2 default null
254 ,p_rfc_id in varchar2 default null
255 ,p_ss_id in varchar2 default null
256 ,p_imss_med_center in varchar2 default null
257 ,p_fed_gov_affil_id in varchar2 default null
258 ,p_mil_serv_id in varchar2 default null
259 ,p_background_check_status in varchar2 default null
260 ,p_background_date_check in date default null
261 ,p_correspondence_language in varchar2 default null
262 ,p_fte_capacity in number default null
263 ,p_hold_applicant_date_until in date default null
264 ,p_honors in varchar2 default null
265 ,p_mailstop in varchar2 default null
266 ,p_office_number in varchar2 default null
267 ,p_on_military_service in varchar2 default null
268 ,p_pre_name_adjunct in varchar2 default null
269 ,p_projected_start_date in date default null
270 ,p_resume_exists in varchar2 default null
271 ,p_resume_last_updated in date default null
272 ,p_student_status in varchar2 default null
273 ,p_work_schedule in varchar2 default null
274 ,p_suffix in varchar2 default null
275 ,p_date_of_death in date default null
276 ,p_benefit_group_id in number default null
277 ,p_receipt_of_death_cert_date in date default null
278 ,p_coord_ben_med_pln_no in varchar2 default null
279 ,p_coord_ben_no_cvg_flag in varchar2 default 'N'
280 ,p_uses_tobacco_flag in varchar2 default null
281 ,p_dpdnt_adoption_date in date default null
282 ,p_dpdnt_vlntry_svce_flag in varchar2 default 'N'
283 ,p_original_date_of_hire in date default null
284 ,p_town_of_birth in varchar2 default null
285 ,p_region_of_birth in varchar2 default null
286 ,p_country_of_birth in varchar2 default null
287 ,p_global_person_id in varchar2 default null
288 ,p_party_id in number default null
289 ,p_vacancy_id in number default null
290 ,p_person_id out nocopy number
291 ,p_assignment_id out nocopy number
292 ,p_application_id out nocopy number
293 ,p_per_object_version_number out nocopy number
294 ,p_asg_object_version_number out nocopy number
295 ,p_apl_object_version_number out nocopy number
296 ,p_per_effective_start_date out nocopy date
297 ,p_per_effective_end_date out nocopy date
298 ,p_full_name out nocopy varchar2
299 ,p_per_comment_id out nocopy number
300 ,p_assignment_sequence out nocopy number
301 ,p_name_combination_warning out nocopy boolean
302 ,p_orig_hire_warning out nocopy boolean
303 );
304 --
305 -- ----------------------------------------------------------------------------
306 -- |----------------------------< hire_mx_applicant >-------------------------|
307 -- ----------------------------------------------------------------------------
308 --
309 -- {Start Of Comments}
310 /*#
311 * This API converts an applicant to an employee.
312 *
313 * This API converts data about a person of type Applicant (APL, APL_EX_APL or
314 * EX_EMP_APL) to a person of type Employee (EMP). This conversion involves:
315 * terminating the application record; terminating unaccepted applicant
316 * assignments; setting the person type to EMP; creating a period of service
317 * record; and converting accepted applicant assignments to active employee
318 * assignments.
319 *
320 * <p><b>Licensing</b><br>
321 * This API is licensed for use with Human Resources.
322 *
323 * <p><b>Prerequisites</b><br>
324 * The applicant must exist in the relevant business group. If person_type_id
325 * is supplied, it must have a corresponding system person type of EMP and be
326 * active in the same business group as the applicant being changed to
327 * employee.
328 *
329 * <p><b>Post Success</b><br>
330 * The person, application, have been succesfully updated to employee with
331 * default employee assignment and period of service inserted.
332 *
333 * <p><b>Post Failure</b><br>
334 * The applicant is not hired as an employee and an error is raised.
335 *
336 * @param p_validate If true, then validation alone will be performed and the
337 * database will remain unchanged. If false and all validation checks pass,
338 * then the database will be modified.
339 * @param p_hire_date The person hire date and thus the effective start date of
340 * the person, assignment, and period of service.
341 * @param p_person_id Identifies the person record to modify.
342 * @param p_assignment_id Identifies the assignment for which you create the
343 * person record.
344 * @param p_person_type_id Person type id. The default value is null. . If this
345 * value is omitted, then the API uses the person_type_id of the default `EMP'
346 * system person type in the employee's business group.
347 * @param p_curp_id Mexican National Identifier
348 * @param p_per_object_version_number Pass in the current version number of the
349 * person to be updated. When the API completes if p_validate is false, will be
350 * set to the new version number of the updated person. If p_validate is true
351 * will be set to the same value which was passed in.
352 * @param p_employee_number The business group's employee number generation
353 * method determines when the API derives and passes out an employee number or
354 * when the calling program should pass in a value. When the API call
355 * completes, if p_validate is false, then set to the employee number. If
356 * p_validate is true, then set to the passed value.
357 * @param p_per_effective_start_date If p_validate is false, this will be set
358 * to the effective start date of the person. If p_validate is true this will
359 * be null.
360 * @param p_per_effective_end_date If p_validate is false, this will be set to
361 * the effective end date of the person. If p_validate is true this will be
362 * null.
363 * @param p_unaccepted_asg_del_warning If set to true, then the unaccepted
364 * applicant assignments have been terminated. It is set to false if the
365 * unaccepted applicant assignments do not exist.
366 * @param p_assign_payroll_warning If set to true, then the date of birth is
367 * not entered. If set to false, then the date of birth has been entered.
368 * Indicates if it will be possible to set the payroll on any of this person's
369 * assignments.
370 * @param p_oversubscribed_vacancy_id If one of the vacancies that the
371 * applicant was hired from is now oversubscribed, this will contain the id of
372 * the vacancy, otherwise it will be null for the applicant. The default is
373 * null.
374 * @param p_original_date_of_hire Original date of hire.
375 * @param p_migrate When True, will migrate global data of applicant to the
376 * local use (addresses, phones, previous employers, qualifications etc).
377 * @rep:displayname Hire Applicant for Mexico
378 * @rep:category BUSINESS_ENTITY PER_APPLICANT
379 * @rep:lifecycle active
380 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
381 * @rep:scope public
382 */
383 --
384 -- {End Of Comments}
385 --
386 PROCEDURE HIRE_MX_APPLICANT
387 (p_validate in boolean default false,
388 p_hire_date in date,
389 p_person_id in per_all_people_f.person_id%TYPE,
390 p_assignment_id in number default null,
391 p_person_type_id in number default null,
392 p_curp_id in per_all_people_f.national_identifier%type default hr_api.g_varchar2,
393 p_per_object_version_number in out nocopy per_all_people_f.object_version_number%TYPE,
394 p_employee_number in out nocopy per_all_people_f.employee_number%TYPE,
395 p_per_effective_start_date out nocopy date,
396 p_per_effective_end_date out nocopy date,
397 p_unaccepted_asg_del_warning out nocopy boolean,
398 p_assign_payroll_warning out nocopy boolean,
399 p_oversubscribed_vacancy_id out nocopy number,
400 p_original_date_of_hire in date default null,
401 p_migrate in boolean default true
402 );
403
404 END HR_MX_APPLICANT_API;