DBA Data[Home] [Help]

APPS.ECX_RULE dependencies on WF_EVENT

Line 16: p_event in out nocopy wf_event_t

12: saved_fnd_runtime_debug pls_integer;
13:
14: function outbound_rule(
15: p_subscription_guid in raw,
16: p_event in out nocopy wf_event_t
17: ) return varchar2
18: is
19: transaction_type varchar2(240);
20: transaction_subtype varchar2(240);

Line 36: from wf_event_subscriptions

32: l_module varchar2(2000);
33:
34: cursor c_debug_level
35: is select parameters
36: from wf_event_subscriptions
37: where guid = p_subscription_guid;
38:
39:
40: begin

Line 84: i_debug_level := wf_event_functions_pkg.subscriptionparameters(debug_level, 'ECX_DEBUG_LEVEL');

80: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
81: 'Debug Level ' || debug_level);
82: end if;
83:
84: i_debug_level := wf_event_functions_pkg.subscriptionparameters(debug_level, 'ECX_DEBUG_LEVEL');
85:
86: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
87: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
88: 'Debug Level from subscription' || i_debug_level);

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

107: --Return status of Default rule
108: if (resultout) then
109: return(wf_rule.default_rule(p_subscription_guid,p_event));
110: else
111: wf_event.setErrorInfo(p_event,'WARNING');
112: -- MLS
113: p_event.setErrorMessage(retcode||':'||ecx_debug.getMessage(errmsg,
114: ecx_utils.i_errparams));
115: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then

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

157: Wf_Core.Context('ECX_RULE', 'OUTBOUND_RULE', p_event.getEventName(), p_subscription_guid);
158: if(ecx_exception_type = 'ecx_no_party_setup') OR
159: (ecx_exception_type = 'ecx_delivery_setup_error') OR
160: (ecx_exception_type = 'program_exit') then
161: wf_event.setErrorInfo(p_event,'WARNING');
162: return 'WARNING';
163: end if;
164: wf_event.setErrorInfo(p_event,'ERROR');
165: if (wf_log_pkg.level_unexpected >= fnd_log.g_current_runtime_level) then

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

160: (ecx_exception_type = 'program_exit') then
161: wf_event.setErrorInfo(p_event,'WARNING');
162: return 'WARNING';
163: end if;
164: wf_event.setErrorInfo(p_event,'ERROR');
165: if (wf_log_pkg.level_unexpected >= fnd_log.g_current_runtime_level) then
166: wf_log_pkg.string(wf_log_pkg.level_unexpected, l_module,
167: 'ERRMSG ' || errmsg);
168: wf_log_pkg.string(wf_log_pkg.level_unexpected, l_module,

Line 186: p_event in out nocopy wf_event_t

182: -- Standard inbound_rule function
183:
184: function inbound_rule(
185: p_subscription_guid in raw,
186: p_event in out nocopy wf_event_t
187: ) return varchar2
188: is
189:
190: l_transaction_type varchar2(240);

Line 301: from wf_event_subscriptions

297: begin
298: -- Get Params
299: select parameters
300: into r_myparams
301: from wf_event_subscriptions
302: where guid = p_subscription_guid;
303: exception
304: when others then
305: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then

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

308: end if;
309: ecx_debug.setErrorInfo(1,30,'ECX_PARAM_SELECT_ERROR',
310: 'p_guid',
311: p_subscription_guid);
312: wf_event.setErrorInfo(p_event,'ERROR');
313: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
314: ecx_utils.i_errparams));
315: p_event.event_key := v_msgid;
316: p_event.AddParameterToList('ECX_RETURN_CODE', ecx_utils.i_ret_code);

Line 333: r_dbg := wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_DEBUG_LEVEL');

329: begin
330: -- Get debug level, and default if not found
331: if r_myparams is not null
332: then
333: r_dbg := wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_DEBUG_LEVEL');
334: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
335: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
336: 'ECX_DEBUG_LEVEL:'||r_dbg||'XX');
337: end if;

Line 358: r_transaction_type := wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_TRANSACTION_TYPE');

354: begin
355: -- Get TRANSACTION_TYPE
356: if r_myparams is not null
357: then
358: r_transaction_type := wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_TRANSACTION_TYPE');
359: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
360: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
361: 'ECX_TRANSACTION_TYPE:'||r_transaction_type);
362: end if;

Line 377: wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_TRANSACTION_SUBTYPE');

373: -- Get TRANSACTION_SUBTYPE
374: if r_myparams is not null
375: then
376: r_transaction_subtype :=
377: wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_TRANSACTION_SUBTYPE');
378: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
379: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
380: 'ECX_TRANSACTION_SUBTYPE:'||r_transaction_subtype);
381: end if;

