DBA Data[Home] [Help]

APPS.WF_RULE dependencies on WF_EVENT

Line 6: ** column from the wf_event_subscriptions

2: /* $Header: wfruleb.pls 120.5.12020000.3 2012/08/10 14:20:14 skandepu ship $ */
3: --------------------------------------------------------------------------
4: /*
5: ** get_sub_parameters (PRIVATE) - retrieve the value of the PARAMETERS
6: ** column from the wf_event_subscriptions
7: ** table for the specified guid
8: */
9: FUNCTION get_sub_parameters(p_subscription_guid in raw) return varchar2
10: is

Line 14: from wf_event_subscriptions

10: is
11: parm varchar2(4000);
12: begin
13: select parameters into parm
14: from wf_event_subscriptions
15: where guid = p_subscription_guid;
16:
17: return parm;
18: exception

Line 28: p_event in out nocopy wf_event_t) return varchar2

24: /*
25: ** log -
26: */
27: FUNCTION log(p_subscription_guid in raw,
28: p_event in out nocopy wf_event_t) return varchar2
29: is
30: i number;
31: parmlist wf_parameter_list_t;
32: srctype varchar2(100);

Line 101: select source_type into srctype from wf_event_subscriptions

97: 'Event Name: '||p_event.getEventName());
98: wf_log_pkg.string(wf_log_pkg.level_statement, 'wf.plsql.wf_rule.log.event_key',
99: 'Event Key: '||p_event.getEventKey());
100:
101: select source_type into srctype from wf_event_subscriptions
102: where guid = p_subscription_guid;
103:
104: -- Need to check if clob is temporary instead of null
105: IsTmp := dbms_lob.istemporary(p_event.GetEventData());

Line 142: wf_core.context('Wf_Event', 'Log', p_event.getEventName(), p_subscription_guid);

138: exception
139: when others then
140: wf_log_pkg.string(wf_log_pkg.level_error, 'wf.plsql.wf_rule.log.end',
141: 'Error in wf_rule.log rule function');
142: wf_core.context('Wf_Event', 'Log', p_event.getEventName(), p_subscription_guid);
143: wf_event.setErrorInfo(p_event, 'ERROR');
144: return 'ERROR';
145: end;
146: ---------------------------------------------------------------------------

Line 143: wf_event.setErrorInfo(p_event, 'ERROR');

139: when others then
140: wf_log_pkg.string(wf_log_pkg.level_error, 'wf.plsql.wf_rule.log.end',
141: 'Error in wf_rule.log rule function');
142: wf_core.context('Wf_Event', 'Log', p_event.getEventName(), p_subscription_guid);
143: wf_event.setErrorInfo(p_event, 'ERROR');
144: return 'ERROR';
145: end;
146: ---------------------------------------------------------------------------
147: /*

Line 151: p_event in out nocopy wf_event_t) return varchar2

147: /*
148: ** error -
149: */
150: FUNCTION error(p_subscription_guid in raw,
151: p_event in out nocopy wf_event_t) return varchar2
152: is
153: msg varchar2(4000);
154: l_parameters varchar2(4000);
155: begin

Line 157: msg := WF_EVENT_FUNCTIONS_PKG.SUBSCRIPTIONPARAMETERS(l_parameters, 'ERROR_MESSAGE');

153: msg varchar2(4000);
154: l_parameters varchar2(4000);
155: begin
156: l_parameters := upper(wf_rule.get_sub_parameters(p_subscription_guid));
157: msg := WF_EVENT_FUNCTIONS_PKG.SUBSCRIPTIONPARAMETERS(l_parameters, 'ERROR_MESSAGE');
158: wf_event.setErrorInfo(p_event, 'ERROR');
159: p_event.setErrorMessage(wf_core.substitute('WFERR', msg));
160:
161: return 'ERROR';

Line 158: wf_event.setErrorInfo(p_event, 'ERROR');

