[Home] [Help]
1: PACKAGE BODY Igr_in_jtf_interactions_pkg AS
2: /* $Header: IGSRT05B.pls 120.0 2005/06/01 18:13:24 appldev noship $ */
3:
4: PROCEDURE get_profile_values IS
5: /* This procedure populates all the profile variables in either parameters
12:
13: CURSOR c_resource_id is
14: SELECT resource_id
15: FROM jtf_rs_resource_extns
16: WHERE user_id = Igr_in_jtf_interactions_pkg.g_user_id;
17:
18: l_outcome VARCHAR2(100);
19: l_result VARCHAR2(100);
20: l_reason VARCHAR2(100);
49:
50:
51: fnd_profile.get('IGR_JTF_DEFAULT_RESOURCE', l_tmp_resource_id);
52: -- Default resource ID for Interactions and Activities in Academic Recruiting
53: Igr_in_jtf_interactions_pkg.g_resource_id := IGS_GE_NUMBER.TO_NUM(l_tmp_resource_id);
54: Igr_in_jtf_interactions_pkg.g_login_id := IGS_GE_NUMBER.TO_NUM(l_tmp_login_id);
55: Igr_in_jtf_interactions_pkg.g_resp_appl_id := fnd_global.resp_appl_id;
56: Igr_in_jtf_interactions_pkg.g_resp_id := fnd_global.resp_id;
57: Igr_in_jtf_interactions_pkg.g_user_id := fnd_global.user_id;
50:
51: fnd_profile.get('IGR_JTF_DEFAULT_RESOURCE', l_tmp_resource_id);
52: -- Default resource ID for Interactions and Activities in Academic Recruiting
53: Igr_in_jtf_interactions_pkg.g_resource_id := IGS_GE_NUMBER.TO_NUM(l_tmp_resource_id);
54: Igr_in_jtf_interactions_pkg.g_login_id := IGS_GE_NUMBER.TO_NUM(l_tmp_login_id);
55: Igr_in_jtf_interactions_pkg.g_resp_appl_id := fnd_global.resp_appl_id;
56: Igr_in_jtf_interactions_pkg.g_resp_id := fnd_global.resp_id;
57: Igr_in_jtf_interactions_pkg.g_user_id := fnd_global.user_id;
58:
51: fnd_profile.get('IGR_JTF_DEFAULT_RESOURCE', l_tmp_resource_id);
52: -- Default resource ID for Interactions and Activities in Academic Recruiting
53: Igr_in_jtf_interactions_pkg.g_resource_id := IGS_GE_NUMBER.TO_NUM(l_tmp_resource_id);
54: Igr_in_jtf_interactions_pkg.g_login_id := IGS_GE_NUMBER.TO_NUM(l_tmp_login_id);
55: Igr_in_jtf_interactions_pkg.g_resp_appl_id := fnd_global.resp_appl_id;
56: Igr_in_jtf_interactions_pkg.g_resp_id := fnd_global.resp_id;
57: Igr_in_jtf_interactions_pkg.g_user_id := fnd_global.user_id;
58:
59: OPEN default_outcome;
52: -- Default resource ID for Interactions and Activities in Academic Recruiting
53: Igr_in_jtf_interactions_pkg.g_resource_id := IGS_GE_NUMBER.TO_NUM(l_tmp_resource_id);
54: Igr_in_jtf_interactions_pkg.g_login_id := IGS_GE_NUMBER.TO_NUM(l_tmp_login_id);
55: Igr_in_jtf_interactions_pkg.g_resp_appl_id := fnd_global.resp_appl_id;
56: Igr_in_jtf_interactions_pkg.g_resp_id := fnd_global.resp_id;
57: Igr_in_jtf_interactions_pkg.g_user_id := fnd_global.user_id;
58:
59: OPEN default_outcome;
60: FETCH default_outcome INTO Igr_in_jtf_interactions_pkg.g_def_outcome_id, Igr_in_jtf_interactions_pkg.g_def_outcome;
53: Igr_in_jtf_interactions_pkg.g_resource_id := IGS_GE_NUMBER.TO_NUM(l_tmp_resource_id);
54: Igr_in_jtf_interactions_pkg.g_login_id := IGS_GE_NUMBER.TO_NUM(l_tmp_login_id);
55: Igr_in_jtf_interactions_pkg.g_resp_appl_id := fnd_global.resp_appl_id;
56: Igr_in_jtf_interactions_pkg.g_resp_id := fnd_global.resp_id;
57: Igr_in_jtf_interactions_pkg.g_user_id := fnd_global.user_id;
58:
59: OPEN default_outcome;
60: FETCH default_outcome INTO Igr_in_jtf_interactions_pkg.g_def_outcome_id, Igr_in_jtf_interactions_pkg.g_def_outcome;
61: CLOSE default_outcome;
56: Igr_in_jtf_interactions_pkg.g_resp_id := fnd_global.resp_id;
57: Igr_in_jtf_interactions_pkg.g_user_id := fnd_global.user_id;
58:
59: OPEN default_outcome;
60: FETCH default_outcome INTO Igr_in_jtf_interactions_pkg.g_def_outcome_id, Igr_in_jtf_interactions_pkg.g_def_outcome;
61: CLOSE default_outcome;
62:
63: OPEN default_result;
64: FETCH default_result INTO Igr_in_jtf_interactions_pkg.g_def_result_id, Igr_in_jtf_interactions_pkg.g_def_result;
60: FETCH default_outcome INTO Igr_in_jtf_interactions_pkg.g_def_outcome_id, Igr_in_jtf_interactions_pkg.g_def_outcome;
61: CLOSE default_outcome;
62:
63: OPEN default_result;
64: FETCH default_result INTO Igr_in_jtf_interactions_pkg.g_def_result_id, Igr_in_jtf_interactions_pkg.g_def_result;
65: CLOSE default_result;
66:
67: OPEN default_reason;
68: FETCH default_reason INTO Igr_in_jtf_interactions_pkg.g_def_reason_id, Igr_in_jtf_interactions_pkg.g_def_reason;
64: FETCH default_result INTO Igr_in_jtf_interactions_pkg.g_def_result_id, Igr_in_jtf_interactions_pkg.g_def_result;
65: CLOSE default_result;
66:
67: OPEN default_reason;
68: FETCH default_reason INTO Igr_in_jtf_interactions_pkg.g_def_reason_id, Igr_in_jtf_interactions_pkg.g_def_reason;
69: CLOSE default_reason;
70:
71: END get_profile_values;
72:
89: BEGIN
90:
91: l_interaction_rec.party_id := p_person_id;
92: -- Populate all the profile variables
93: Igr_in_jtf_interactions_pkg.get_profile_values;
94:
95: -- Get the application id and pass that in handler_id
96: l_interaction_rec.handler_id := Igr_in_jtf_interactions_pkg.g_resp_appl_id;
97: l_interaction_rec.resource_id := Igr_in_jtf_interactions_pkg.g_resource_id;
92: -- Populate all the profile variables
93: Igr_in_jtf_interactions_pkg.get_profile_values;
94:
95: -- Get the application id and pass that in handler_id
96: l_interaction_rec.handler_id := Igr_in_jtf_interactions_pkg.g_resp_appl_id;
97: l_interaction_rec.resource_id := Igr_in_jtf_interactions_pkg.g_resource_id;
98: l_interaction_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
99: l_interaction_rec.start_date_time := SYSDATE;
100: l_interaction_rec.duration := 0;
93: Igr_in_jtf_interactions_pkg.get_profile_values;
94:
95: -- Get the application id and pass that in handler_id
96: l_interaction_rec.handler_id := Igr_in_jtf_interactions_pkg.g_resp_appl_id;
97: l_interaction_rec.resource_id := Igr_in_jtf_interactions_pkg.g_resource_id;
98: l_interaction_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
99: l_interaction_rec.start_date_time := SYSDATE;
100: l_interaction_rec.duration := 0;
101:
94:
95: -- Get the application id and pass that in handler_id
96: l_interaction_rec.handler_id := Igr_in_jtf_interactions_pkg.g_resp_appl_id;
97: l_interaction_rec.resource_id := Igr_in_jtf_interactions_pkg.g_resource_id;
98: l_interaction_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
99: l_interaction_rec.start_date_time := SYSDATE;
100: l_interaction_rec.duration := 0;
101:
102: JTF_IH_PUB.OPEN_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
98: l_interaction_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
99: l_interaction_rec.start_date_time := SYSDATE;
100: l_interaction_rec.duration := 0;
101:
102: JTF_IH_PUB.OPEN_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
103: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
99: l_interaction_rec.start_date_time := SYSDATE;
100: l_interaction_rec.duration := 0;
101:
102: JTF_IH_PUB.OPEN_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
103: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
107: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
100: l_interaction_rec.duration := 0;
101:
102: JTF_IH_PUB.OPEN_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
103: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
107: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
108: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
101:
102: JTF_IH_PUB.OPEN_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
103: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
107: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
108: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
109: x_return_status => p_ret_status,
102: JTF_IH_PUB.OPEN_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
103: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
107: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
108: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
109: x_return_status => p_ret_status,
110: x_msg_count => p_msg_count,
103: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
107: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
108: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
109: x_return_status => p_ret_status,
110: x_msg_count => p_msg_count,
111: x_msg_data => p_msg_data,
104: p_commit => Igr_in_jtf_interactions_pkg.g_false,
105: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
106: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
107: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
108: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
109: x_return_status => p_ret_status,
110: x_msg_count => p_msg_count,
111: x_msg_data => p_msg_data,
112: p_interaction_rec => l_interaction_rec,
155: BEGIN
156: OPEN c_person_number(p_person_id);
157: FETCH c_person_number into person_number_rec;
158: CLOSE c_person_number;
159: Igr_in_jtf_interactions_pkg.start_interaction(
160: p_person_id => p_person_id,
161: p_ret_status => p_ret_status,
162: p_msg_data => p_msg_data,
163: p_msg_count => p_msg_count,
169: END LOOP;
170: p_msg_data := trim(p_msg_data);
171: END IF;
172: ELSE
173: Igr_in_jtf_interactions_pkg.add_activity(
174: p_action => p_action,
175: p_action_id => p_action_id,
176: p_action_item => p_action_item,
177: p_action_item_id => p_action_item_id,
189: END LOOP;
190: p_msg_data := trim(p_msg_data);
191: END IF;
192: ELSE
193: Igr_in_jtf_interactions_pkg.end_interaction(
194: p_ret_status => p_ret_status,
195: p_msg_data => p_msg_data,
196: p_msg_count => p_msg_count);
197:
237:
238: BEGIN
239:
240: l_activity_rec.interaction_id := p_int_id;
241: l_activity_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
242: l_activity_rec.result_id := Igr_in_jtf_interactions_pkg.g_def_result_id;
243: l_activity_rec.reason_id := Igr_in_jtf_interactions_pkg.g_def_reason_id;
244: -- Get the action_id and action_item_id from jtf_ih_actions_vl and jtf_ih_Action_items_vl
245: IF p_action_id IS NULL THEN
238: BEGIN
239:
240: l_activity_rec.interaction_id := p_int_id;
241: l_activity_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
242: l_activity_rec.result_id := Igr_in_jtf_interactions_pkg.g_def_result_id;
243: l_activity_rec.reason_id := Igr_in_jtf_interactions_pkg.g_def_reason_id;
244: -- Get the action_id and action_item_id from jtf_ih_actions_vl and jtf_ih_Action_items_vl
245: IF p_action_id IS NULL THEN
246: OPEN activity_action;
239:
240: l_activity_rec.interaction_id := p_int_id;
241: l_activity_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
242: l_activity_rec.result_id := Igr_in_jtf_interactions_pkg.g_def_result_id;
243: l_activity_rec.reason_id := Igr_in_jtf_interactions_pkg.g_def_reason_id;
244: -- Get the action_id and action_item_id from jtf_ih_actions_vl and jtf_ih_Action_items_vl
245: IF p_action_id IS NULL THEN
246: OPEN activity_action;
247: FETCH activity_action into l_activity_rec.action_id;
273: IF p_cust_account_id IS NOT NULL THEN
274: l_activity_rec.cust_account_id := p_cust_account_id;
275: END IF;
276:
277: JTF_IH_PUB.add_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
278: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
274: l_activity_rec.cust_account_id := p_cust_account_id;
275: END IF;
276:
277: JTF_IH_PUB.add_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
278: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
282: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
275: END IF;
276:
277: JTF_IH_PUB.add_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
278: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
282: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
283: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
276:
277: JTF_IH_PUB.add_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
278: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
282: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
283: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
284: x_return_status => p_ret_status,
277: JTF_IH_PUB.add_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
278: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
282: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
283: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
284: x_return_status => p_ret_status,
285: x_msg_count => p_msg_count,
278: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
282: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
283: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
284: x_return_status => p_ret_status,
285: x_msg_count => p_msg_count,
286: x_msg_data => p_msg_data,
279: p_commit => Igr_in_jtf_interactions_pkg.g_false,
280: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
281: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
282: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
283: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
284: x_return_status => p_ret_status,
285: x_msg_count => p_msg_count,
286: x_msg_data => p_msg_data,
287: p_activity_rec => l_activity_rec,
321: l_msg_index_out NUMBER;
322:
323: BEGIN
324:
325: IF Igr_in_jtf_interactions_pkg.g_int_id is null THEN
326: -- Activity cannot be updated since there is no active interaction
327: FND_MESSAGE.SET_NAME('IGS','IGS_GE_UNHANDLED_EXCEPTION');
328: IGS_GE_MSG_STACK.ADD;
329: APP_EXCEPTION.RAISE_EXCEPTION;
327: FND_MESSAGE.SET_NAME('IGS','IGS_GE_UNHANDLED_EXCEPTION');
328: IGS_GE_MSG_STACK.ADD;
329: APP_EXCEPTION.RAISE_EXCEPTION;
330: ELSE
331: l_activity_rec.interaction_id := Igr_in_jtf_interactions_pkg.g_int_id;
332: l_activity_rec.activity_id := p_activity_id;
333: l_activity_rec.action_id := p_action_id;
334: l_activity_rec.action_item_id := p_action_item_id;
335: l_activity_rec.end_date_time := SYSDATE;
337: l_activity_rec.outcome_id := p_outcome_id;
338: l_activity_rec.result_id := p_result_id;
339: l_activity_rec.reason_id := p_reason_id;
340:
341: JTF_IH_PUB.update_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
342: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
338: l_activity_rec.result_id := p_result_id;
339: l_activity_rec.reason_id := p_reason_id;
340:
341: JTF_IH_PUB.update_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
342: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
346: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
339: l_activity_rec.reason_id := p_reason_id;
340:
341: JTF_IH_PUB.update_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
342: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
346: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
347: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
340:
341: JTF_IH_PUB.update_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
342: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
346: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
347: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
348: x_return_status => l_return_status,
341: JTF_IH_PUB.update_activity(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
342: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
346: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
347: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
348: x_return_status => l_return_status,
349: x_msg_count => l_msg_count,
342: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
346: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
347: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
348: x_return_status => l_return_status,
349: x_msg_count => l_msg_count,
350: x_msg_data => l_msg_data,
343: p_commit => Igr_in_jtf_interactions_pkg.g_false,
344: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
345: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
346: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
347: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
348: x_return_status => l_return_status,
349: x_msg_count => l_msg_count,
350: x_msg_data => l_msg_data,
351: p_activity_rec => l_activity_rec);
377:
378: CURSOR int_active IS
379: SELECT active, outcome_id, reason_id, result_id
380: FROM jtf_ih_interactions
381: WHERE interaction_id = Igr_in_jtf_interactions_pkg.g_int_id;
382:
383: BEGIN
384:
385: IF Igr_in_jtf_interactions_pkg.g_int_id IS NOT NULL THEN
381: WHERE interaction_id = Igr_in_jtf_interactions_pkg.g_int_id;
382:
383: BEGIN
384:
385: IF Igr_in_jtf_interactions_pkg.g_int_id IS NOT NULL THEN
386: OPEN int_active;
387: FETCH int_active INTO l_active, l_outcome_id, l_reason_id, l_result_id;
388: CLOSE int_active;
389:
392: IF l_active = 'Y' THEN
393: IF (l_outcome_id IS NOT NULL) and (l_outcome_id <> fnd_api.g_miss_num) THEN
394: l_interaction_rec.outcome_id := l_outcome_id;
395: ELSE
396: l_interaction_rec.outcome_id := Igr_in_jtf_interactions_pkg.g_def_outcome_id;
397: END IF;
398: IF (l_result_id IS NOT NULL) and (l_result_id <> fnd_api.g_miss_num) THEN
399: l_interaction_rec.result_id := l_result_id;
400: ELSE
397: END IF;
398: IF (l_result_id IS NOT NULL) and (l_result_id <> fnd_api.g_miss_num) THEN
399: l_interaction_rec.result_id := l_result_id;
400: ELSE
401: l_interaction_rec.result_id := Igr_in_jtf_interactions_pkg.g_def_result_id;
402: END IF;
403: IF (l_reason_id IS NOT NULL) and (l_reason_id <> fnd_api.g_miss_num) THEN
404: l_interaction_rec.reason_id := l_reason_id;
405: ELSE
402: END IF;
403: IF (l_reason_id IS NOT NULL) and (l_reason_id <> fnd_api.g_miss_num) THEN
404: l_interaction_rec.reason_id := l_reason_id;
405: ELSE
406: l_interaction_rec.reason_id := Igr_in_jtf_interactions_pkg.g_def_reason_id;
407: END IF;
408:
409: l_interaction_rec.interaction_id := Igr_in_jtf_interactions_pkg.g_int_id;
410: l_interaction_rec.end_date_time := SYSDATE;
405: ELSE
406: l_interaction_rec.reason_id := Igr_in_jtf_interactions_pkg.g_def_reason_id;
407: END IF;
408:
409: l_interaction_rec.interaction_id := Igr_in_jtf_interactions_pkg.g_int_id;
410: l_interaction_rec.end_date_time := SYSDATE;
411:
412: JTF_IH_PUB.CLOSE_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
408:
409: l_interaction_rec.interaction_id := Igr_in_jtf_interactions_pkg.g_int_id;
410: l_interaction_rec.end_date_time := SYSDATE;
411:
412: JTF_IH_PUB.CLOSE_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
409: l_interaction_rec.interaction_id := Igr_in_jtf_interactions_pkg.g_int_id;
410: l_interaction_rec.end_date_time := SYSDATE;
411:
412: JTF_IH_PUB.CLOSE_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
417: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
410: l_interaction_rec.end_date_time := SYSDATE;
411:
412: JTF_IH_PUB.CLOSE_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
417: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
418: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
411:
412: JTF_IH_PUB.CLOSE_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
417: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
418: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
419: x_return_status => l_return_status,
412: JTF_IH_PUB.CLOSE_INTERACTION(p_api_version => Igr_in_jtf_interactions_pkg.g_api_version,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
417: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
418: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
419: x_return_status => l_return_status,
420: x_msg_count => l_msg_count,
413: p_init_msg_list => Igr_in_jtf_interactions_pkg.g_true,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
417: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
418: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
419: x_return_status => l_return_status,
420: x_msg_count => l_msg_count,
421: x_msg_data => l_msg_data,
414: p_commit => Igr_in_jtf_interactions_pkg.g_false,
415: p_resp_appl_id => Igr_in_jtf_interactions_pkg.g_resp_appl_id,
416: p_resp_id => Igr_in_jtf_interactions_pkg.g_resp_id,
417: p_user_id => Igr_in_jtf_interactions_pkg.g_user_id,
418: p_login_id => Igr_in_jtf_interactions_pkg.g_login_id,
419: x_return_status => l_return_status,
420: x_msg_count => l_msg_count,
421: x_msg_data => l_msg_data,
422: p_interaction_rec=> l_interaction_rec);
420: x_msg_count => l_msg_count,
421: x_msg_data => l_msg_data,
422: p_interaction_rec=> l_interaction_rec);
423:
424: IF l_return_status <> Igr_in_jtf_interactions_pkg.g_ret_sts_success THEN
425: -- Activity cannot be updated since there is no active interaction
426: FND_MESSAGE.SET_NAME('IGS','IGS_AD_JTF_CLS_INT_FLD');
427: IGS_GE_MSG_STACK.ADD;
428: APP_EXCEPTION.RAISE_EXCEPTION;
429: END IF;
430: END IF;
431:
432: -- Clear the variable value
433: Igr_in_jtf_interactions_pkg.g_int_id := NULL;
434:
435: END IF;
436:
437: EXCEPTION
440: IGS_GE_MSG_STACK.ADD;
441: APP_EXCEPTION.RAISE_EXCEPTION;
442: END end_interaction;
443:
444: END Igr_in_jtf_interactions_pkg;