/***API to update the interview status from PLANNED to CONFIRMED*****/
CREATE OR REPLACE PACKAGE BODY APPS.xx_irc_interview_update_pkg
IS
PROCEDURE xx_irc_int_update_proc (Ntf_id VARCHAR2)
IS
l_inteerview_id NUMBER;
l_feedback VARCHAR2 (300);
l_notes VARCHAR2 (300);
l_notes_to_candidate VARCHAR2 (300);
l_category VARCHAR2 (100);
l_result VARCHAR2 (100);
l_event_id NUMBER;
l_start_date DATE;
l_end_date DATE;
l_object_version_number irc_interview_details.object_version_number%TYPE;
l_int_date DATE;
l_appl_name VARCHAR2(100);
l_applicant VARCHAR2(100);
l_assignment_id NUMBER;
l_int_type VARCHAR2(30);
CURSOR c1(p_event_id varchar2)
IS
SELECT *
FROM irc_interview_details
WHERE event_id = p_event_id AND status = 'PLANNED'
and sysdate between start_date and end_date ;
BEGIN
BEGIN
select text_value INTO l_event_id from wf_notification_attributes
where name ='XX_INT_EVENT_ID' and notification_id =Ntf_id;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Event Does not Exists');
END;
BEGIN
l_object_version_number := '';
SELECT object_version_number
INTO l_object_version_number
FROM irc_interview_details
WHERE event_id = l_event_id AND status = 'PLANNED';
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Object version number Does not Exists');
END;
FOR c2 IN c1(l_event_id)
LOOP
irc_interview_details_api.update_irc_interview_details
(p_validate => FALSE,
p_interview_details_id => c2.interview_details_id,
p_status => 'CONFIRMED',
p_feedback => c2.feedback,
p_notes => c2.notes,
p_notes_to_candidate => c2.notes_to_candidate,
p_category => c2.CATEGORY,
p_result => c2.RESULT,
p_iid_information_category => c2.iid_information_category,
p_iid_information1 => c2.iid_information1,
p_iid_information2 => c2.iid_information2,
p_iid_information3 => c2.iid_information3,
p_iid_information4 => c2.iid_information4,
p_iid_information5 => c2.iid_information5,
p_iid_information6 => c2.iid_information6,
p_iid_information7 => c2.iid_information7,
p_iid_information8 => c2.iid_information8,
p_iid_information9 => c2.iid_information9,
p_iid_information10 => c2.iid_information10,
p_iid_information11 => c2.iid_information11,
p_iid_information12 => c2.iid_information12,
p_iid_information13 => c2.iid_information13,
p_iid_information14 => c2.iid_information14,
p_iid_information15 => c2.iid_information15,
p_iid_information16 => c2.iid_information16,
p_iid_information17 => c2.iid_information17,
p_iid_information18 => c2.iid_information18,
p_iid_information19 => c2.iid_information19,
p_iid_information20 => c2.iid_information20,
p_event_id => c2.event_id,
p_object_version_number => l_object_version_number,
p_start_date => l_start_date,
p_end_date => l_end_date
);
DBMS_OUTPUT.put_line ('objectversion' || l_object_version_number);
END LOOP;
END xx_irc_int_update_proc;
FUNCTION xx_get_message_type (ntf_id NUMBER)
RETURN VARCHAR2
IS
l_message_type VARCHAR2 (50);
BEGIN
BEGIN
SELECT message_type
INTO l_message_type
FROM wf_notifications
WHERE notification_id = ntf_id;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Notification Does not Exists');
END;
RETURN l_message_type;
END xx_get_message_type;
END xx_irc_interview_update_pkg;
/
CREATE OR REPLACE PACKAGE BODY APPS.xx_irc_interview_update_pkg
IS
PROCEDURE xx_irc_int_update_proc (Ntf_id VARCHAR2)
IS
l_inteerview_id NUMBER;
l_feedback VARCHAR2 (300);
l_notes VARCHAR2 (300);
l_notes_to_candidate VARCHAR2 (300);
l_category VARCHAR2 (100);
l_result VARCHAR2 (100);
l_event_id NUMBER;
l_start_date DATE;
l_end_date DATE;
l_object_version_number irc_interview_details.object_version_number%TYPE;
l_int_date DATE;
l_appl_name VARCHAR2(100);
l_applicant VARCHAR2(100);
l_assignment_id NUMBER;
l_int_type VARCHAR2(30);
CURSOR c1(p_event_id varchar2)
IS
SELECT *
FROM irc_interview_details
WHERE event_id = p_event_id AND status = 'PLANNED'
and sysdate between start_date and end_date ;
BEGIN
BEGIN
select text_value INTO l_event_id from wf_notification_attributes
where name ='XX_INT_EVENT_ID' and notification_id =Ntf_id;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Event Does not Exists');
END;
BEGIN
l_object_version_number := '';
SELECT object_version_number
INTO l_object_version_number
FROM irc_interview_details
WHERE event_id = l_event_id AND status = 'PLANNED';
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Object version number Does not Exists');
END;
FOR c2 IN c1(l_event_id)
LOOP
irc_interview_details_api.update_irc_interview_details
(p_validate => FALSE,
p_interview_details_id => c2.interview_details_id,
p_status => 'CONFIRMED',
p_feedback => c2.feedback,
p_notes => c2.notes,
p_notes_to_candidate => c2.notes_to_candidate,
p_category => c2.CATEGORY,
p_result => c2.RESULT,
p_iid_information_category => c2.iid_information_category,
p_iid_information1 => c2.iid_information1,
p_iid_information2 => c2.iid_information2,
p_iid_information3 => c2.iid_information3,
p_iid_information4 => c2.iid_information4,
p_iid_information5 => c2.iid_information5,
p_iid_information6 => c2.iid_information6,
p_iid_information7 => c2.iid_information7,
p_iid_information8 => c2.iid_information8,
p_iid_information9 => c2.iid_information9,
p_iid_information10 => c2.iid_information10,
p_iid_information11 => c2.iid_information11,
p_iid_information12 => c2.iid_information12,
p_iid_information13 => c2.iid_information13,
p_iid_information14 => c2.iid_information14,
p_iid_information15 => c2.iid_information15,
p_iid_information16 => c2.iid_information16,
p_iid_information17 => c2.iid_information17,
p_iid_information18 => c2.iid_information18,
p_iid_information19 => c2.iid_information19,
p_iid_information20 => c2.iid_information20,
p_event_id => c2.event_id,
p_object_version_number => l_object_version_number,
p_start_date => l_start_date,
p_end_date => l_end_date
);
DBMS_OUTPUT.put_line ('objectversion' || l_object_version_number);
END LOOP;
END xx_irc_int_update_proc;
FUNCTION xx_get_message_type (ntf_id NUMBER)
RETURN VARCHAR2
IS
l_message_type VARCHAR2 (50);
BEGIN
BEGIN
SELECT message_type
INTO l_message_type
FROM wf_notifications
WHERE notification_id = ntf_id;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Notification Does not Exists');
END;
RETURN l_message_type;
END xx_get_message_type;
END xx_irc_interview_update_pkg;
/
No comments:
Post a Comment