154: l_parameters varchar2(4000);
155: begin
156: l_parameters := upper(wf_rule.get_sub_parameters(p_subscription_guid));
157: msg := WF_EVENT_FUNCTIONS_PKG.SUBSCRIPTIONPARAMETERS(l_parameters, 'ERROR_MESSAGE');
158: wf_event.setErrorInfo(p_event, 'ERROR');
159: p_event.setErrorMessage(wf_core.substitute('WFERR', msg));
160:
161: return 'ERROR';
162: end;

Line 168: p_event in out nocopy wf_event_t) return varchar2

164: /*
165: ** warning -
166: */
167: FUNCTION warning(p_subscription_guid in raw,
168: p_event in out nocopy wf_event_t) return varchar2
169: is
170: msg varchar2(4000);
171: l_parameters varchar2(4000);
172: begin

Line 174: msg := WF_EVENT_FUNCTIONS_PKG.SUBSCRIPTIONPARAMETERS(l_parameters, 'ERROR_MESSAGE');

170: msg varchar2(4000);
171: l_parameters varchar2(4000);
172: begin
173: l_parameters := upper(wf_rule.get_sub_parameters(p_subscription_guid));
174: msg := WF_EVENT_FUNCTIONS_PKG.SUBSCRIPTIONPARAMETERS(l_parameters, 'ERROR_MESSAGE');
175: wf_event.setErrorInfo(p_event, 'WARNING');
176: p_event.setErrorMessage(wf_core.substitute('WFERR', msg));
177:
178: return 'WARNING';

Line 175: wf_event.setErrorInfo(p_event, 'WARNING');

171: l_parameters varchar2(4000);
172: begin
173: l_parameters := upper(wf_rule.get_sub_parameters(p_subscription_guid));
174: msg := WF_EVENT_FUNCTIONS_PKG.SUBSCRIPTIONPARAMETERS(l_parameters, 'ERROR_MESSAGE');
175: wf_event.setErrorInfo(p_event, 'WARNING');
176: p_event.setErrorMessage(wf_core.substitute('WFERR', msg));
177:
178: return 'WARNING';
179: end;

Line 185: p_event in out nocopy wf_event_t) return varchar2

181: /*
182: ** success -
183: */
184: FUNCTION success(p_subscription_guid in raw,
185: p_event in out nocopy wf_event_t) return varchar2
186: is
187: begin
188: return 'SUCCESS';
189: end;

Line 195: p_event in out nocopy wf_event_t) return varchar2

191: /*
192: ** default_rule -
193: */
194: FUNCTION default_rule(p_subscription_guid in raw,
195: p_event in out nocopy wf_event_t) return varchar2
196: is
197: out_guid raw(16);
198: to_guid raw(16);
199: wftype varchar2(30);

Line 217: from wf_event_subscriptions

213: begin
214: select out_agent_guid,to_agent_guid,wf_process_type,wf_process_name,priority
215: , parameters
216: into out_guid, to_guid, wftype, wfname, pri, subparams
217: from wf_event_subscriptions
218: where guid = p_subscription_guid;
219:
220: -- Check if need to generate Unique Correlation Id
221: if subparams is not null then

Line 222: if (wf_event_functions_pkg.subscriptionparameters(p_string=>subparams

218: where guid = p_subscription_guid;
219:
220: -- Check if need to generate Unique Correlation Id
221: if subparams is not null then
222: if (wf_event_functions_pkg.subscriptionparameters(p_string=>subparams
223: ,p_key=>'CORRELATION_ID') = 'UNIQUE') then
224: select wf_error_processes_s.nextval
225: into lcorrid
226: from dual;

Line 243: wf_event.AddParameterToList('SUB_GUID', p_subscription_guid,lparamlist);

239: 'Calling wf_engine.event()');
240: end if;
241:
242: lparamlist := p_event.Parameter_List;
243: wf_event.AddParameterToList('SUB_GUID', p_subscription_guid,lparamlist);
244: p_event.Parameter_List := lparamlist;
245: --p_event.addParameterToList('SUB_GUID', p_subscription_guid);
246:
247: if (wftype = 'WFERROR') then

Line 272: p_event.From_Agent := wf_event.newAgent(out_guid);

268: 'wf.plsql.WF_RULE.default_rule.route',
269: 'Routing...');
270: end if;
271:
272: p_event.From_Agent := wf_event.newAgent(out_guid);
273: p_event.To_Agent := wf_event.newAgent(to_guid);
274: p_event.Priority := pri;
275: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
276:

Line 273: p_event.To_Agent := wf_event.newAgent(to_guid);

269: 'Routing...');
270: end if;
271:
272: p_event.From_Agent := wf_event.newAgent(out_guid);
273: p_event.To_Agent := wf_event.newAgent(to_guid);
274: p_event.Priority := pri;
275: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
276:
277: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),

Line 277: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),

273: p_event.To_Agent := wf_event.newAgent(to_guid);
274: p_event.Priority := pri;
275: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
276:
277: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),
278: -- pri, nvl(p_event.getSendDate(),sysdate));
279:
280: wf_event.send(p_event);
281: end if;

Line 280: wf_event.send(p_event);

276:
277: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),
278: -- pri, nvl(p_event.getSendDate(),sysdate));
279:
280: wf_event.send(p_event);
281: end if;
282:
283: -- Debug --
284: if (wf_log_pkg.wf_debug_flag = TRUE) then

Line 302: wf_event.setErrorInfo(p_event, 'ERROR');

298:
299: when others then
300: wf_core.context('Wf_Rule', 'Default_Rule', p_event.getEventName(),
301: p_subscription_guid);
302: wf_event.setErrorInfo(p_event, 'ERROR');
303: return 'ERROR';
304: end;
305:
306: ---------------------------------------------------------------------------

Line 312: p_event in out nocopy wf_event_t)

308: ** default_rule2 - Executes default_rule only if the subscription contains
309: ** parameters that are in the event parameter list.
310: */
311: FUNCTION default_rule2(p_subscription_guid in raw,
312: p_event in out nocopy wf_event_t)
313: return varchar2 is
314: begin
315: if (WF_EVENT_FUNCTIONS_PKG.SubParamInEvent(p_subscription_guid, p_event)) then
316: return (default_rule(p_subscription_guid, p_event));

Line 315: if (WF_EVENT_FUNCTIONS_PKG.SubParamInEvent(p_subscription_guid, p_event)) then

311: FUNCTION default_rule2(p_subscription_guid in raw,
312: p_event in out nocopy wf_event_t)
313: return varchar2 is
314: begin
315: if (WF_EVENT_FUNCTIONS_PKG.SubParamInEvent(p_subscription_guid, p_event)) then
316: return (default_rule(p_subscription_guid, p_event));
317:
318: else
319: return 'SUCCESS';

Line 330: p_event in out nocopy wf_event_t) return varchar2

326: /*
327: ** workflow_protocol -
328: */
329: FUNCTION workflow_protocol(p_subscription_guid in raw,
330: p_event in out nocopy wf_event_t) return varchar2
331: is
332: wftype varchar2(30);
333: wfname varchar2(30);
334: param varchar2(4000);

Line 344: from wf_event_subscriptions

340: begin
341:
342: select wf_process_type,wf_process_name,priority,parameters
343: into wftype, wfname, pri, param
344: from wf_event_subscriptions
345: where guid = p_subscription_guid;
346:
347: -- Workflow --
348: if (wftype is not null) then

Line 368: ackreq := wf_event_functions_pkg.subscriptionparameters

364: sndack := 'N';
365: end if;
366:
367: -- Does the new message require acknowledgement
368: ackreq := wf_event_functions_pkg.subscriptionparameters
369: (param, 'ACKREQ');
370:
371: p_event.addParameterToList('ACKREQ', nvl(ackreq,'N'));
372: p_event.addParameterToList('SNDACK', nvl(sndack,'N'));

