85: (p_position_id in number, p_effective_date in date) return varchar2 is
86: l_proc varchar2(72) := g_package||'open_status';
87: l_open_state varchar2(100):= 'OPEN';
88: begin
89: hr_utility.set_location('Entering:'||l_proc, 5);
90: --
91: -- fetch open state
92: --
93: l_open_state := pqh_psf_bus.open_status(p_position_id, p_effective_date);
91: -- fetch open state
92: --
93: l_open_state := pqh_psf_bus.open_status(p_position_id, p_effective_date);
94: --
95: hr_utility.set_location(' Leaving:'||l_proc, 10);
96: --
97: return l_open_state;
98: end;
99: --
107: (p_position_id in number) return varchar2 is
108: l_proc varchar2(72) := g_package||'future_approved_actions';
109: l_pending_action_flag varchar2(100):= 'N';
110: begin
111: hr_utility.set_location('Entering:'||l_proc, 5);
112: --
113: -- fetch future approved actions flag
114: --
115: l_pending_action_flag := pqh_psf_bus.future_approved_actions(p_position_id);
113: -- fetch future approved actions flag
114: --
115: l_pending_action_flag := pqh_psf_bus.future_approved_actions(p_position_id);
116: --
117: hr_utility.set_location(' Leaving:'||l_proc, 10);
118: --
119: return l_pending_action_flag;
120: end;
121: --
132: --
133: l_proc varchar2(72) := g_package||'per_abv_insert_validate';
134: --
135: begin
136: hr_utility.set_location('Entering:'||l_proc, 5);
137: --
138: pqh_psf_bus.per_abv_insert_validate(
139: p_assignment_id =>p_assignment_id,
140: p_value =>p_value,
140: p_value =>p_value,
141: p_unit =>p_unit,
142: p_effective_date =>p_effective_date);
143: --
144: hr_utility.set_location(' Leaving:'||l_proc, 10);
145: end;
146: --
147: -- ---------------------------------------------------------------------------
148: -- |----------------------< per_abv_update_validate >-------------------|
160: --
161: l_proc varchar2(72) := g_package||'per_abv_update_validate';
162: --
163: begin
164: hr_utility.set_location('Entering:'||l_proc, 5);
165: --
166: pqh_psf_bus.per_abv_update_validate(
167: p_abv_id =>p_abv_id,
168: p_assignment_id =>p_assignment_id,
172: p_validation_start_date =>p_validation_start_date,
173: p_validation_end_date =>p_validation_end_date,
174: p_datetrack_mode =>p_datetrack_mode);
175: --
176: hr_utility.set_location(' Leaving:'||l_proc, 10);
177: end;
178: --
179: -- ----------------------------------------------------------------------------
180: -- |------------------------< hr_psf_bus >--------------------|
188: --
189: l_proc varchar2(72) := g_package||'hr_psf_bus';
190: --
191: begin
192: hr_utility.set_location('Entering:'||l_proc, 5);
193: --
194: if p_event = 'INSERT_VALIDATE' then
195: pqh_psf_bus.hr_psf_bus_insert_validate(p_rec, p_effective_date);
196: elsif p_event = 'UPDATE_VALIDATE' then
196: elsif p_event = 'UPDATE_VALIDATE' then
197: pqh_psf_bus.hr_psf_bus_update_validate(p_rec, p_effective_date, p_validation_start_date,p_validation_end_date, p_datetrack_mode );
198: end if;
199: --
200: hr_utility.set_location(' Leaving:'||l_proc, 10);
201: end;
202: --
203: --
204: -- ----------------------------------------------------------------------------
213: --
214: l_proc varchar2(72) := g_package||'per_asg_bus';
215: --
216: begin
217: hr_utility.set_location('Entering:'||l_proc, 5);
218: --
219: if p_event = 'INSERT_VALIDATE' then
220: pqh_psf_bus.per_asg_bus_insert_validate(p_rec, p_effective_date);
221: elsif p_event = 'UPDATE_VALIDATE' then
232: ,p_validation_end_date => p_validation_end_date
233: ,p_datetrack_mode => p_datetrack_mode);
234: end if;
235: --
236: hr_utility.set_location(' Leaving:'||l_proc, 10);
237: end;
238: --
239: --
240: -- ----------------------------------------------------------------------------
245: --
246: l_proc varchar2(72) := g_package||'hr_psf_bus';
247: --
248: begin
249: hr_utility.set_location('Entering:'||l_proc, 5);
250: --
251: --
252: hr_utility.set_location(' Leaving:'||l_proc, 10);
253: end;
248: begin
249: hr_utility.set_location('Entering:'||l_proc, 5);
250: --
251: --
252: hr_utility.set_location(' Leaving:'||l_proc, 10);
253: end;
254: --
255: --
256: -- ----------------------------------------------------------------------------
261: --
262: l_proc varchar2(72) := g_package||'hr_psf_bus';
263: --
264: begin
265: hr_utility.set_location('Entering:'||l_proc, 5);
266: --
267: --
268: hr_utility.set_location(' Leaving:'||l_proc, 10);
269: end;
264: begin
265: hr_utility.set_location('Entering:'||l_proc, 5);
266: --
267: --
268: hr_utility.set_location(' Leaving:'||l_proc, 10);
269: end;
270: --
271: /*
272: --
278: --
279: l_proc varchar2(72) := g_package||'hr_psf_bus';
280: --
281: begin
282: hr_utility.set_location('Entering:'||l_proc, 5);
283: --
284: --
285: hr_utility.set_location(' Leaving:'||l_proc, 10);
286: end;
281: begin
282: hr_utility.set_location('Entering:'||l_proc, 5);
283: --
284: --
285: hr_utility.set_location(' Leaving:'||l_proc, 10);
286: end;
287: --
288: */
289: --
295: --
296: l_proc varchar2(72) := g_package||'hr_psf_bus';
297: --
298: begin
299: hr_utility.set_location('Entering:'||l_proc, 5);
300: --
301: --
302: hr_utility.set_location(' Leaving:'||l_proc, 10);
303: end;
298: begin
299: hr_utility.set_location('Entering:'||l_proc, 5);
300: --
301: --
302: hr_utility.set_location(' Leaving:'||l_proc, 10);
303: end;
304: --
305: --
306: -- ----------------------------------------------------------------------------
311: --
312: l_proc varchar2(72) := g_package||'hr_psf_bus';
313: --
314: begin
315: hr_utility.set_location('Entering:'||l_proc, 5);
316: --
317: --
318: hr_utility.set_location(' Leaving:'||l_proc, 10);
319: end;
314: begin
315: hr_utility.set_location('Entering:'||l_proc, 5);
316: --
317: --
318: hr_utility.set_location(' Leaving:'||l_proc, 10);
319: end;
320: --
321: --
322: -- ----------------------------------------------------------------------------
327: --
328: l_proc varchar2(72) := g_package||'hr_psf_bus';
329: --
330: begin
331: hr_utility.set_location('Entering:'||l_proc, 5);
332: --
333: --
334: hr_utility.set_location(' Leaving:'||l_proc, 10);
335: end;
330: begin
331: hr_utility.set_location('Entering:'||l_proc, 5);
332: --
333: --
334: hr_utility.set_location(' Leaving:'||l_proc, 10);
335: end;
336: --
337: --
338: -- ----------------------------------------------------------------------------
343: --
344: l_proc varchar2(72) := g_package||'hr_psf_bus';
345: --
346: begin
347: hr_utility.set_location('Entering:'||l_proc, 5);
348: --
349: --
350: hr_utility.set_location(' Leaving:'||l_proc, 10);
351: end;
346: begin
347: hr_utility.set_location('Entering:'||l_proc, 5);
348: --
349: --
350: hr_utility.set_location(' Leaving:'||l_proc, 10);
351: end;
352: --
353: --
354: -- ----------------------------------------------------------------------------
359: --
360: l_proc varchar2(72) := g_package||'hr_psf_bus';
361: --
362: begin
363: hr_utility.set_location('Entering:'||l_proc, 5);
364: --
365: --
366: hr_utility.set_location(' Leaving:'||l_proc, 10);
367: end;
362: begin
363: hr_utility.set_location('Entering:'||l_proc, 5);
364: --
365: --
366: hr_utility.set_location(' Leaving:'||l_proc, 10);
367: end;
368: --
369: --
370: -- ----------------------------------------------------------------------------
375: --
376: l_proc varchar2(72) := g_package||'hr_psf_bus';
377: --
378: begin
379: hr_utility.set_location('Entering:'||l_proc, 5);
380: --
381: --
382: hr_utility.set_location(' Leaving:'||l_proc, 10);
383: end;
378: begin
379: hr_utility.set_location('Entering:'||l_proc, 5);
380: --
381: --
382: hr_utility.set_location(' Leaving:'||l_proc, 10);
383: end;
384: --
385: --
386: -- ----------------------------------------------------------------------------
391: --
392: l_proc varchar2(72) := g_package||'hr_psf_bus';
393: --
394: begin
395: hr_utility.set_location('Entering:'||l_proc, 5);
396: --
397: --
398: hr_utility.set_location(' Leaving:'||l_proc, 10);
399: end;
394: begin
395: hr_utility.set_location('Entering:'||l_proc, 5);
396: --
397: --
398: hr_utility.set_location(' Leaving:'||l_proc, 10);
399: end;
400: --
401: --
402: -- ----------------------------------------------------------------------------
407: --
408: l_proc varchar2(72) := g_package||'hr_psf_bus';
409: --
410: begin
411: hr_utility.set_location('Entering:'||l_proc, 5);
412: --
413: --
414: hr_utility.set_location(' Leaving:'||l_proc, 10);
415: end;
410: begin
411: hr_utility.set_location('Entering:'||l_proc, 5);
412: --
413: --
414: hr_utility.set_location(' Leaving:'||l_proc, 10);
415: end;
416: --
417: --
418: -- ----------------------------------------------------------------------------
423: --
424: l_proc varchar2(72) := g_package||'hr_psf_bus';
425: --
426: begin
427: hr_utility.set_location('Entering:'||l_proc, 5);
428: --
429: --
430: hr_utility.set_location(' Leaving:'||l_proc, 10);
431: end;
426: begin
427: hr_utility.set_location('Entering:'||l_proc, 5);
428: --
429: --
430: hr_utility.set_location(' Leaving:'||l_proc, 10);
431: end;
432: --
433: --
434: -- ----------------------------------------------------------------------------
439: --
440: l_proc varchar2(72) := g_package||'hr_psf_bus';
441: --
442: begin
443: hr_utility.set_location('Entering:'||l_proc, 5);
444: --
445: --
446: hr_utility.set_location(' Leaving:'||l_proc, 10);
447: end;
442: begin
443: hr_utility.set_location('Entering:'||l_proc, 5);
444: --
445: --
446: hr_utility.set_location(' Leaving:'||l_proc, 10);
447: end;
448: --
449: --
450: -- ----------------------------------------------------------------------------
455: --
456: l_proc varchar2(72) := g_package||'hr_psf_bus';
457: --
458: begin
459: hr_utility.set_location('Entering:'||l_proc, 5);
460: --
461: --
462: hr_utility.set_location(' Leaving:'||l_proc, 10);
463: end;
458: begin
459: hr_utility.set_location('Entering:'||l_proc, 5);
460: --
461: --
462: hr_utility.set_location(' Leaving:'||l_proc, 10);
463: end;
464: --
465: --
466: -- ----------------------------------------------------------------------------
471: --
472: l_proc varchar2(72) := g_package||'hr_psf_bus';
473: --
474: begin
475: hr_utility.set_location('Entering:'||l_proc, 5);
476: --
477: --
478: hr_utility.set_location(' Leaving:'||l_proc, 10);
479: end;
474: begin
475: hr_utility.set_location('Entering:'||l_proc, 5);
476: --
477: --
478: hr_utility.set_location(' Leaving:'||l_proc, 10);
479: end;
480: --
481: --
482: --
573: where assignment_id = l_assignment_id
574: and assignment_type = 'E'
575: and position_id = c_pos_id;
576: begin
577: hr_utility.set_location('Entering:'||l_proc, 5);
578: --
579: l_position_id := p_rec.position_id;
580: l_assignment_id := p_rec.assignment_id;
581: l_old_position_id := per_asg_shd.g_old_rec.position_id;
630: p_start_date => l_assg_start_date,
631: p_expiration_date => l_assg_end_date);
632: end if;
633: --
634: hr_utility.set_location('Leaving:'||l_proc, 5);
635:
636: end;
637: --
638: -- ----------------------------------------------------------------------------
712: if l_assignment_id is not null then
713: open c_person(l_assignment_id);
714: fetch c_person into r_person;
715:
716: hr_utility.set_location('ORIG SYSTEM ID: '|| r_person.USER_ORIG_SYSTEM_ID||l_proc, 5);
717: hr_utility.set_location('ORIG SYSTEM:'|| r_person.USER_ORIG_SYSTEM|| l_proc, 5);
718: hr_utility.set_location('ROLE ORIG SYSTEM:'|| r_person.ROLE_ORIG_SYSTEM|| l_proc, 5);
719:
720: if c_person%notfound then
713: open c_person(l_assignment_id);
714: fetch c_person into r_person;
715:
716: hr_utility.set_location('ORIG SYSTEM ID: '|| r_person.USER_ORIG_SYSTEM_ID||l_proc, 5);
717: hr_utility.set_location('ORIG SYSTEM:'|| r_person.USER_ORIG_SYSTEM|| l_proc, 5);
718: hr_utility.set_location('ROLE ORIG SYSTEM:'|| r_person.ROLE_ORIG_SYSTEM|| l_proc, 5);
719:
720: if c_person%notfound then
721: /*
714: fetch c_person into r_person;
715:
716: hr_utility.set_location('ORIG SYSTEM ID: '|| r_person.USER_ORIG_SYSTEM_ID||l_proc, 5);
717: hr_utility.set_location('ORIG SYSTEM:'|| r_person.USER_ORIG_SYSTEM|| l_proc, 5);
718: hr_utility.set_location('ROLE ORIG SYSTEM:'|| r_person.ROLE_ORIG_SYSTEM|| l_proc, 5);
719:
720: if c_person%notfound then
721: /*
722: open c_per_pos_del(r_person.USER_ORIG_SYSTEM_ID);
721: /*
722: open c_per_pos_del(r_person.USER_ORIG_SYSTEM_ID);
723: fetch c_per_pos_del into l_dummy;
724: if c_per_pos_del%found then
725: hr_utility.set_location('WF_SYNC set DELETE parameter true: '||l_proc, 10);
726: wf_event.AddParameterToList('USER_NAME', r_person.ROLE_NAME,l_plist);
727: wf_event.AddParameterToList('DELETE', 'TRUE',l_plist);
728: wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
729: -- synch the wf_local_user table --
726: wf_event.AddParameterToList('USER_NAME', r_person.ROLE_NAME,l_plist);
727: wf_event.AddParameterToList('DELETE', 'TRUE',l_plist);
728: wf_event.AddParameterToList( 'Raiseerrors', 'TRUE', l_plist);
729: -- synch the wf_local_user table --
730: hr_utility.set_location('Before deleting WF_SYNC package role_user: '
731: || r_person.USER_NAME, 15);
732: wf_local_synch.propagate_user_role(p_user_orig_system => r_person.USER_ORIG_SYSTEM,
733: p_user_orig_system_id => r_person.USER_ORIG_SYSTEM_ID,
734: p_role_orig_system => r_person.ROLE_ORIG_SYSTEM,
732: wf_local_synch.propagate_user_role(p_user_orig_system => r_person.USER_ORIG_SYSTEM,
733: p_user_orig_system_id => r_person.USER_ORIG_SYSTEM_ID,
734: p_role_orig_system => r_person.ROLE_ORIG_SYSTEM,
735: p_role_orig_system_id => r_person.ROLE_ORIG_SYSTEM_ID);
736: hr_utility.set_location('After deleting WF_SYNC role_user: '||l_proc, 20);
737: --
738: end if;
739: */
740: --
747:
748: --
749: -- construct the list of attributes using standard OID att names --
750: --
751: hr_utility.set_location('Before calling add parameters: '||l_proc, 20);
752: wf_event.AddParameterToList( 'orclWFOrigSystem',r_person.ROLE_ORIG_SYSTEM,l_plist);
753: wf_event.AddParameterToList( 'orclWFOrigSystemID',r_person.ROLE_ORIG_SYSTEM_ID,l_plist);
754: wf_event.AddParameterToList( 'orclWorkFlowNotificationPref', r_person.NOTIFICATION_PREFERENCE, l_plist);
755: wf_event.AddParameterToList('preferredLanguage',r_person.LANGUAGE,l_plist);
766: p_name => 'USER_NAME',
767: p_value => r_person.ROLE_NAME,
768: p_parameterlist => l_plist);
769:
770: hr_utility.set_location('In Insert WF_SYNC role: '
771: || r_person.ROLE_NAME, 25);
772:
773:
774: WF_LOCAL_SYNCH.propagate_role(p_orig_system => r_person.ROLE_ORIG_SYSTEM,
779: open c_user_exists(r_person.USER_ORIG_SYSTEM_ID);
780: fetch c_user_exists into l_dummy_user;
781:
782: if c_user_exists%notfound then
783: hr_utility.set_location('In Insert WF_SYNC user: '
784: || r_person.USER_NAME, 25);
785: wf_event.AddParameterToList(
786: p_name => 'USER_NAME',
787: p_value => r_person.USER_NAME,
792: p_attributes => l_plist);
793: end if;
794:
795: -- synch the wf_local_user table --
796: hr_utility.set_location('Before calling WF_SYNC propagate user_role: '
797: || r_person.USER_ORIG_SYSTEM_ID, 30);
798: WF_LOCAL_SYNCH.propagate_user_role(
799: p_user_orig_system => r_person.USER_ORIG_SYSTEM,
800: p_user_orig_system_id => r_person.USER_ORIG_SYSTEM_ID,
800: p_user_orig_system_id => r_person.USER_ORIG_SYSTEM_ID,
801: p_role_orig_system => r_person.ROLE_ORIG_SYSTEM,
802: p_role_orig_system_id => r_person.ROLE_ORIG_SYSTEM_ID);
803:
804: hr_utility.set_location('After calling WF_SYNC propagate user_role: '||l_proc, 35);
805: --
806: end my_synch_routine;
807: --
808: end per_pqh_shr;