Line 394: r_party_site_id := wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_PARTY_SITE_ID');

390:
391: begin
392: -- Get PARTY_SITE_ID
393: if r_myparams is not null then
394: r_party_site_id := wf_event_functions_pkg.subscriptionparameters(r_myparams,'ECX_PARTY_SITE_ID');
395: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
396: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
397: 'ECX_PARTY_SITE_ID:'||r_party_site_id);
398: end if;

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

498: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
499: wf_log_pkg.string(wf_log_pkg.level_error, l_module,
500: 'Error enqueuing to processing engine');
501: end if;
502: wf_event.setErrorInfo(p_event,'ERROR');
503: --p_event.setErrorMessage('Error enqueuing to processing engine: ' || i_queue_name);
504: -- MLS
505: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
506: ecx_utils.i_errparams));

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

525: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
526: wf_log_pkg.string(wf_log_pkg.level_error, l_module,
527: 'Queue name not found');
528: end if;
529: wf_event.setErrorInfo(p_event,'ERROR');
530: -- MLS
531: --p_event.setErrorMessage('Unable to determine processing engine queue.');
532: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
533: ecx_utils.i_errparams));

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

556: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
557: wf_log_pkg.string(wf_log_pkg.level_error, l_module,
558: 'More than one row resulted while querying the queue name.');
559: end if;
560: wf_event.setErrorInfo(p_event,'ERROR');
561: -- MLS
562: --p_event.setErrorMessage('More than one row resulted while querying the Queue Name.');
563: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
564: ecx_utils.i_errparams));

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

599: ' SubType:'||l_transaction_subtype||
600: ' Location Code'||l_party_site_id||
601: ' is not enabled in the XML Gateway Server. Pls check your Setup');
602: end if;
603: wf_event.setErrorInfo(p_event,'ERROR');
604: -- MLS
605: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
606: ecx_utils.i_errparams));
607: p_event.event_key := v_msgid;

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

626: if (wf_log_pkg.level_unexpected >= fnd_log.g_current_runtime_level) then
627: wf_log_pkg.string(wf_log_pkg.level_unexpected, l_module,
628: 'Error in processing inbound rule.');
629: end if;
630: wf_event.setErrorInfo(p_event,'ERROR');
631: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
632: ecx_utils.i_errparams));
633: p_event.event_key := v_msgid;
634: p_event.AddParameterToList('ECX_RETURN_CODE', ecx_utils.i_ret_code);

Line 654: p_event in out nocopy wf_event_t) return varchar2 is

650: --
651: -- Another inbound_rule function
652:
653: function inbound_rule2 (p_subscription_guid in raw,
654: p_event in out nocopy wf_event_t) return varchar2 is
655:
656: myparams varchar2(4000);
657: dbg pls_integer;
658: mapcode Varchar2(240);

Line 671: from wf_event_subscriptions

667: begin
668: -- Get Params
669: select parameters
670: into myparams
671: from wf_event_subscriptions
672: where guid = p_subscription_guid;
673: exception
674: when others then
675: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then

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

675: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
676: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
677: 'Error in selecting parameters.');
678: end if;
679: wf_event.setErrorInfo(p_event,'ERROR');
680: return 'ERROR';
681: end;
682:
683: begin

Line 685: dbg := wf_event_functions_pkg.

681: end;
682:
683: begin
684: -- Get debug level, and default if not found
685: dbg := wf_event_functions_pkg.
686: subscriptionparameters(myparams,'ECX_DEBUG_LEVEL');
687:
688: if dbg is null then
689: dbg := 0;

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

693: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
694: wf_log_pkg.string(wf_log_pkg.level_error, l_module,
695: 'Error in getting ECX_DEBUG_LEVEL.');
696: end if;
697: wf_event.setErrorInfo(p_event,'ERROR');
698: return 'ERROR';
699: end;
700:
701: begin

Line 703: mapcode := wf_event_functions_pkg.

699: end;
700:
701: begin
702: -- get map code
703: mapcode := wf_event_functions_pkg.
704: subscriptionparameters(myparams,'ECX_MAP_CODE');
705: exception
706: when others then
707: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then

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

707: if (wf_log_pkg.level_error >= fnd_log.g_current_runtime_level) then
708: wf_log_pkg.string(wf_log_pkg.level_error, l_module,
709: 'Error in getting ECX_MAP_CODE.');
710: end if;
711: wf_event.setErrorInfo(p_event,'ERROR');
712: return 'ERROR';
713: end;
714:
715: -- process

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

724: if (wf_log_pkg.level_unexpected >= fnd_log.g_current_runtime_level) then
725: wf_log_pkg.string(wf_log_pkg.level_unexpected, l_module,
726: 'Error in processing inbound rule2.');
727: end if;
728: wf_event.setErrorInfo(p_event,'ERROR');
729: return 'ERROR';
730: end inbound_rule2;
731:
732:

Line 734: p_event in out nocopy wf_event_t,

730: end inbound_rule2;
731:
732:
733: function exec_wf (p_subscription_guid in raw,
734: p_event in out nocopy wf_event_t,
735: p_wftype in varchar2,
736: p_wfname in varchar2
737: ) return varchar2
738: is

Line 765: from wf_event_subscriptions

761: select out_agent_guid, to_agent_guid, wf_process_type, wf_process_name,
762: priority, parameters, map_code, standard_type, standard_code
763: into l_out_guid, l_to_guid, l_wftype, l_wfname, l_pri, l_subparams,
764: l_map_code, l_std_type, l_std_code
765: from wf_event_subscriptions
766: where guid = p_subscription_guid;
767:
768: if (p_wftype is not null) then
769: l_wftype := p_wftype;

Line 782: wf_event.AddParameterToList('SUB_GUID', p_subscription_guid, l_paramlist);

778: 'Calling wf_engine.event()');
779: end if;
780:
781: l_paramlist := p_event.Parameter_List;
782: wf_event.AddParameterToList('SUB_GUID', p_subscription_guid, l_paramlist);
783:
784: if p_event.getValueForParameter('ECX_MAP_CODE') is null then
785: if l_map_code is not null then
786: wf_event.AddParameterToList('ECX_MAP_CODE', l_map_code, l_paramlist);

Line 786: wf_event.AddParameterToList('ECX_MAP_CODE', l_map_code, l_paramlist);

782: wf_event.AddParameterToList('SUB_GUID', p_subscription_guid, l_paramlist);
783:
784: if p_event.getValueForParameter('ECX_MAP_CODE') is null then
785: if l_map_code is not null then
786: wf_event.AddParameterToList('ECX_MAP_CODE', l_map_code, l_paramlist);
787: end if;
788: end if;
789:
790: if p_event.getValueForParameter('ECX_MESSAGE_STANDARD') is null then

Line 792: wf_event.AddParameterToList('ECX_MESSAGE_STANDARD', l_std_code, l_paramlist);

788: end if;
789:
790: if p_event.getValueForParameter('ECX_MESSAGE_STANDARD') is null then
791: if l_std_code is not null then
792: wf_event.AddParameterToList('ECX_MESSAGE_STANDARD', l_std_code, l_paramlist);
793: end if;
794: end if;
795:
796: if p_event.getValueForParameter('ECX_MESSAGE_TYPE') is null then

Line 798: wf_event.AddParameterToList('ECX_MESSAGE_TYPE', l_std_type, l_paramlist);

794: end if;
795:
796: if p_event.getValueForParameter('ECX_MESSAGE_TYPE') is null then
797: if l_std_type is not null then
798: wf_event.AddParameterToList('ECX_MESSAGE_TYPE', l_std_type, l_paramlist);
799: end if;
800: end if;
801:
802: p_event.parameter_List := l_paramlist;

Line 825: p_event.From_Agent := wf_event.newAgent(l_out_guid);

821: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
822: 'Routing...' || l_out_guid);
823: end if;
824:
825: p_event.From_Agent := wf_event.newAgent(l_out_guid);
826: p_event.To_Agent := wf_event.newAgent(l_to_guid);
827: p_event.Priority := l_pri;
828: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
829:

Line 826: p_event.To_Agent := wf_event.newAgent(l_to_guid);

822: 'Routing...' || l_out_guid);
823: end if;
824:
825: p_event.From_Agent := wf_event.newAgent(l_out_guid);
826: p_event.To_Agent := wf_event.newAgent(l_to_guid);
827: p_event.Priority := l_pri;
828: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
829:
830: wf_event.send(p_event);

Line 830: wf_event.send(p_event);

826: p_event.To_Agent := wf_event.newAgent(l_to_guid);
827: p_event.Priority := l_pri;
828: p_event.Send_Date := nvl(p_event.getSendDate(),sysdate);
829:
830: wf_event.send(p_event);
831: end if;
832:
833: -- Debug --
834: if (wf_log_pkg.wf_debug_flag = TRUE) then

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

843: exception
844: when others then
845: wf_core.context('ECX_RULE', 'Exec_WF', p_event.getEventName(),
846: p_subscription_guid);
847: wf_event.setErrorInfo(p_event, 'ERROR');
848: return 'ERROR';
849: end exec_wf;
850:
851:

Line 875: p_event in out nocopy wf_event_t)

871: p_logfile in varchar2,
872: p_status in varchar2,
873: p_time_stamp in varchar2,
874: p_document_number in varchar2,
875: p_event in out nocopy wf_event_t)
876: is
877:
878: l_party_type Varchar2(20);
879: l_module Varchar2(2000);

Line 1076: p_event in wf_event_t,

1072: end isTPEnabled;
1073:
1074:
1075: procedure enqueue_msg (
1076: p_event in wf_event_t,
1077: p_queue_name in Varchar2,
1078: p_msgid_in in raw,
1079: x_msgid_out out nocopy raw)
1080: is

Line 1156: from wf_event_subscriptions

1152: l_sub_param varchar2(4000);
1153:
1154: cursor c_sub_param is
1155: select parameters
1156: from wf_event_subscriptions
1157: where guid = p_subscription_guid;
1158:
1159: begin
1160: -- always takes event debug mode over the subscription debug mode.

Line 1176: l_debug_level := wf_event_functions_pkg.subscriptionparameters(l_sub_param,

1172: if (l_sub_param is null) then
1173: return;
1174: end if;
1175:
1176: l_debug_level := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1177: 'ECX_DEBUG_LEVEL');
1178:
1179: -- if no ecx_debug_level is specified, then it should use the profile option.
1180: if l_debug_level is null then

Line 1185: l_transaction_type := wf_event_functions_pkg.subscriptionparameters(l_sub_param,

1181: return;
1182: end if;
1183:
1184: -- At this point, there is some debug level is set at subscription.
1185: l_transaction_type := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1186: 'ECX_TRANSACTION_TYPE');
1187:
1188: l_transaction_subtype := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1189: 'ECX_TRANSACTION_SUBTYPE');

Line 1188: l_transaction_subtype := wf_event_functions_pkg.subscriptionparameters(l_sub_param,

1184: -- At this point, there is some debug level is set at subscription.
1185: l_transaction_type := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1186: 'ECX_TRANSACTION_TYPE');
1187:
1188: l_transaction_subtype := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1189: 'ECX_TRANSACTION_SUBTYPE');
1190:
1191: l_party_site_id := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1192: 'ECX_PARTY_SITE_ID');

Line 1191: l_party_site_id := wf_event_functions_pkg.subscriptionparameters(l_sub_param,

1187:
1188: l_transaction_subtype := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1189: 'ECX_TRANSACTION_SUBTYPE');
1190:
1191: l_party_site_id := wf_event_functions_pkg.subscriptionparameters(l_sub_param,
1192: 'ECX_PARTY_SITE_ID');
1193:
1194: if (l_transaction_type is null) and (l_party_site_id is null) and
1195: (l_transaction_subtype is null) then

Line 1233: p_event in out nocopy wf_event_t

1229: --
1230:
1231: function TPPreProcessing(
1232: p_subscription_guid in raw,
1233: p_event in out nocopy wf_event_t
1234: ) return varchar2
1235: is
1236: l_msgid RAW(16);
1237: l_process_id RAW(16);

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

1451: ecx_utils.i_errbuf,
1452: ecx_utils.i_errparams
1453: );
1454:
1455: wf_event.setErrorInfo(p_event,'ERROR');
1456: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
1457: ecx_utils.i_errparams));
1458: p_event.event_key := l_msgid;
1459: p_event.AddParameterToList('ECX_RETURN_CODE', ecx_utils.i_ret_code);

Line 1489: p_event in out nocopy wf_event_t

1485: -- Standard B2B inbound function
1486:
1487: function ReceiveTPMessage(
1488: p_subscription_guid in raw,
1489: p_event in out nocopy wf_event_t
1490: ) return varchar2
1491: is
1492: l_queue_name varchar2(80);
1493: l_agent_name varchar2(30);

Line 1842: wf_event.dispatch('EXTERNAL', null, p_event);

1838: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1839: wf_log_pkg.string(wf_log_pkg.level_statement, l_module,
1840: 'Dispatch ' ||p_event.event_name);
1841: end if;
1842: wf_event.dispatch('EXTERNAL', null, p_event);
1843: end if;
1844: end if;
1845: else
1846: -- enqueue to the second queue.

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

1884: ecx_utils.i_errbuf,
1885: ecx_utils.i_errparams
1886: );
1887:
1888: wf_event.setErrorInfo(p_event,'ERROR');
1889: p_event.setErrorMessage(ecx_debug.getMessage(ecx_utils.i_errbuf,
1890: ecx_utils.i_errparams));
1891: if (p_event.event_key is null)
1892: then

Line 1917: p_event in out nocopy wf_event_t

1913:
1914:
1915: function CreateTPMessage (
1916: p_subscription_guid in raw,
1917: p_event in out nocopy wf_event_t
1918: ) return varchar2
1919: is
1920:
1921: l_module varchar2(2000);