Line 398: wf_event.setErrorInfo(p_event, 'ERROR');

394: exception
395: when others then
396: wf_core.context('Wf_Rule', 'Workflow_Protocol', p_event.getEventName(),
397: p_subscription_guid);
398: wf_event.setErrorInfo(p_event, 'ERROR');
399: return 'ERROR';
400: end;
401: ---------------------------------------------------------------------------
402: /*

Line 406: p_event in out nocopy wf_event_t) return varchar2

402: /*
403: ** error_rule -
404: */
405: FUNCTION error_rule(p_subscription_guid in raw,
406: p_event in out nocopy wf_event_t) return varchar2
407: is
408: out_guid raw(16);
409: to_guid raw(16);
410: wftype varchar2(30);

Line 418: from wf_event_subscriptions

414: ikey varchar2(240);
415: begin
416: select out_agent_guid,to_agent_guid,wf_process_type,wf_process_name,priority
417: into out_guid, to_guid, wftype, wfname, pri
418: from wf_event_subscriptions
419: where guid = p_subscription_guid;
420:
421: -- Workflow --
422: if (wftype is not null) then

Line 453: p_event.From_Agent := wf_event.newAgent(out_guid);

449: wf_log_pkg.string(wf_log_pkg.level_statement,
450: 'wf.plsql.WF_RULE.error_rule.route',
451: 'Routing...');
452: end if;
453: p_event.From_Agent := wf_event.newAgent(out_guid);
454: p_event.To_Agent := wf_event.newAgent(to_guid);
455: p_event.Priority := pri;
456: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
457:

Line 454: p_event.To_Agent := wf_event.newAgent(to_guid);

450: 'wf.plsql.WF_RULE.error_rule.route',
451: 'Routing...');
452: end if;
453: p_event.From_Agent := wf_event.newAgent(out_guid);
454: p_event.To_Agent := wf_event.newAgent(to_guid);
455: p_event.Priority := pri;
456: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
457:
458: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),

Line 458: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),

454: p_event.To_Agent := wf_event.newAgent(to_guid);
455: p_event.Priority := pri;
456: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
457:
458: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),
459: -- pri, nvl(p_event.getSendDate(),sysdate));
460:
461: wf_event.send(p_event);
462: end if;

Line 461: wf_event.send(p_event);

457:
458: --p_event.Address(wf_event.newAgent(out_guid), wf_event.newAgent(to_guid),
459: -- pri, nvl(p_event.getSendDate(),sysdate));
460:
461: wf_event.send(p_event);
462: end if;
463:
464:
465: -- Debug --

Line 487: p_event in out nocopy wf_event_t) return varchar2

483: ** setParametersIntoParameterList -
484: **
485: */
486: FUNCTION setParametersIntoParameterList(p_subscription_guid in raw,
487: p_event in out nocopy wf_event_t) return varchar2
488: is
489: l_parameters varchar2(4000);
490: l_start integer := 0;
491: l_end integer := 0;

Line 500: FROM wf_event_subscriptions

496: l_equalpos number;
497:
498: CURSOR c_parameters IS
499: SELECT parameters
500: FROM wf_event_subscriptions
501: WHERE guid = p_subscription_guid;
502:
503: begin
504:

Line 589: wf_event.setErrorInfo(p_event, 'ERROR');

585: exception
586: when others then
587: wf_core.context('Wf_Rule', 'SetParametersIntoParameterList',
588: p_event.getEventName(),p_subscription_guid);
589: wf_event.setErrorInfo(p_event, 'ERROR');
590: return 'ERROR';
591: end;
592:
593: ---------------------------------------------------------------------------

Line 597: p_event in out nocopy wf_event_t)

593: ---------------------------------------------------------------------------
594: --Bug 2193561
595: --To provide better access to worklist by non-workflow products
596: FUNCTION SendNotification (p_subscription_guid in raw,
597: p_event in out nocopy wf_event_t)
598: return varchar2
599: is
600:
601: pos number := 1;

