756: -- log is additionally written out via FND_FILE,
757: -- for visibility from view SRS window.
758: fnd_file.put_line(which => fnd_file.output,
759: buff => 'REQ'||p_message);
760: /*hr_utility.trace_on('F','REQID');
761: hr_utility.trace('FRED');
762: hr_utility.trace_off;
763: */
764: end if;
757: -- for visibility from view SRS window.
758: fnd_file.put_line(which => fnd_file.output,
759: buff => 'REQ'||p_message);
760: /*hr_utility.trace_on('F','REQID');
761: hr_utility.trace('FRED');
762: hr_utility.trace_off;
763: */
764: end if;
765: END log_message;
758: fnd_file.put_line(which => fnd_file.output,
759: buff => 'REQ'||p_message);
760: /*hr_utility.trace_on('F','REQID');
761: hr_utility.trace('FRED');
762: hr_utility.trace_off;
763: */
764: end if;
765: END log_message;
766:
799: l_proc VARCHAR2(35) default '.email_suitable_vacs_to_seekers';
800:
801:
802: BEGIN
803: hr_utility.set_location('Entering'||l_proc, 10);
804:
805: -- If the base URL isn't set up, it is futile performing a job search
806: -- as the URL for the seekers to click on won't work.
807: --
806: -- as the URL for the seekers to click on won't work.
807: --
808: l_base_url := fnd_profile.value('IRC_JOB_NOTIFICATION_URL');
809: IF l_base_url IS NULL THEN
810: hr_utility.set_location('base_url is null', 20);
811: fnd_message.set_name('PER','IRC_412056_NO_EMAIL_JOB_URL');
812: RAISE e_no_base_url;
813: END IF;
814:
1025: -- Clear the table as now we need to build up a new record for
1026: -- a different (or the first) job seeker
1027: --
1028: begin
1029: hr_utility.set_location('person_id:'
1030: ||seeker_rec.person_id, 20);
1031: l_posting_details_tab.delete;
1032: l_counter := 0;
1033: --dbms_output.put_line('Processing Person:'||seeker_rec.person_id);
1285: --
1286: l_posting_details_tab(l_counter)
1287: := seeker_criteria_match_vac_rec;
1288: --
1289: hr_utility.set_location('vacancy_id:'
1290: ||seeker_criteria_match_vac_rec.object_id, 30);
1291:
1292: --dbms_output.put_line(' Person:'||seeker_criteria_rec.object_id||' FOR VAC:'||seeker_criteria_match_vac_rec.object_id||'>'||seeker_criteria_match_vac_rec.name);
1293: END LOOP;
1298: -- Send an e-mail to the job seeker with suitable jobs
1299: -- ************************************************************
1300: IF l_posting_details_tab.count > 0 THEN
1301: -- Send the notification if any suitable vacancies have been found
1302: hr_utility.set_location('sending notification:',50);
1303: --dbms_output.put_line(' Person:'||seeker_rec.person_id||' Has Matches');
1304: --
1305: l_id :=
1306: irc_notification_helper_pkg.send_notification
1314: , p_person_id => seeker_rec.person_id )
1315: );
1316: END IF;
1317: --
1318: hr_utility.set_location('Location:'||l_proc,60);
1319: exception
1320: when others then
1321: -- Catch the exception so that an error doens't cause total failure.
1322: hr_utility.set_location('Problem sending notification to person:'||seeker_rec.person_id,60);
1318: hr_utility.set_location('Location:'||l_proc,60);
1319: exception
1320: when others then
1321: -- Catch the exception so that an error doens't cause total failure.
1322: hr_utility.set_location('Problem sending notification to person:'||seeker_rec.person_id,60);
1323: end;
1324: END LOOP;
1325: DBMS_SQL.CLOSE_CURSOR (c => l_cursor);--All done, so clean up!
1326:
1324: END LOOP;
1325: DBMS_SQL.CLOSE_CURSOR (c => l_cursor);--All done, so clean up!
1326:
1327: --
1328: hr_utility.set_location('Leaving'||l_proc, 80);
1329: EXCEPTION
1330: WHEN others THEN
1331: ERRBUF := SQLERRM||' '||fnd_message.get;
1332: RETCODE := 2;
1372: l_internal_site irc_all_recruiting_sites.internal%type;
1373: l_external_site irc_all_recruiting_sites.external%type;
1374: l_proc VARCHAR2(30) default ' get_suitable_seekers_for_vac';
1375: BEGIN
1376: hr_utility.set_location('Entering'||l_proc, 10);
1377: --
1378: l_matching_flex := fnd_profile.value('IRC_SEARCH_CRITERIA_SM');
1379: --
1380: if (p_candidacy_age>0) then
1567:
1568:
1569: l_base_url := fnd_profile.value('IRC_SUITABLE_SEEKERS_URL');
1570: IF l_base_url IS NULL THEN
1571: hr_utility.set_location(l_proc, 20);
1572: fnd_message.set_name('PER','IRC_412064_NO_EMAIL_VAC_URL');
1573: RAISE e_no_base_url;
1574: END IF;
1575: --
1578: -- ************************************************************--
1579: FOR available_vacancy IN csr_vacancies_needing_seekers
1580: LOOP
1581: begin
1582: hr_utility.set_location('search_criteria_id:'
1583: ||available_vacancy.search_criteria_id, 20);
1584: --
1585: log_message ('Vacancy :'
1586: ||available_vacancy.name
1599: l_counter := 0;
1600: -- ************************************************************ --
1601: -- Get a list of all the suitable seekers for the vacancy --
1602: -- ************************************************************ --
1603: hr_utility.set_location('keywords not null', 30);
1604: -- define the posting_content_id column
1605:
1606: -- define the name column
1607: DBMS_SQL.DEFINE_COLUMN (
1779: position => 2,
1780: value => seeker_details_rec.person_id);
1781:
1782: log_message ('..person_id:'||seeker_details_rec.person_id);
1783: hr_utility.set_location
1784: (' loop: seeker_details_rec.person_id='
1785: || seeker_details_rec.person_id, 35);
1786: --
1787: l_counter := l_counter + 1;
1798: log_message ('.suitable seekers :'
1799: ||l_seeker_details_tab.count);
1800: IF l_seeker_details_tab.count > 0 THEN
1801: -- Send the notification if any suitable candidates have been found
1802: hr_utility.set_location('stuff to send ', 50);
1803: --
1804: l_message_subject := null;
1805:
1806: fnd_message.set_name('PER','IRC_EMAIL_RECRUITER_SUBJECT');
1841: --
1842: IF ( l_index > 0 ) THEN
1843: -- Maybe have an out parameter that handles these, or put them into
1844: -- the ERRBUF for concurrent processes.
1845: hr_utility.set_location('No recruiter_id ',59);
1846: fnd_message.set_name ('PER','IRC_412070_VACS_NO_OWNERS');
1847: log_message(fnd_message.get);
1848: for i in l_recruiter_problem_tab.first .. l_recruiter_problem_tab.last loop
1849: log_message(l_recruiter_problem_tab(i).vacancy_name);
1846: fnd_message.set_name ('PER','IRC_412070_VACS_NO_OWNERS');
1847: log_message(fnd_message.get);
1848: for i in l_recruiter_problem_tab.first .. l_recruiter_problem_tab.last loop
1849: log_message(l_recruiter_problem_tab(i).vacancy_name);
1850: hr_utility.set_location('Exception ('||i||')', 60);
1851: hr_utility.set_location(' > vacancy_id:' || l_recruiter_problem_tab(i).vacancy_id, 62);
1852: end loop;
1853: END IF;
1854: hr_utility.set_location('Leaving'||l_proc, 80);
1847: log_message(fnd_message.get);
1848: for i in l_recruiter_problem_tab.first .. l_recruiter_problem_tab.last loop
1849: log_message(l_recruiter_problem_tab(i).vacancy_name);
1850: hr_utility.set_location('Exception ('||i||')', 60);
1851: hr_utility.set_location(' > vacancy_id:' || l_recruiter_problem_tab(i).vacancy_id, 62);
1852: end loop;
1853: END IF;
1854: hr_utility.set_location('Leaving'||l_proc, 80);
1855: EXCEPTION
1850: hr_utility.set_location('Exception ('||i||')', 60);
1851: hr_utility.set_location(' > vacancy_id:' || l_recruiter_problem_tab(i).vacancy_id, 62);
1852: end loop;
1853: END IF;
1854: hr_utility.set_location('Leaving'||l_proc, 80);
1855: EXCEPTION
1856: WHEN others THEN
1857: ERRBUF := SQLERRM||' '||fnd_message.get;
1858: RETCODE := 2;
1875: l_general_body_html VARCHAR2(32000);
1876: l_general_body_text VARCHAR2(32000);
1877: l_proc VARCHAR2(30) default '.email_general_notifications';
1878: BEGIN
1879: hr_utility.set_location('Entering'||l_proc, 10);
1880: -- Loop through all the job seekers and send them
1881: -- a general notification.
1882: FOR parties_wanting_it IN csr_seekers_for_notes LOOP
1883: --
1905: );
1906: exception
1907: when others then
1908: -- Catch the exception so that an error doens't cause total failure.
1909: hr_utility.set_location('Problem sending notification to person:'||parties_wanting_it.person_id,60);
1910: end;
1911: END LOOP;
1912: hr_utility.set_location('Leaving'||l_proc, 80);
1913: END email_general_notifications;
1908: -- Catch the exception so that an error doens't cause total failure.
1909: hr_utility.set_location('Problem sending notification to person:'||parties_wanting_it.person_id,60);
1910: end;
1911: END LOOP;
1912: hr_utility.set_location('Leaving'||l_proc, 80);
1913: END email_general_notifications;
1914:
1915: --
1916: END irc_seeker_vac_matching_pkg;