80: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Entered '||G_PKG_NAME||'.'||l_api_name);
81: end if;
82:
83: If(funcmode = 'RUN') Then
84: l_sms_users := wf_engine.GetItemAttrText( itemtype =>itemtype,
85: itemkey =>itemkey,
86: aname =>'SMS_USERS');
87:
88: l_email_users := wf_engine.GetItemAttrText( itemtype =>itemtype,
84: l_sms_users := wf_engine.GetItemAttrText( itemtype =>itemtype,
85: itemkey =>itemkey,
86: aname =>'SMS_USERS');
87:
88: l_email_users := wf_engine.GetItemAttrText( itemtype =>itemtype,
89: itemkey =>itemkey,
90: aname =>'EMAIL_USERS');
91:
92: if(l_debug_procedure >= l_debug_runtime) then
125: wf_core.raise('WF_ORA');
126: END;
127:
128: --/*
129: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
130: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
131: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
132: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_SMS'); --Hardcoded
133: --*/
126: END;
127:
128: --/*
129: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
130: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
131: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
132: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_SMS'); --Hardcoded
133: --*/
134: /*
127:
128: --/*
129: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
130: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
131: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
132: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_SMS'); --Hardcoded
133: --*/
134: /*
135: --Set all the attributes for the "Message Delivery Process"
128: --/*
129: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
130: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
131: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
132: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_SMS'); --Hardcoded
133: --*/
134: /*
135: --Set all the attributes for the "Message Delivery Process"
136: if(l_debug_procedure >= l_debug_runtime) then
133: --*/
134: /*
135: --Set all the attributes for the "Message Delivery Process"
136: if(l_debug_procedure >= l_debug_runtime) then
137: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ALERT_DELIVERY');
138: end if;
139: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => itemkey, process => 'ALERT_DELIVERY');
140:
141:
135: --Set all the attributes for the "Message Delivery Process"
136: if(l_debug_procedure >= l_debug_runtime) then
137: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.CreateProcess ALERT_DELIVERY');
138: end if;
139: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => itemkey, process => 'ALERT_DELIVERY');
140:
141:
142:
143: l_event_entity := wf_engine.GetItemAttrText( itemtype =>itemtype,
139: wf_engine.CreateProcess( itemtype => 'ASPALERT', itemkey => itemkey, process => 'ALERT_DELIVERY');
140:
141:
142:
143: l_event_entity := wf_engine.GetItemAttrText( itemtype =>itemtype,
144: itemkey =>itemkey,
145: aname =>'ALERT_SOURCE_OBJECT_CODE');
146:
147: l_alert_code := wf_engine.GetItemAttrText( itemtype =>itemtype,
143: l_event_entity := wf_engine.GetItemAttrText( itemtype =>itemtype,
144: itemkey =>itemkey,
145: aname =>'ALERT_SOURCE_OBJECT_CODE');
146:
147: l_alert_code := wf_engine.GetItemAttrText( itemtype =>itemtype,
148: itemkey =>itemkey,
149: aname =>'ALERT_NAME');
150:
151: l_incident_id := wf_engine.GetItemAttrText( itemtype =>itemtype,
147: l_alert_code := wf_engine.GetItemAttrText( itemtype =>itemtype,
148: itemkey =>itemkey,
149: aname =>'ALERT_NAME');
150:
151: l_incident_id := wf_engine.GetItemAttrText( itemtype =>itemtype,
152: itemkey =>itemkey,
153: aname =>'ALERT_SOURCE_OBJECT_ID');
154:
155: begin
152: itemkey =>itemkey,
153: aname =>'ALERT_SOURCE_OBJECT_ID');
154:
155: begin
156: l_task_id := wf_engine.GetItemAttrText( itemtype =>itemtype,
157: itemkey =>itemkey,
158: aname =>'ALERT_SOURCE_TASK_ID');
159: exception
160: when others then
159: exception
160: when others then
161: l_task_id := -1;
162: end;
163: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_NAME', l_alert_code);
164: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_CODE', l_event_entity);
165: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_ID', l_incident_id);
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
160: when others then
161: l_task_id := -1;
162: end;
163: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_NAME', l_alert_code);
164: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_CODE', l_event_entity);
165: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_ID', l_incident_id);
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
161: l_task_id := -1;
162: end;
163: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_NAME', l_alert_code);
164: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_CODE', l_event_entity);
165: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_ID', l_incident_id);
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
169: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
162: end;
163: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_NAME', l_alert_code);
164: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_CODE', l_event_entity);
165: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_ID', l_incident_id);
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
169: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
170: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
164: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_CODE', l_event_entity);
165: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_ID', l_incident_id);
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
169: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
170: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
171: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_EMAIL');
172:
165: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_OBJECT_ID', l_incident_id);
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
169: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
170: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
171: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_EMAIL');
172:
173:
166: wf_engine.SetItemAttrText('ASPALERT', itemkey, 'ALERT_SOURCE_TASK_ID', l_task_id);
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
169: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
170: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
171: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_EMAIL');
172:
173:
174: if(l_debug_procedure >= l_debug_runtime) then
167:
168: wf_engine.SetItemAttrText(itemtype, itemkey, 'NOTIF_FROM_ROLE', 'SYSADMIN');
169: wf_engine.SetItemAttrText(itemtype, itemkey, 'SMS_SEND_TO', l_sms_adhocrole);
170: wf_engine.SetItemAttrText(itemtype, itemkey, 'EMAIL_SEND_TO', l_email_adhocrole);
171: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_EMAIL');
172:
173:
174: if(l_debug_procedure >= l_debug_runtime) then
175: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.StartProcess ALERT_DELIVERY');
171: wf_engine.SetItemAttrText(itemtype, itemkey, 'DELIVERY_CHANNEL', 'CHANNEL_EMAIL');
172:
173:
174: if(l_debug_procedure >= l_debug_runtime) then
175: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.StartProcess ALERT_DELIVERY');
176: end if;
177: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => itemkey);
178: if(l_debug_procedure >= l_debug_runtime) then
179: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.StartProcess ALERT_DELIVERY');
173:
174: if(l_debug_procedure >= l_debug_runtime) then
175: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.StartProcess ALERT_DELIVERY');
176: end if;
177: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => itemkey);
178: if(l_debug_procedure >= l_debug_runtime) then
179: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.StartProcess ALERT_DELIVERY');
180: end if;
181: */
175: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'Before wf_engine.StartProcess ALERT_DELIVERY');
176: end if;
177: wf_engine.StartProcess(itemtype => 'ASPALERT', itemkey => itemkey);
178: if(l_debug_procedure >= l_debug_runtime) then
179: fnd_log.string(l_debug_procedure, G_MODULE||l_api_name, 'After wf_engine.StartProcess ALERT_DELIVERY');
180: end if;
181: */
182:
183: