1 PACKAGE hr_person_info_util_ss AUTHID CURRENT_USER AS
2 /* $Header: hrperuts.pkh 115.20 2002/12/05 19:33:37 snachuri noship $*/
3
4 -- Global variables
5 gv_default_result_code constant
6 wf_item_activity_statuses.activity_result_code%type
7 := 'HR_SUBMIT_FOR_APPROVAL';
8 gv_wf_process_sect_attr_name constant wf_item_attributes.name%type
9 := 'HR_PERINFO_PROCESS_SECTION';
10
11 gv_wf_action_type_attr_name constant wf_item_attributes.name%type
12 := 'HR_PERINFO_ACTION_TYPE';
13
14 gv_update_attr_value constant wf_item_attribute_values.text_value%type
15 := 'UPDATE';
16
17 gv_add_attr_value constant wf_item_attribute_values.text_value%type
18 := 'ADD';
19
20 --
21 -- PB : For Contacts module.
22 --
23 gv_add_upd_attr_value constant wf_item_attribute_values.text_value%type
24 := 'ADD_OR_UPDATE';
25
26 gv_del_attr_value constant wf_item_attribute_values.text_value%type
27 := 'DELETE';
28
29 gv_view_future_changes_value constant wf_item_attribute_values.text_value%type
30 := 'VIEW_FUTURE_CHANGES';
31
32 gv_view_pending_approval_value constant wf_item_attribute_values.text_value%type
33 := 'VIEW_PENDING_APPROVAL_CHANGES';
34
35 gv_basic_details_sect constant wf_item_attribute_values.text_value%type
36 := 'BASIC_DETAILS';
37
38 gv_main_address_sect constant wf_item_attribute_values.text_value%type
39 := 'MAIN_ADDRESS';
40
41 gv_secondary_address_sect constant wf_item_attribute_values.text_value%type
42 := 'SECONDARY_ADDRESS';
43
44 --
45 -- PB : For Contacts module.
46 --
47 gv_contacts_sect constant wf_item_attribute_values.text_value%type
48 := 'CONTACTS';
49
50 gv_update_basic_details_value constant wf_item_attribute_values.text_value%type
51 := 'HR_UPDATE_BASIC_DETAILS';
52
53 gv_view_basic_details_value constant wf_item_attribute_values.text_value%type
54 := 'HR_VIEW_BASIC_DETAILS';
55
56 gv_update_main_address_value constant wf_item_attribute_values.text_value%type
57 := 'HR_UPDATE_MAIN_ADDRESS';
58
59 gv_add_main_address_value constant wf_item_attribute_values.text_value%type
60 := 'HR_ADD_MAIN_ADDRESS';
61
62 gv_view_main_address_value constant wf_item_attribute_values.text_value%type
63 := 'HR_VIEW_MAIN_ADDRESS';
64
65 gv_update_second_address_value constant wf_item_attribute_values.text_value%type
66 := 'HR_UPDATE_SECONDARY_ADDRESS';
67
68 gv_add_second_address_value constant wf_item_attribute_values.text_value%type
69 := 'HR_ADD_SECONDARY_ADDRESS';
70
71 gv_view_second_address_value constant wf_item_attribute_values.text_value%type
72 := 'HR_VIEW_SECONDARY_ADDRESS';
73 --
74 -- PB : For Contacts module.
75 --
76 gv_add_upd_contacts_value constant wf_item_attribute_values.text_value%type
77 := 'HR_ADD_UPD_CONTACT';
78
79 gv_del_contacts_value constant wf_item_attribute_values.text_value%type
80 := 'HR_DEL_CONTACT';
81
82 --
83 --
84 -- ---------------------------------------------------------------------------
85 -- --------------------- < check_pending_approval_items> ---------------------
86 -- ---------------------------------------------------------------------------
87 -- Purpose: This procedure will check whether there are any pending approval
88 -- items in workflow for a given process name and process section
89 -- name. If the p_process_name parameter is passed in, then this
90 -- procedure will be searching for Personal Information pending
91 -- approval items. This procedure returns three output parameters.
92 --
93 -- Input Parameters:
94 -- p_item_type - required.
95 -- p_process_name - required. It is the process name coded in the FND Form
96 -- function parameters.
97 -- p_api_name - This api_name in conjunction with the p_item_type and
98 -- p_item_key parameters will uniquely identify the
99 -- activity_id which was used to save recs to the trans
100 -- table.
101 -- p_result_code - This result code is used in collaboration with the derived
102 -- activity_id to check for pending approval items.
103 -- If it is null,it will be defaulted to 'SUBMIT_FOR_APPROVAL'
104 -- result code.
105 -- p_current_person_id - the person_id for whom the action is to be performed.
106 --
107 -- p_address_context - this is used by Address section in the Personal
108 -- Information Overview page. Since primary and secondary
109 -- address use the same api name, we need this parameter
110 -- to indicate further filtering by transaction values for
111 -- "P_PRIMARY_FLAG" equals to "Y" or "N".
112 -- Valid values are "PRIMARY" or "SECONDARY".
113 --
114 -- Output Parameters:
115 -- 1) p_multiple_item_keys - this parameter will have a value only if p_trans_rec_count >1.
116 -- If not it is null.
117 -- 2) p_pending_item_key - this parameter will return the pending item key value.
118 --
119 -- Inovked by: Java code.
120 -- ---------------------------------------------------------------------------
121 PROCEDURE check_pending_approval_items (
122 p_item_type in varchar2
123 ,p_process_name in varchar2
124 ,p_api_name in varchar2
125 ,p_result_code in varchar2 default null
126 ,p_current_person_id in number
127 ,p_address_context in varchar2 default null
128 ,p_multiple_item_keys out nocopy varchar2
129 ,p_pending_item_key out nocopy varchar2
130 );
131
132 --
133 --
134 -- ----------------------------------------------------------------------------
135 -- |-------------------------------< process_action >----------------------------|
136 -- ----------------------------------------------------------------------------
137 -- Purpose: This procedure will be called from the overview page, which will route
138 -- for the process section (e.g:- BASIC_DETAILS or MAIN_ADDRESS) to either
139 -- type of change or update page, depending on the link on the overview page.
140 --
141 -- Parameters:
142 -- Input
143 -- p_item_type - required. It is the item type for the workflow process.
144 -- p_item_key - required. It is the item key for the workflow process.
145 -- p_actid - required. It is the item key for the workflow process.
146 -- p_funcmode - required. It is the func mode for the workflow process.
147
148 -- Output Parameters:
149 -- 1) p_resultout - will populate the result code for the activity
150 -- ---------------------------------------------------------------------------
151
152 PROCEDURE process_action
153 (p_item_type in varchar2
154 ,p_item_key in varchar2
155 ,p_actid in number
156 ,p_funcmode in varchar2
157 ,p_resultout out nocopy varchar2
158 );
159
160 -- ----------------------------------------------------------------------------
161 -- |-------------------------------< is_duplicate_person >-----------------------|
162 -- ----------------------------------------------------------------------------
163 -- Purpose: This procedure can be used to check if there are any duplicate persons
164 -- this will internally call hr_generl2.is_duplicate_person function.
165 --
166 -- Parameters:
167 -- Input
171 -- p_date_of_birth - required.
168 -- p_first_name - required.
169 -- p_last_name - required.
170 -- p_national_identifier - required.
172
173 -- Output Parameters:
174 -- 1) p_resultout - will have a value of 0 for flase
175 -- 1 for true
176 -- ---------------------------------------------------------------------------
177
178 PROCEDURE is_duplicate_person
179 (p_first_name in varchar2
180 ,p_last_name in varchar2
181 ,p_national_identifier in varchar2
182 ,p_date_of_birth in date
183 ,p_effective_date in date
184 ,p_resultout out nocopy number
185 );
186
187 --
188 -- Fix 2091186 Start
189 -- ----------------------------------------------------------------------------
190 -- |--------------------< create_ignore_df_validation >-----------------------|
191 -- ----------------------------------------------------------------------------
192 -- Purpose: To add descriptive flex field to ignorable list.
193 -- Parameters:
194 -- Input
195 -- p_flex_name - required.
196 -- ----------------------------------------------------------------------------
197
198 PROCEDURE create_ignore_df_validation
199 ( p_flex_name varchar2
200 );
201
202 --
203 -- ----------------------------------------------------------------------------
204 -- |--------------------< remove_ignore_df_validation >-----------------------|
205 -- ----------------------------------------------------------------------------
206 -- Purpose: To remove descriptive flex field validation.
207 -- Parameters:
208 -- Input
209 -- none.
210 -- ----------------------------------------------------------------------------
211
212 PROCEDURE remove_ignore_df_validation
213 ;
214 --
215 -- Fix 2091186 End
216
217 -- |--------------------< get_trns_employee_number >-----------------------|
218 -- ----------------------------------------------------------------------------
219 -- Purpose: To get the employee number stored in the basic details step. This
220 -- procedure will be called from assignment and supervisor wrappers to get the
221 -- employee number while hiring an applicant.
222 -- Parameters:
223 -- Input
224 -- none.
225 -- ----------------------------------------------------------------------------
226
227 PROCEDURE get_trns_employee_number
228 ( p_item_type varchar2
229 ,p_item_key varchar2
230 ,p_employee_number out nocopy varchar2
231 );
232
236 -- this procedure checks if the SSN entered is duplicate or not.If value of profile
233 -- ----------------------------------------------------------------------------
234 -- |-------------------------< check_ni_unique>------------------------|
235 -- ----------------------------------------------------------------------------
237 -- HR: NI Unique Error or Warning is 'Warning' then warning is raised for duplicate
238 -- SSN entered else if value is 'Error' or null then error is raised.
239
240 procedure check_ni_unique
241 (p_national_identifier in varchar2 default null
242 ,p_business_group_id in number
243 ,p_person_id in number
244 ,p_ni_duplicate_warn_or_err out nocopy varchar2);
245 --
246
247 -- ----------------------------------------------------------------------------
248 -- |-----------------------< validate_national_identifier>--------------------|
249 -- ----------------------------------------------------------------------------
250 -- this procedure checks if the national identifier entered is in valid format
251 -- or not.If value of profile HR: National Identifier Validation is 'Warning on Fail'
252 -- then warning is raised.
253
254 procedure validate_national_identifier(
255 p_national_identifier VARCHAR2,
256 p_birth_date DATE,
257 p_gender VARCHAR2,
258 p_event VARCHAR2 default 'WHEN-VALIDATE-RECORD',
259 p_person_id NUMBER,
260 p_business_group_id NUMBER,
261 p_legislation_code VARCHAR2,
262 p_effective_date DATE,
263 p_warning OUT NOCOPY VARCHAR2,
264 p_person_type_id NUMBER default NULL,
265 p_region_of_birth VARCHAR2 default NULL,
266 p_country_of_birth VARCHAR2 default NULL);
267 --
268
269 END hr_person_info_util_ss;
270
271 --