133: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'system assigned num of days '||to_char(p_number_of_days));
134: end if;
135: end if;
136:
137: save_threshold := wf_engine.threshold;
138: l_PROGRAM_START_DATE := sysdate;
139: l_REQUEST_ID := TO_NUMBER(fnd_profile.value('CONC_REQUEST_ID'));
140: l_PROGRAM_APPLICATION_ID := FND_GLOBAL.PROG_APPL_ID;
141: l_PROGRAM_ID := TO_NUMBER(fnd_profile.value('CONC_PROGRAM_ID'));
188: if(nvl(l_renewal_type,'X') <> 'EVN') then
189: SELECT l_contract_id ||'-'|| to_char(asp_wf_alerts_s.nextval) INTO l_item_key FROM DUAL;
190: if(l_debug_procedure >= l_debug_runtime) then
191: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
192: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ASP_ALERT_PROCESS');
193: end if;
194: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
195: wf_engine.threshold := -1;
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
191: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
192: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ASP_ALERT_PROCESS');
193: end if;
194: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
195: wf_engine.threshold := -1;
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
197: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
198: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
192: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ASP_ALERT_PROCESS');
193: end if;
194: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
195: wf_engine.threshold := -1;
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
197: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
198: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
200: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
193: end if;
194: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
195: wf_engine.threshold := -1;
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
197: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
198: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
200: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
201: if(l_debug_procedure >= l_debug_runtime) then
194: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
195: wf_engine.threshold := -1;
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
197: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
198: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
200: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
201: if(l_debug_procedure >= l_debug_runtime) then
202: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
195: wf_engine.threshold := -1;
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
197: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
198: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
200: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
201: if(l_debug_procedure >= l_debug_runtime) then
202: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
203: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.CreateProcess ASP_ALERT_PROCESS');
196: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
197: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
198: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
200: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
201: if(l_debug_procedure >= l_debug_runtime) then
202: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
203: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.CreateProcess ASP_ALERT_PROCESS');
204: end if;
199: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
200: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
201: if(l_debug_procedure >= l_debug_runtime) then
202: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
203: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.CreateProcess ASP_ALERT_PROCESS');
204: end if;
205: commit;
206: end if;
207: end loop;
287: if(nvl(l_renewal_type,'X') <> 'EVN') then
288: SELECT l_contract_id ||'-'|| to_char(asp_wf_alerts_s.nextval) INTO l_item_key FROM DUAL;
289: if(l_debug_procedure >= l_debug_runtime) then
290: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
291: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ASP_ALERT_PROCESS');
292: end if;
293:
294: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
295: wf_engine.threshold := -1;
291: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ASP_ALERT_PROCESS');
292: end if;
293:
294: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
295: wf_engine.threshold := -1;
296: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
297: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
298: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
292: end if;
293:
294: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
295: wf_engine.threshold := -1;
296: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
297: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
298: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
300: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
293:
294: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
295: wf_engine.threshold := -1;
296: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
297: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
298: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
300: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
301: if(l_debug_procedure >= l_debug_runtime) then
294: -- Start the ASP Alert Manager Process (ASP_ALERT_PROCESS) with the following info:
295: wf_engine.threshold := -1;
296: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
297: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
298: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
300: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
301: if(l_debug_procedure >= l_debug_runtime) then
302: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
295: wf_engine.threshold := -1;
296: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
297: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
298: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
300: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
301: if(l_debug_procedure >= l_debug_runtime) then
302: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
303: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.CreateProcess ASP_ALERT_PROCESS');
296: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => l_item_key, process => 'ASP_ALERT_PROCESS',user_key=>l_item_key);
297: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_NAME', 'SVCCONTRACT_PRE_EXPIRE_ALERT');
298: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_CODE', 'SERVICE_CONTRACT');
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
300: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
301: if(l_debug_procedure >= l_debug_runtime) then
302: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
303: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.CreateProcess ASP_ALERT_PROCESS');
304: end if;
299: wf_engine.SetItemAttrText('ASPALERT', l_item_key, 'ALERT_SOURCE_OBJECT_ID', l_contract_id);
300: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => l_item_key);
301: if(l_debug_procedure >= l_debug_runtime) then
302: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'l_item_key '||l_item_key);
303: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.CreateProcess ASP_ALERT_PROCESS');
304: end if;
305:
306: commit;
307: end if;
316: where program_object_code = 'ASPEXPSC' --'SERVICE_CONTRACT'
317: and status_code = 'S';
318: commit;
319: END IF;
320: wf_engine.threshold := save_threshold;
321:
322: EXCEPTION
323: WHEN others THEN
324: wf_engine.threshold := save_threshold;
320: wf_engine.threshold := save_threshold;
321:
322: EXCEPTION
323: WHEN others THEN
324: wf_engine.threshold := save_threshold;
325: raise;
326:
327: END Alert_Expiring_SvcContracts;
328: