19: select oracle_username
20: from fnd_oracle_userid
21: where oracle_id = 800;
22: begin
23: hr_utility.set_location('Entering:'|| l_proc, 10);
24: open csr_user;
25: fetch csr_user into l_hr_username;
26: close csr_user;
27: If l_hr_username is not null
27: If l_hr_username is not null
28: then
29: if p_mode = g_full_mode
30: then
31: hr_utility.set_location(l_proc, 20);
32: ad_ctx_ddl.optimize_index
33: (idx_name=>l_hr_username||'.IRC_DOCUMENTS_CTX1'
34: ,optlevel=>'FULL'
35: ,maxtime=>null
35: ,maxtime=>null
36: ,token=>null);
37: elsif p_mode = g_online_mode
38: then
39: hr_utility.set_location(l_proc, 30);
40: ad_ctx_ddl.sync_index
41: (idx_name=>l_hr_username||'.IRC_DOCUMENTS_CTX1');
42: elsif p_mode = g_none_mode
43: then
40: ad_ctx_ddl.sync_index
41: (idx_name=>l_hr_username||'.IRC_DOCUMENTS_CTX1');
42: elsif p_mode = g_none_mode
43: then
44: hr_utility.set_location(l_proc, 35);
45: end if;
46: end if;
47: hr_utility.set_location('Leaving:'|| l_proc, 40);
48: exception
43: then
44: hr_utility.set_location(l_proc, 35);
45: end if;
46: end if;
47: hr_utility.set_location('Leaving:'|| l_proc, 40);
48: exception
49: when others then
50: If csr_user%isopen
51: then
77: l_effective_date date;
78: l_document_id number(15);
79: l_object_version_number number(9);
80: begin
81: hr_utility.set_location('Entering:'|| l_proc, 10);
82: --
83: -- Issue a savepoint
84: --
85: savepoint CREATE_DOCUMENT;
161: -- Set all output arguments
162: --
163: p_document_id := l_document_id;
164: p_object_version_number := l_object_version_number;
165: hr_utility.set_location(' Leaving:'||l_proc, 70);
166: exception
167: when hr_api.validate_enabled then
168: --
169: -- As the Validate_Enabled exception has been raised
176: -- when validation only mode is being used.)
177: --
178: p_document_id := null;
179: p_object_version_number := null;
180: hr_utility.set_location(' Leaving:'||l_proc, 80);
181: when others then
182: --
183: -- A validation or unexpected error has occured
184: --
187: --
188: p_document_id := null;
189: p_object_version_number := null;
190: --
191: hr_utility.set_location(' Leaving:'||l_proc, 90);
192: raise;
193: end CREATE_DOCUMENT;
194: --
195: --
233:
234: l_doc_record csr_document_record%ROWTYPE;
235:
236: begin
237: hr_utility.set_location('Entering:'|| l_proc, 10);
238: --
239: -- Issue a savepoint
240: --
241: savepoint UPDATE_DOCUMENT;
326: --
327: -- Set all output arguments
328: --
329: p_object_version_number := l_object_version_number;
330: hr_utility.set_location(' Leaving:'||l_proc, 70);
331: exception
332: when hr_api.validate_enabled then
333: --
334: -- As the Validate_Enabled exception has been raised
340: -- (Any key or derived arguments must be set to null
341: -- when validation only mode is being used.)
342: --
343: p_object_version_number := l_object_version_number;
344: hr_utility.set_location(' Leaving:'||l_proc, 80);
345: when others then
346: --
347: -- A validation or unexpected error has occured
348: --
348: --
349: rollback to UPDATE_DOCUMENT;
350: --
351: p_object_version_number := l_object_version_number;
352: hr_utility.set_location(' Leaving:'||l_proc, 90);
353: raise;
354: end UPDATE_DOCUMENT;
355: --
356: --
393: l_obj_version_number number(9);
394:
395:
396: begin
397: hr_utility.set_location('Entering:'|| l_proc, 10);
398: --
399: hr_utility.set_location('call function is_internet_applicant: '|| p_party_id || ' '|| l_proc, 115);
400: --
401: is_internet_applicant( p_document_id => p_document_id,
395:
396: begin
397: hr_utility.set_location('Entering:'|| l_proc, 10);
398: --
399: hr_utility.set_location('call function is_internet_applicant: '|| p_party_id || ' '|| l_proc, 115);
400: --
401: is_internet_applicant( p_document_id => p_document_id,
402: p_person_id => p_person_id ,
403: p_party_id => p_party_id ,
403: p_party_id => p_party_id ,
404: p_num_job_applications => l_job_appln);
405:
406: --
407: hr_utility.set_location('leave function is_internet_applicant: job applications: '|| to_char(l_job_appln), 116);
408: --
409: If ((l_job_appln > 0) and (p_type In ('RESUME','AUTO_RESUME')) ) Then
410: begin --begin For update when it Is an Internet Applicant
411:
504: (p_document_id => l_new_doc_id
505: );
506: --
507:
508: hr_utility.set_location('call create_document to create new record'||l_proc,117);
509: --
510: create_document
511: (p_validate => p_validate
512: ,p_effective_date => p_effective_date
519: ,p_end_date => p_end_date
520: ,p_document_id => l_doc_id
521: ,p_object_version_number => l_obj_version_number );
522: --
523: hr_utility.set_location('end call create_document to create new record'||l_proc,118);
524: --
525: -- When in validation only mode raise the Validate_Enabled exception
526: --
527: if p_validate then
531: -- Set all output arguments
532: --
533: p_object_version_number := l_obj_version_number;
534: p_new_doc_id := l_new_doc_id;
535: hr_utility.set_location(' Leaving:'||l_proc, 70);
536: --
537: exception
538: when hr_api.validate_enabled then
539: --
547: -- when validation only mode is being used.)
548: --
549: p_object_version_number := l_obj_version_number;
550: p_new_doc_id := l_new_doc_id;
551: hr_utility.set_location(' Leaving:'||l_proc, 80);
552: when others then
553: --
554: -- A validation or unexpected error has occured
555: --
556: rollback to UPDATE_DOCUMENT_TRACK;
557: --
558: p_object_version_number := l_obj_version_number;
559: p_new_doc_id := l_new_doc_id;
560: hr_utility.set_location(' Leaving:'||l_proc, 90);
561: raise;
562: end; --End For updating End Date And creating new Document record
563: --
564:
650: -- Set all output arguments
651: --
652: p_object_version_number := l_object_version_number;
653: p_new_doc_id := p_document_id;
654: hr_utility.set_location(' Leaving:'||l_proc, 70);
655: exception
656: when hr_api.validate_enabled then
657: --
658: -- As the Validate_Enabled exception has been raised
665: -- when validation only mode is being used.)
666: --
667: p_object_version_number := l_object_version_number;
668: p_new_doc_id := p_document_id;
669: hr_utility.set_location(' Leaving:'||l_proc, 80);
670: when others then
671: --
672: -- A validation or unexpected error has occured
673: --
674: rollback to UPDATE_DOCUMENT_TRACK;
675: --
676: p_object_version_number := l_object_version_number;
677: p_new_doc_id := p_document_id;
678: hr_utility.set_location(' Leaving:'||l_proc, 90);
679: raise;
680: end; --End 1
681: --
682:
716: --
717: l_doc_id number;
718: --
719: begin
720: hr_utility.set_location('Entering:'|| l_proc, 10);
721: --
722: --
723: -- Issue a savepoint
724: --
733: l_end_date := TRUNC(sysdate);
734: --
735: l_object_version_number := p_object_version_number;
736: --
737: hr_utility.set_location('call function is_internet_applicant: '|| p_party_id || ' '|| l_proc, 111);
738: --
739: is_internet_applicant( p_document_id => p_document_id,
740: p_person_id => p_person_id ,
741: p_party_id => p_party_id ,
742: p_num_job_applications => l_job_applications);
743:
744:
745: --
746: hr_utility.set_location('leave function is_internet_applicant: job applications: '|| to_char(l_job_applications), 112);
747: --
748:
749: --
750: --
776: --Call the Function is_internet_applicant which returns True If the above
777: --condition Is true
778: If ((p_purge = 'N') and (l_job_applications > 0) and (p_type In ('RESUME','AUTO_RESUME')) ) Then
779: begin
780: hr_utility.set_location('call update document: '||l_proc,113);
781: --call the update document rowhandler to update the end_date for the document
782: irc_ido_upd.upd
783: (p_effective_date => l_effective_date
784: ,p_type => p_type
827: if p_validate then
828: raise hr_api.validate_enabled;
829: end if;
830:
831: hr_utility.set_location(' Leaving:'||l_proc, 70);
832:
833: exception
834: when hr_api.validate_enabled then
835: --
836: -- As the Validate_Enabled exception has been raised
837: -- we must rollback to the savepoint
838: --
839: rollback to DELETE_DOCUMENT;
840: hr_utility.set_location(' Leaving:'||l_proc, 80);
841: when others then
842: --
843: -- A validation or unexpected error has occured
844: --
842: --
843: -- A validation or unexpected error has occured
844: --
845: rollback to DELETE_DOCUMENT;
846: hr_utility.set_location(' Leaving:'||l_proc, 90);
847: raise;
848:
849:
850: end DELETE_DOCUMENT;
878: --
879: l_ret varchar2(30);
880: begin
881: --
882: hr_utility.set_location(' Entering:'||l_proc, 10);
883: --
884: open csr_user;
885: fetch csr_user into l_hr_username;
886: close csr_user;
906: where document_id = p_document_id;
907: --
908: irc_ido_shd.g_api_dml := false; -- Unset the api dml status
909: --
910: hr_utility.set_location(l_proc||' - BLOB Conversion Complete', 20);
911: --
912: -- Synchronize interMedia index
913: hr_utility.set_location(l_proc||' - Synchronization Complete', 30);
914: --
909: --
910: hr_utility.set_location(l_proc||' - BLOB Conversion Complete', 20);
911: --
912: -- Synchronize interMedia index
913: hr_utility.set_location(l_proc||' - Synchronization Complete', 30);
914: --
915: else
916: close csr_doc_exists;
917: hr_utility.set_message(800, 'IRC_412046_IDO_INV_DOC_ID');
913: hr_utility.set_location(l_proc||' - Synchronization Complete', 30);
914: --
915: else
916: close csr_doc_exists;
917: hr_utility.set_message(800, 'IRC_412046_IDO_INV_DOC_ID');
918: hr_utility.raise_error;
919: end if;
920: end if; -- End if for l_hr_username is not null
921: hr_utility.set_location(' Leaving:'||l_proc, 40);
914: --
915: else
916: close csr_doc_exists;
917: hr_utility.set_message(800, 'IRC_412046_IDO_INV_DOC_ID');
918: hr_utility.raise_error;
919: end if;
920: end if; -- End if for l_hr_username is not null
921: hr_utility.set_location(' Leaving:'||l_proc, 40);
922: --
917: hr_utility.set_message(800, 'IRC_412046_IDO_INV_DOC_ID');
918: hr_utility.raise_error;
919: end if;
920: end if; -- End if for l_hr_username is not null
921: hr_utility.set_location(' Leaving:'||l_proc, 40);
922: --
923: exception
924: when others then
925: If csr_user%isopen
930: then
931: close csr_doc_exists;
932: End if;
933: if(fnd_log.test(fnd_log.level_error,'per.irc_document_api.process_document')) then
934: hr_utility.log_at_error_level('per'
935: ,'irc_document_api.process_document'
936: ,'unable to process'
937: ,dbms_utility.format_error_stack);
938: end if;
1051: close get_schema_name;
1052: end if;
1053: else
1054: close csr_doc_exists;
1055: hr_utility.set_message(800, 'IRC_412046_IDO_INV_DOC_ID');
1056: hr_utility.raise_error;
1057: end if;
1058:
1059: return l_output_clob;
1052: end if;
1053: else
1054: close csr_doc_exists;
1055: hr_utility.set_message(800, 'IRC_412046_IDO_INV_DOC_ID');
1056: hr_utility.raise_error;
1057: end if;
1058:
1059: return l_output_clob;
1060: exception
1059: return l_output_clob;
1060: exception
1061: when others then
1062: if(fnd_log.test(fnd_log.level_error,'per.irc_document_api.get_html_preview')) then
1063: hr_utility.log_at_error_level('per'
1064: ,'irc_document_api.get_html_preview'
1065: ,'unable to preview'
1066: ,dbms_utility.format_error_stack);
1067: end if;
1064: ,'irc_document_api.get_html_preview'
1065: ,'unable to preview'
1066: ,dbms_utility.format_error_stack);
1067: end if;
1068: hr_utility.log_at_error_level('per','get_html_preview','unable to preview'
1069: ,dbms_utility.format_error_stack);
1070: fnd_message.set_name('PER', 'IRC_UNABLE_TO_PREVIEW_DOC');
1071: fnd_msg_pub.add_detail
1072: (p_message_type => 'W'