15: l_argument varchar2(30);
16: --
17: Begin
18: l_proc := g_package || 'chk_non_updateable_args';
19: hr_utility.set_location( ' Entering:' ||l_proc, 10);
20: --
21: -- Only proceed with validation of a row exists for
22: -- the current record in the HR schema
23: --
24: if not ghr_prh_shd.api_updating
25: (p_pa_routing_history_id => p_rec.pa_routing_history_id
26: ,p_object_version_number => p_rec.object_version_number
27: ) then
28: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message('PROCEDURE',l_proc);
30: hr_utility.set_message('STEP', '20');
31: end if;
32: hr_utility.set_location(l_proc,30);
25: (p_pa_routing_history_id => p_rec.pa_routing_history_id
26: ,p_object_version_number => p_rec.object_version_number
27: ) then
28: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message('PROCEDURE',l_proc);
30: hr_utility.set_message('STEP', '20');
31: end if;
32: hr_utility.set_location(l_proc,30);
33: --
26: ,p_object_version_number => p_rec.object_version_number
27: ) then
28: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message('PROCEDURE',l_proc);
30: hr_utility.set_message('STEP', '20');
31: end if;
32: hr_utility.set_location(l_proc,30);
33: --
34: if nvl(p_rec.pa_request_id,hr_api.g_number)
28: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message('PROCEDURE',l_proc);
30: hr_utility.set_message('STEP', '20');
31: end if;
32: hr_utility.set_location(l_proc,30);
33: --
34: if nvl(p_rec.pa_request_id,hr_api.g_number)
35: <> nvl(ghr_prh_shd.g_old_rec.pa_request_id,hr_api.g_number) then
36: l_argument := 'pa_request_id';
59: l_argument := 'nature_of_action_id';
60: raise l_error;
61: end if;
62: */
63: hr_utility.set_location(l_proc,40);
64: --
65: exception
66: when l_error then
67: hr_api.argument_changed_error
112: where par.pa_request_id = p_pa_request_id;
113: --
114: begin
115: l_proc := g_package||'chk_pa_request_id';
116: hr_utility.set_location('Entering:'|| l_proc, 10);
117: --
118: -- Check mandatory parameters have been set
119: --
120: hr_api.mandatory_arg_error
122: ,p_argument => 'pa_request_id'
123: ,p_argument_value => p_pa_request_id
124: );
125: --
126: hr_utility.set_location(l_proc, 20);
127: --
128: -- Only proceed with validation if:
129: -- a) The current g_old_rec is current and
130: -- b) The routing status value has changed
133: l_api_updating := ghr_prh_shd.api_updating
134: (p_pa_routing_history_id => p_pa_routing_history_id
135: ,p_object_version_number => p_object_version_number
136: );
137: hr_utility.set_location(l_proc, 30);
138: --
139: if ((l_api_updating
140: and nvl(ghr_prh_shd.g_old_rec.pa_request_id, hr_api.g_number)
141: <> nvl(p_pa_request_id,hr_api.g_number))
141: <> nvl(p_pa_request_id,hr_api.g_number))
142: or
143: (NOT l_api_updating))
144: then
145: hr_utility.set_location(l_proc, 40);
146: --
147: -- Check if pa_request_id is valid
148: --
149: for rec in c_pa_req_id loop
154: ghr_prh_shd.constraint_error(p_constraint_name => 'GHR_PA_ROUTING_HIST_FK1');
155: end if;
156: end if;
157: --
158: hr_utility.set_location(' Leaving:'|| l_proc, 3);
159: end chk_pa_request_id;
160:
161:
162:
207: and gbx.groupbox_id = p_groupbox_id;
208: --
209: begin
210: l_proc := g_package||'chk_groupbox_id';
211: hr_utility.set_location('Entering:'|| l_proc, 1);
212: --
213: -- Check mandatory parameters have been set
214: hr_api.mandatory_arg_error
215: (p_api_name => l_proc
228: if ((l_api_updating and nvl(ghr_prh_shd.g_old_rec.groupbox_id,hr_api.g_number)
229: <> nvl(p_groupbox_id,hr_api.g_number))
230: or (NOT l_api_updating)) then
231: --
232: hr_utility.set_location(l_proc, 2);
233: --
234: -- check if the groupbox_id exists for the
235: -- routing_group_id
236: if p_groupbox_id is not null then
239: exit;
240: end loop;
241: --bug 4896738 skip checking for group box if it comes from process futures..
242:
243: hr_utility.set_location('value before raising invalid group box error'||l_grp_box,2222);
244: if not l_exists then
245: hr_utility.set_message(8301,'GHR_38101_INV_GROUPBOX_ID');
246: hr_utility.raise_error;
247:
241: --bug 4896738 skip checking for group box if it comes from process futures..
242:
243: hr_utility.set_location('value before raising invalid group box error'||l_grp_box,2222);
244: if not l_exists then
245: hr_utility.set_message(8301,'GHR_38101_INV_GROUPBOX_ID');
246: hr_utility.raise_error;
247:
248: end if;
249: end if;
242:
243: hr_utility.set_location('value before raising invalid group box error'||l_grp_box,2222);
244: if not l_exists then
245: hr_utility.set_message(8301,'GHR_38101_INV_GROUPBOX_ID');
246: hr_utility.raise_error;
247:
248: end if;
249: end if;
250: --
249: end if;
250: --
251: end if;
252: --
253: hr_utility.set_location(' Leaving:'|| l_proc, 3);
254: end chk_groupbox_id;
255:
256: -- ----------------------------------------------------------------------------
257: -- |---------------------------< chk_user_name>----------------------------|
303: where upper(user_name) = upper(p_user_name);
304:
305: begin
306: l_proc := g_package ||'chk_user_name';
307: hr_utility.set_location('Entering:'||l_proc,10);
308: --
309: -- Only proceed with validation if:
310: -- a) The current g_old_rec is current and
311: -- b) routing_user_name has changed
321: <> nvl(p_user_name,hr_api.g_varchar2))
322: or (NOT l_api_updating)) then
323:
324: --
325: hr_utility.set_location(l_proc, 2);
326: --
327: -- check if the user_name is valid
328: if p_user_name is not null then
329: if p_groupbox_id is not null then
332: exit;
333: end loop;
334: --bug# 4896738
335: if not l_exists and not ghr_proc_fut_mt.g_skip_grp_box then
336: hr_utility.set_message(8301,'GHR_38103_INV_GROUPBOX_USER');
337: hr_utility.raise_error;
338: end if;
339: end if;
340: l_exists := false;
333: end loop;
334: --bug# 4896738
335: if not l_exists and not ghr_proc_fut_mt.g_skip_grp_box then
336: hr_utility.set_message(8301,'GHR_38103_INV_GROUPBOX_USER');
337: hr_utility.raise_error;
338: end if;
339: end if;
340: l_exists := false;
341: for c_user_name_rec in c_user_name loop
342: l_exists := true;
343: exit;
344: end loop;
345: if not l_exists then
346: hr_utility.set_message(8301,'GHR_38102_INV_USER_NAME');
347: hr_utility.raise_error;
348: end if;
349: end if;
350: end if;
343: exit;
344: end loop;
345: if not l_exists then
346: hr_utility.set_message(8301,'GHR_38102_INV_USER_NAME');
347: hr_utility.raise_error;
348: end if;
349: end if;
350: end if;
351: --
348: end if;
349: end if;
350: end if;
351: --
352: hr_utility.set_location(' Leaving:'|| l_proc, 3);
353: end chk_user_name;
354: --
355:
356:
394: from ghr_routing_lists prl
395: where prl.routing_list_id = p_routing_list_id;
396: --
397: begin
398: hr_utility.set_location('Entering:'|| l_proc, 10);
399: --
400: -- Check mandatory parameters have been set
401: --
402: hr_utility.set_location(l_proc, 20);
398: hr_utility.set_location('Entering:'|| l_proc, 10);
399: --
400: -- Check mandatory parameters have been set
401: --
402: hr_utility.set_location(l_proc, 20);
403: -- Only proceed with validation if:
404: -- a) The current g_old_rec is current and
405: -- b) The routing status value has changed
406: -- c) a record is being inserted
408: l_api_updating := ghr_prh_shd.api_updating
409: (p_pa_routing_history_id => p_pa_routing_history_id
410: ,p_object_version_number => p_object_version_number
411: );
412: hr_utility.set_location(l_proc, 30);
413: --
414: if ((l_api_updating
415: and nvl(ghr_prh_shd.g_old_rec.routing_list_id, hr_api.g_number)
416: <> nvl(p_routing_list_id,hr_api.g_number))
416: <> nvl(p_routing_list_id,hr_api.g_number))
417: or
418: (NOT l_api_updating))
419: then
420: hr_utility.set_location(l_proc, 40);
421: --
422: -- Check if p_routing_list_id is valid
423: --
424: if p_routing_list_id is not null then
430: end if;
431: end if;
432: end if;
433: --
434: hr_utility.set_location(' Leaving:'|| l_proc, 50);
435: end chk_routing_list_id;
436: --
437:
438:
481: where rlm.routing_list_id = p_routing_list_id
482: and rlm.seq_number = p_routing_seq_number;
483:
484: begin
485: hr_utility.set_location('Entering:'|| l_proc, 1);
486: --
487: -- Only proceed with validation if:
488: -- a) The current g_old_rec is current and
489: -- b) routing_seq_number has changed
496: if ((l_api_updating and nvl(ghr_prh_shd.g_old_rec.routing_seq_number,hr_api.g_number)
497: <> nvl(p_routing_seq_number,hr_api.g_number))
498: or (NOT l_api_updating)) then
499: --
500: hr_utility.set_location(l_proc, 2);
501: --
502: -- check if the routing_seq_number exists for the
503: -- routing_list_id
504: if p_routing_seq_number is not null then
506: l_exists := TRUE;
507: exit;
508: end loop;
509: if not l_exists then
510: hr_utility.set_message(8301,'GHR_38104_INV_ROUT_SEQ_NUM');
511: hr_utility.raise_error;
512: end if;
513: end if;
514: end if;
507: exit;
508: end loop;
509: if not l_exists then
510: hr_utility.set_message(8301,'GHR_38104_INV_ROUT_SEQ_NUM');
511: hr_utility.raise_error;
512: end if;
513: end if;
514: end if;
515: --
512: end if;
513: end if;
514: end if;
515: --
516: hr_utility.set_location(' Leaving:'|| l_proc, 3);
517: end chk_rout_user_sequ_numb;
518: --
519: --
520:
528: l_proc varchar2(72) := g_package||'insert_validate';
529: --
530:
531: Begin
532: hr_utility.set_location('Entering:'||l_proc, 5);
533: --
534: -- Call all supporting business operations
535: --
536: -- hr_utility.set_location(l_proc, 10);
532: hr_utility.set_location('Entering:'||l_proc, 5);
533: --
534: -- Call all supporting business operations
535: --
536: -- hr_utility.set_location(l_proc, 10);
537: --
538: -- to check valid request_id
539: ghr_prh_bus.chk_pa_request_id(p_pa_request_id =>p_rec.pa_request_id
540: ,p_pa_routing_history_id =>p_rec.pa_routing_history_id
570: ,p_object_version_number => p_rec.object_version_number
571: );
572: --
573:
574: hr_utility.set_location(' Leaving:'||l_proc, 20);
575: End insert_validate;
576: --
577: -- ----------------------------------------------------------------------------
578: -- |---------------------------< update_validate >----------------------------|
586: l_proc varchar2(72) := g_package||'update_validate';
587: --
588:
589: Begin
590: hr_utility.set_location('Entering:'||l_proc, 5);
591: --
592: -- call chk_non_updateable_args
593: chk_non_updateable_args (p_rec => p_rec);
594:
593: chk_non_updateable_args (p_rec => p_rec);
594:
595: -- Call all supporting business operations
596: --
597: -- hr_utility.set_location(l_proc, 10);
598:
599: -- to check valid user_name
600: ghr_prh_bus.chk_user_name(p_user_name =>p_rec.user_name
601: ,p_groupbox_id =>p_rec.groupbox_id
610: ,p_object_version_number => p_rec.object_version_number
611: );
612: */
613:
614: hr_utility.set_location(' Leaving:'||l_proc, 60);
615: End update_validate;
616:
617:
618: -- ----------------------------------------------------------------------------
622: --
623: l_proc varchar2(72) := g_package||'delete_validate';
624: --
625: Begin
626: hr_utility.set_location('Entering:'||l_proc, 5);
627: --
628: -- Call all supporting business operations
629: --
630: hr_utility.set_location(' Leaving:'||l_proc, 10);
626: hr_utility.set_location('Entering:'||l_proc, 5);
627: --
628: -- Call all supporting business operations
629: --
630: hr_utility.set_location(' Leaving:'||l_proc, 10);
631: End delete_validate;
632: --
633:
634: end ghr_prh_bus;