Line 688: wf_event.setErrorInfo(p_event, 'ERROR');

684: exception
685: when others then
686: wf_core.context('Wf_Notification', 'Send_Rule', p_event.getEventName(),
687: p_subscription_guid);
688: wf_event.setErrorInfo(p_event, 'ERROR');
689: return 'ERROR';
690: end;
691:
692: ---------------------------------------------------------------------

Line 704: p_event in out nocopy wf_event_t)

700: */
701:
702:
703: FUNCTION default_rule3(p_subscription_guid in raw,
704: p_event in out nocopy wf_event_t)
705: return varchar2 is
706: l_result varchar2(30);
707: l_event_paramlist wf_parameter_list_t;
708: l_result_str varchar2(10);

Line 729: p_event in out nocopy wf_event_t)

725: named #BUSINESS_KEY which has the specified value.
726: */
727:
728: FUNCTION instance_default_rule(p_subscription_guid in raw,
729: p_event in out nocopy wf_event_t)
730: return varchar2
731: is
732: out_guid raw(16);
733: to_guid raw(16);

Line 752: from wf_event_subscriptions

748:
749: select out_agent_guid,to_agent_guid,wf_process_type,wf_process_name,priority
750: , parameters
751: into out_guid, to_guid, wftype, wfname, pri, subparams
752: from wf_event_subscriptions
753: where guid = p_subscription_guid;
754:
755: l_result := setParametersIntoParameterList(p_subscription_guid,p_event);
756:

Line 768: p_event.From_Agent := wf_event.newAgent(out_guid);

764: wf_log_pkg.string(wf_log_pkg.level_statement,
765: 'wf.plsql.WF_RULE.instance_default_rule.route',
766: 'Routing...');
767: end if;
768: p_event.From_Agent := wf_event.newAgent(out_guid);
769: p_event.To_Agent := wf_event.newAgent(to_guid);
770: p_event.Priority := pri;
771: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
772:

Line 769: p_event.To_Agent := wf_event.newAgent(to_guid);

765: 'wf.plsql.WF_RULE.instance_default_rule.route',
766: 'Routing...');
767: end if;
768: p_event.From_Agent := wf_event.newAgent(out_guid);
769: p_event.To_Agent := wf_event.newAgent(to_guid);
770: p_event.Priority := pri;
771: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
772:
773: wf_event.send(p_event);

Line 773: wf_event.send(p_event);

769: p_event.To_Agent := wf_event.newAgent(to_guid);
770: p_event.Priority := pri;
771: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
772:
773: wf_event.send(p_event);
774: end if;
775:
776: -- Debug --
777: if (wf_log_pkg.wf_debug_flag = TRUE) then

Line 793: wf_event.setErrorInfo(p_event, 'ERROR');

789: raise;
790: when others then
791: wf_core.context('Wf_Rule', 'Instance_Default_Rule', p_event.getEventName(),
792: p_subscription_guid);
793: wf_event.setErrorInfo(p_event, 'ERROR');
794: return 'ERROR';
795: end;
796:
797: /*

Line 802: p_event in out nocopy wf_event_t)

798: ** default_rule_or - Executes default_rule only if the subscription contains
799: ** a parameter that is in the event parameter list.
800: */
801: FUNCTION default_rule_or(p_subscription_guid in raw,
802: p_event in out nocopy wf_event_t)
803: return varchar2 is
804: begin
805:
806: if (WF_EVENT_FUNCTIONS_PKG.SubParamInEvent(p_subscription_guid, p_event,'ANY')) then

Line 806: if (WF_EVENT_FUNCTIONS_PKG.SubParamInEvent(p_subscription_guid, p_event,'ANY')) then

802: p_event in out nocopy wf_event_t)
803: return varchar2 is
804: begin
805:
806: if (WF_EVENT_FUNCTIONS_PKG.SubParamInEvent(p_subscription_guid, p_event,'ANY')) then
807: return (default_rule(p_subscription_guid, p_event));
808:
809:
810: else