25: )
26: is
27: begin
28: begin
29: wf_engine.SetItemAttrNumber(itemtype,itemkey,'ECX_ERROR_TYPE',ecx_utils.error_type);
30: exception
31: when others then
32:
33: -- If item attribute does not exist then create it;
32:
33: -- If item attribute does not exist then create it;
34:
35: if ( wf_core.error_name = 'WFENG_ITEM_ATTR' ) then
36: wf_engine.AddItemAttr(itemtype,itemkey,'ECX_ERROR_TYPE',null,ecx_utils.error_type,null);
37: else
38: raise;
39: end if;
40: end;
39: end if;
40: end;
41:
42: begin
43: wf_engine.SetItemAttrText(itemtype,itemkey,'ECX_LOG_FILE',ecx_utils.g_logfile);
44: exception
45: when others then
46:
47: -- If item attribute does not exist then create it;
46:
47: -- If item attribute does not exist then create it;
48:
49: if ( wf_core.error_name = 'WFENG_ITEM_ATTR' ) then
50: wf_engine.AddItemAttr(itemtype,itemkey,'ECX_LOG_FILE',ecx_utils.g_logfile,null,null);
51: else
52: raise;
53: end if;
54: end;
191: g_instlmode := wf_core.translate('WF_INSTALL');
192: IF g_instlmode = 'EMBEDDED'
193: THEN
194: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
195: ecx_utils.i_errparams));
196: wf_core.token('ECX_LOGFILE',logfile);
197: wf_core.raise('ECX_PROCESS_XMLERROR_EMBD');
198: ELSE
199: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
196: wf_core.token('ECX_LOGFILE',logfile);
197: wf_core.raise('ECX_PROCESS_XMLERROR_EMBD');
198: ELSE
199: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
200: ecx_utils.i_errparams));
201: wf_core.token('ECX_LOGFILE',logfile);
202: wf_core.raise('ECX_PROCESS_XMLERROR');
203: END IF;
204: else
205: g_instlmode := wf_core.translate('WF_INSTALL');
206: IF g_instlmode = 'EMBEDDED'
207: THEN
208: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
209: ecx_utils.i_errparams));
210: wf_core.token('ECX_LOGFILE',logfile);
211: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
212: ELSE
213: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
210: wf_core.token('ECX_LOGFILE',logfile);
211: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
212: ELSE
213: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
214: ecx_utils.i_errparams));
215: wf_core.token('ECX_LOGFILE',logfile);
216: wf_core.raise('ECX_PROGRAM_EXIT');
217: END IF;
218: end if;
254: g_instlmode := wf_core.translate('WF_INSTALL');
255: IF g_instlmode = 'EMBEDDED'
256: THEN
257: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
258: ecx_utils.i_errparams));
259: wf_core.token('ECX_LOGFILE',logfile);
260: wf_core.raise('ECX_PROCESS_XMLERROR_EMBD');
261: ELSE
262: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
259: wf_core.token('ECX_LOGFILE',logfile);
260: wf_core.raise('ECX_PROCESS_XMLERROR_EMBD');
261: ELSE
262: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
263: ecx_utils.i_errparams));
264: wf_core.token('ECX_LOGFILE',logfile);
265: wf_core.raise('ECX_PROCESS_XMLERROR');
266: END IF;
267: else
268: g_instlmode := wf_core.translate('WF_INSTALL');
269: IF g_instlmode = 'EMBEDDED'
270: THEN
271: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
272: ecx_utils.i_errparams));
273: wf_core.token('ECX_LOGFILE',logfile);
274: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
275: ELSE
276: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
273: wf_core.token('ECX_LOGFILE',logfile);
274: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
275: ELSE
276: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
277: ecx_utils.i_errparams));
278: wf_core.token('ECX_LOGFILE',logfile);
279: wf_core.raise('ECX_PROGRAM_EXIT');
280: END IF;
281: end if;
330: g_instlmode := wf_core.translate('WF_INSTALL');
331: IF g_instlmode = 'EMBEDDED'
332: THEN
333: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
334: ecx_utils.i_errparams));
335: wf_core.token('ECX_LOGFILE',logfile);
336: wf_core.raise('ECX_GET_XMLERROR_EMBD');
337: ELSE
338: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
335: wf_core.token('ECX_LOGFILE',logfile);
336: wf_core.raise('ECX_GET_XMLERROR_EMBD');
337: ELSE
338: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
339: ecx_utils.i_errparams));
340: wf_core.token('ECX_LOGFILE',logfile);
341: wf_core.raise('ECX_GET_XMLERROR');
342: END IF;
343: else
344: g_instlmode := wf_core.translate('WF_INSTALL');
345: IF g_instlmode = 'EMBEDDED'
346: THEN
347: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
348: ecx_utils.i_errparams));
349: wf_core.token('ECX_LOGFILE',logfile);
350: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
351: ELSE
352: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
349: wf_core.token('ECX_LOGFILE',logfile);
350: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
351: ELSE
352: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
353: ecx_utils.i_errparams));
354: wf_core.token('ECX_LOGFILE',logfile);
355: wf_core.raise('ECX_PROGRAM_EXIT');
356: END IF;
357: end if;
399: g_instlmode := wf_core.translate('WF_INSTALL');
400: IF g_instlmode = 'EMBEDDED'
401: THEN
402: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
403: ecx_utils.i_errparams));
404: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
405: wf_core.raise('ECX_SENDDIRECT_ERROR_EMBD');
406: ELSE
407: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
400: IF g_instlmode = 'EMBEDDED'
401: THEN
402: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
403: ecx_utils.i_errparams));
404: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
405: wf_core.raise('ECX_SENDDIRECT_ERROR_EMBD');
406: ELSE
407: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
408: ecx_utils.i_errparams));
404: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
405: wf_core.raise('ECX_SENDDIRECT_ERROR_EMBD');
406: ELSE
407: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
408: ecx_utils.i_errparams));
409: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
410: wf_core.raise('ECX_SENDDIRECT_ERROR');
411: END IF;
412: else
405: wf_core.raise('ECX_SENDDIRECT_ERROR_EMBD');
406: ELSE
407: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
408: ecx_utils.i_errparams));
409: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
410: wf_core.raise('ECX_SENDDIRECT_ERROR');
411: END IF;
412: else
413: g_instlmode := wf_core.translate('WF_INSTALL');
413: g_instlmode := wf_core.translate('WF_INSTALL');
414: IF g_instlmode = 'EMBEDDED'
415: THEN
416: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
417: ecx_utils.i_errparams));
418: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
419: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
420: ELSE
421: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
414: IF g_instlmode = 'EMBEDDED'
415: THEN
416: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
417: ecx_utils.i_errparams));
418: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
419: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
420: ELSE
421: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
422: ecx_utils.i_errparams));
418: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
419: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
420: ELSE
421: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
422: ecx_utils.i_errparams));
423: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
424: wf_core.raise('ECX_PROGRAM_EXIT');
425: END IF;
426: end if;
419: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
420: ELSE
421: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
422: ecx_utils.i_errparams));
423: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
424: wf_core.raise('ECX_PROGRAM_EXIT');
425: END IF;
426: end if;
427: exception
461: x_from_agt wf_agent_t := wf_agent_t(null,null);
462: x_to_agt wf_agent_t := wf_agent_t(null,null);
463:
464: begin
465: wf_event_t.initialize(ecx_utils.g_event);
466: /**
467: Set the Event Data with the passed in parameters,
468: so that the Business Event can be raised.
469: **/
467: Set the Event Data with the passed in parameters,
468: so that the Business Event can be raised.
469: **/
470:
471: ecx_utils.g_event.setEventName(ltrim(rtrim(eventName)));
472: ecx_utils.g_event.setEventKey(ltrim(rtrim(eventKey)));
473:
474: /**
475: x_from_agt has to be set.
468: so that the Business Event can be raised.
469: **/
470:
471: ecx_utils.g_event.setEventName(ltrim(rtrim(eventName)));
472: ecx_utils.g_event.setEventKey(ltrim(rtrim(eventKey)));
473:
474: /**
475: x_from_agt has to be set.
476: In this case, what is the from agent? Inbound engine?!
476: In this case, what is the from agent? Inbound engine?!
477: Setting it to null for now.
478: **/
479:
480: ecx_utils.g_event.from_agent := x_from_agt ;
481: ecx_utils.g_event.to_agent := x_to_agt ;
482:
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
477: Setting it to null for now.
478: **/
479:
480: ecx_utils.g_event.from_agent := x_from_agt ;
481: ecx_utils.g_event.to_agent := x_to_agt ;
482:
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
479:
480: ecx_utils.g_event.from_agent := x_from_agt ;
481: ecx_utils.g_event.to_agent := x_to_agt ;
482:
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
480: ecx_utils.g_event.from_agent := x_from_agt ;
481: ecx_utils.g_event.to_agent := x_to_agt ;
482:
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
481: ecx_utils.g_event.to_agent := x_to_agt ;
482:
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
482:
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
483: ecx_utils.g_event.addParameterToList('PARAMETER1', parameter1);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
491: ecx_utils.g_event.addParameterToList('PARAMETER9', parameter9);
484: ecx_utils.g_event.addParameterToList('PARAMETER2', parameter2);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
491: ecx_utils.g_event.addParameterToList('PARAMETER9', parameter9);
492: ecx_utils.g_event.addParameterToList('PARAMETER10', parameter10);
485: ecx_utils.g_event.addParameterToList('PARAMETER3', parameter3);
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
491: ecx_utils.g_event.addParameterToList('PARAMETER9', parameter9);
492: ecx_utils.g_event.addParameterToList('PARAMETER10', parameter10);
493:
486: ecx_utils.g_event.addParameterToList('PARAMETER4', parameter4);
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
491: ecx_utils.g_event.addParameterToList('PARAMETER9', parameter9);
492: ecx_utils.g_event.addParameterToList('PARAMETER10', parameter10);
493:
494: retcode :=0;
487: ecx_utils.g_event.addParameterToList('PARAMETER5', parameter5);
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
491: ecx_utils.g_event.addParameterToList('PARAMETER9', parameter9);
492: ecx_utils.g_event.addParameterToList('PARAMETER10', parameter10);
493:
494: retcode :=0;
495: retmsg := ecx_debug.getTranslatedMessage('ECX_BUSINESS_EVT_SET');
488: ecx_utils.g_event.addParameterToList('PARAMETER6', parameter6);
489: ecx_utils.g_event.addParameterToList('PARAMETER7', parameter7);
490: ecx_utils.g_event.addParameterToList('PARAMETER8', parameter8);
491: ecx_utils.g_event.addParameterToList('PARAMETER9', parameter9);
492: ecx_utils.g_event.addParameterToList('PARAMETER10', parameter10);
493:
494: retcode :=0;
495: retmsg := ecx_debug.getTranslatedMessage('ECX_BUSINESS_EVT_SET');
496:
554: party_id := wf_event.getValueForParameter('ECX_PARTY_ID',p_parameter_list);
555: party_site_id := wf_event.getValueForParameter('ECX_PARTY_SITE_ID',p_parameter_list);
556: document_id := wf_event.getValueForParameter('ECX_DOCUMENT_ID',p_parameter_list);
557:
558: if ecx_utils.g_event is null
559: then
560: wf_event_t.initialize(ecx_utils.g_event);
561: end if;
562:
556: document_id := wf_event.getValueForParameter('ECX_DOCUMENT_ID',p_parameter_list);
557:
558: if ecx_utils.g_event is null
559: then
560: wf_event_t.initialize(ecx_utils.g_event);
561: end if;
562:
563: ecx_utils.g_event.setparameterlist(p_parameter_list);
564:
559: then
560: wf_event_t.initialize(ecx_utils.g_event);
561: end if;
562:
563: ecx_utils.g_event.setparameterlist(p_parameter_list);
564:
565:
566: getXMLCover
567: (
575: i_xmldoc => p_xmldoc
576: );
577:
578: -- Removed for time being as the parameters are IN type only.
579: --wf_event.addParameterToList('ECX_ERROR_TYPE', ecx_utils.error_type,p_parameter_list);
580: --wf_event.addParameterToList('ECX_LOG_FILE', ecx_utils.g_logfile,p_parameter_list);
581: --dbms_lob.freetemporary(p_xmldoc);
582: return p_xmldoc;
583: exception
576: );
577:
578: -- Removed for time being as the parameters are IN type only.
579: --wf_event.addParameterToList('ECX_ERROR_TYPE', ecx_utils.error_type,p_parameter_list);
580: --wf_event.addParameterToList('ECX_LOG_FILE', ecx_utils.g_logfile,p_parameter_list);
581: --dbms_lob.freetemporary(p_xmldoc);
582: return p_xmldoc;
583: exception
584: when others then
625: a1subtype varchar2(8);
626:
627: begin
628: -- Set the Global itemtype,itemkey and the activity_id
629: ecx_utils.g_item_type := itemtype;
630: ecx_utils.g_item_key := itemkey;
631: ecx_utils.g_activity_id := actid;
632:
633: -- Do nothing in cancel or timeout mode
626:
627: begin
628: -- Set the Global itemtype,itemkey and the activity_id
629: ecx_utils.g_item_type := itemtype;
630: ecx_utils.g_item_key := itemkey;
631: ecx_utils.g_activity_id := actid;
632:
633: -- Do nothing in cancel or timeout mode
634: if (funcmode <> wf_engine.eng_run) then
627: begin
628: -- Set the Global itemtype,itemkey and the activity_id
629: ecx_utils.g_item_type := itemtype;
630: ecx_utils.g_item_key := itemkey;
631: ecx_utils.g_activity_id := actid;
632:
633: -- Do nothing in cancel or timeout mode
634: if (funcmode <> wf_engine.eng_run) then
635: resultout := wf_engine.eng_null;
711: aname_log_file varchar2(30);
712:
713: begin
714: -- Set the Global itemtype,itemkey and the activity_id
715: ecx_utils.g_item_type := itemtype;
716: ecx_utils.g_item_key := itemkey;
717: ecx_utils.g_activity_id := actid;
718:
719: -- Do nothing in cancel or timeout mode
712:
713: begin
714: -- Set the Global itemtype,itemkey and the activity_id
715: ecx_utils.g_item_type := itemtype;
716: ecx_utils.g_item_key := itemkey;
717: ecx_utils.g_activity_id := actid;
718:
719: -- Do nothing in cancel or timeout mode
720: if (funcmode <> wf_engine.eng_run) then
713: begin
714: -- Set the Global itemtype,itemkey and the activity_id
715: ecx_utils.g_item_type := itemtype;
716: ecx_utils.g_item_key := itemkey;
717: ecx_utils.g_activity_id := actid;
718:
719: -- Do nothing in cancel or timeout mode
720: if (funcmode <> wf_engine.eng_run) then
721: resultout := wf_engine.eng_null;
792: g_instlmode varchar2(100);
793: begin
794:
795: -- Set the Global itemtype,itemkey and the activity_id
796: ecx_utils.g_item_type := itemtype;
797: ecx_utils.g_item_key := itemkey;
798: ecx_utils.g_activity_id := actid;
799:
800: -- Do nothing in cancel or timeout mode
793: begin
794:
795: -- Set the Global itemtype,itemkey and the activity_id
796: ecx_utils.g_item_type := itemtype;
797: ecx_utils.g_item_key := itemkey;
798: ecx_utils.g_activity_id := actid;
799:
800: -- Do nothing in cancel or timeout mode
801:
794:
795: -- Set the Global itemtype,itemkey and the activity_id
796: ecx_utils.g_item_type := itemtype;
797: ecx_utils.g_item_key := itemkey;
798: ecx_utils.g_activity_id := actid;
799:
800: -- Do nothing in cancel or timeout mode
801:
802: if (funcmode <> wf_engine.eng_run) then
883: wf_core.token('ECX_TRANSACTION_TYPE', transaction_type);
884: wf_core.token('ECX_TRANSACTION_SUBTYPE', transaction_subtype);
885: wf_core.raise('ECX_DELIVERY_SETUP_ERROR');
886:
887: when ecx_utils.program_exit then
888: wf_core.context('ECX_STANDARD','isDeliveryRequiredCover',transaction_type,transaction_subtype, party_id,party_site_id);
889: g_instlmode := wf_core.translate('WF_INSTALL');
890: IF g_instlmode = 'EMBEDDED'
891: THEN
888: wf_core.context('ECX_STANDARD','isDeliveryRequiredCover',transaction_type,transaction_subtype, party_id,party_site_id);
889: g_instlmode := wf_core.translate('WF_INSTALL');
890: IF g_instlmode = 'EMBEDDED'
891: THEN
892: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
893: ecx_utils.i_errparams));
894: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
895: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
896: ELSE
889: g_instlmode := wf_core.translate('WF_INSTALL');
890: IF g_instlmode = 'EMBEDDED'
891: THEN
892: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
893: ecx_utils.i_errparams));
894: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
895: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
896: ELSE
897: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
890: IF g_instlmode = 'EMBEDDED'
891: THEN
892: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
893: ecx_utils.i_errparams));
894: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
895: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
896: ELSE
897: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
898: ecx_utils.i_errparams));
894: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
895: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
896: ELSE
897: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
898: ecx_utils.i_errparams));
899: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
900: wf_core.raise('ECX_PROGRAM_EXIT');
901: END IF;
902:
895: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
896: ELSE
897: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
898: ecx_utils.i_errparams));
899: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
900: wf_core.raise('ECX_PROGRAM_EXIT');
901: END IF;
902:
903: when others then
952: result varchar2(30);
953: status varchar2(8);
954: begin
955: -- Set the Global itemtype,itemkey and the activity_id
956: ecx_utils.g_item_type := itemtype;
957: ecx_utils.g_item_key := itemkey;
958: ecx_utils.g_activity_id := actid;
959:
960: -- Do nothing in cancel or timeout mode
953: status varchar2(8);
954: begin
955: -- Set the Global itemtype,itemkey and the activity_id
956: ecx_utils.g_item_type := itemtype;
957: ecx_utils.g_item_key := itemkey;
958: ecx_utils.g_activity_id := actid;
959:
960: -- Do nothing in cancel or timeout mode
961: if (funcmode <> wf_engine.eng_run) then
954: begin
955: -- Set the Global itemtype,itemkey and the activity_id
956: ecx_utils.g_item_type := itemtype;
957: ecx_utils.g_item_key := itemkey;
958: ecx_utils.g_activity_id := actid;
959:
960: -- Do nothing in cancel or timeout mode
961: if (funcmode <> wf_engine.eng_run) then
962: resultout := wf_engine.eng_null;
1006:
1007: debug_mode := nvl(Wf_Engine.GetItemAttrText(itemtype, itemkey, 'ECX_DEBUG_LEVEL',true),0);
1008:
1009: /** Check for the Item Attribute of type ECX_EVENT_MESSAGE. If found , then use that to initialize the
1010: global variable for ecx_utils.g_event or create a local instance.
1011: **/
1012: begin
1013: -- Initialize the Event before using it.
1014: wf_event_t.initialize(ecx_utils.g_event);
1010: global variable for ecx_utils.g_event or create a local instance.
1011: **/
1012: begin
1013: -- Initialize the Event before using it.
1014: wf_event_t.initialize(ecx_utils.g_event);
1015: ecx_utils.g_event := Wf_Engine.GetItemAttrEvent(itemtype, itemkey,'ECX_EVENT_MESSAGE');
1016: exception
1017: when others then
1018: if ecx_utils.g_event is null
1011: **/
1012: begin
1013: -- Initialize the Event before using it.
1014: wf_event_t.initialize(ecx_utils.g_event);
1015: ecx_utils.g_event := Wf_Engine.GetItemAttrEvent(itemtype, itemkey,'ECX_EVENT_MESSAGE');
1016: exception
1017: when others then
1018: if ecx_utils.g_event is null
1019: then
1014: wf_event_t.initialize(ecx_utils.g_event);
1015: ecx_utils.g_event := Wf_Engine.GetItemAttrEvent(itemtype, itemkey,'ECX_EVENT_MESSAGE');
1016: exception
1017: when others then
1018: if ecx_utils.g_event is null
1019: then
1020: wf_event_t.initialize(ecx_utils.g_event);
1021: end if;
1022: end;
1016: exception
1017: when others then
1018: if ecx_utils.g_event is null
1019: then
1020: wf_event_t.initialize(ecx_utils.g_event);
1021: end if;
1022: end;
1023:
1024:
1031: /* End of changes for bug 2120165*/
1032:
1033: -- Add the above Parameters to the Global Event Message Object
1034: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1035: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1036: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1037: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1038: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1039: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1032:
1033: -- Add the above Parameters to the Global Event Message Object
1034: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1035: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1036: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1037: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1038: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1039: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1040:
1033: -- Add the above Parameters to the Global Event Message Object
1034: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1035: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1036: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1037: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1038: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1039: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1040:
1041:
1034: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1035: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1036: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1037: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1038: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1039: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1040:
1041:
1042: send_mode := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_SEND_MODE');
1035: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1036: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1037: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1038: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1039: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1040:
1041:
1042: send_mode := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_SEND_MODE');
1043:
1188: from dual;
1189:
1190: begin
1191: -- Set the Global itemtype,itemkey and the activity_id
1192: ecx_utils.g_item_type := itemtype;
1193: ecx_utils.g_item_key := itemkey;
1194: ecx_utils.g_activity_id := actid;
1195:
1196: -- Do nothing in cancel or timeout mode
1189:
1190: begin
1191: -- Set the Global itemtype,itemkey and the activity_id
1192: ecx_utils.g_item_type := itemtype;
1193: ecx_utils.g_item_key := itemkey;
1194: ecx_utils.g_activity_id := actid;
1195:
1196: -- Do nothing in cancel or timeout mode
1197: if (funcmode <> wf_engine.eng_run) then
1190: begin
1191: -- Set the Global itemtype,itemkey and the activity_id
1192: ecx_utils.g_item_type := itemtype;
1193: ecx_utils.g_item_key := itemkey;
1194: ecx_utils.g_activity_id := actid;
1195:
1196: -- Do nothing in cancel or timeout mode
1197: if (funcmode <> wf_engine.eng_run) then
1198: resultout := wf_engine.eng_null;
1259: Populate the Parameters in the original event Object being passed. if it is null , initialize and create
1260: a new Instance and populate the variables
1261: if i_event is null
1262: then
1263: wf_event_t.initialize(ecx_utils.g_event);
1264: else
1265: ecx_utils.g_event := i_event;
1266: end if;
1267: **/
1261: if i_event is null
1262: then
1263: wf_event_t.initialize(ecx_utils.g_event);
1264: else
1265: ecx_utils.g_event := i_event;
1266: end if;
1267: **/
1268:
1269: /* Always initialize ecx_utils.g_event before using it */
1265: ecx_utils.g_event := i_event;
1266: end if;
1267: **/
1268:
1269: /* Always initialize ecx_utils.g_event before using it */
1270: wf_event_t.initialize(ecx_utils.g_event);
1271: if i_event is not null
1272: then
1273: ecx_utils.g_event := i_event;
1266: end if;
1267: **/
1268:
1269: /* Always initialize ecx_utils.g_event before using it */
1270: wf_event_t.initialize(ecx_utils.g_event);
1271: if i_event is not null
1272: then
1273: ecx_utils.g_event := i_event;
1274: End If;
1269: /* Always initialize ecx_utils.g_event before using it */
1270: wf_event_t.initialize(ecx_utils.g_event);
1271: if i_event is not null
1272: then
1273: ecx_utils.g_event := i_event;
1274: End If;
1275:
1276: parameter1 := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_PARAMETER1');
1277: parameter2 := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_PARAMETER2');
1279: parameter4 := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_PARAMETER4');
1280: parameter5 := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_PARAMETER5');
1281: -- Add the above Parameters to the Global Event Message Object
1282: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1283: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1284: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1285: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1286: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1287: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1280: parameter5 := Wf_Engine.GetActivityAttrText(itemtype, itemkey,actid, 'ECX_PARAMETER5');
1281: -- Add the above Parameters to the Global Event Message Object
1282: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1283: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1284: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1285: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1286: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1287: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1288:
1281: -- Add the above Parameters to the Global Event Message Object
1282: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1283: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1284: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1285: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1286: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1287: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1288:
1289: open c1;
1282: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1283: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1284: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1285: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1286: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1287: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1288:
1289: open c1;
1290: fetch c1 into trigger_id;
1283: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1284: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1285: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1286: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1287: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1288:
1289: open c1;
1290: fetch c1 into trigger_id;
1291: close c1;
1294: -- get_delivery_attribs
1295: ecx_debug.setErrorInfo(10,10,'ECX_TRIGGER_OUTBOUND');
1296: ecx_document.trigger_outbound(transaction_type, transaction_subtype,
1297: party_id, party_site_id,
1298: document_id, ecx_utils.i_ret_code,
1299: ecx_utils.i_errbuf, trigger_id,
1300: p_party_type, p_party_id, p_party_site_id,
1301: p_message_type, p_message_standard,
1302: p_ext_type, p_ext_subtype, p_source_code,
1295: ecx_debug.setErrorInfo(10,10,'ECX_TRIGGER_OUTBOUND');
1296: ecx_document.trigger_outbound(transaction_type, transaction_subtype,
1297: party_id, party_site_id,
1298: document_id, ecx_utils.i_ret_code,
1299: ecx_utils.i_errbuf, trigger_id,
1300: p_party_type, p_party_id, p_party_site_id,
1301: p_message_type, p_message_standard,
1302: p_ext_type, p_ext_subtype, p_source_code,
1303: p_destination_code, p_destination_type,
1306: );
1307: -- do outbound logging
1308: ecx_debug.setErrorInfo(10,10, 'ECX_PROCESSING_MESSAGE');
1309: ecx_errorlog.outbound_engine (trigger_id,
1310: ecx_utils.i_ret_code,
1311: ecx_utils.i_errbuf,
1312: null,null,p_party_type
1313: );
1314:
1307: -- do outbound logging
1308: ecx_debug.setErrorInfo(10,10, 'ECX_PROCESSING_MESSAGE');
1309: ecx_errorlog.outbound_engine (trigger_id,
1310: ecx_utils.i_ret_code,
1311: ecx_utils.i_errbuf,
1312: null,null,p_party_type
1313: );
1314:
1315: -- prepare WS related event if it is SOAP protocol type
1313: );
1314:
1315: -- prepare WS related event if it is SOAP protocol type
1316: if (upper(p_destination_type) = 'SOAP') then
1317: prepareWS(itemtype, itemkey, actid, ecx_utils.g_event);
1318: end if;
1319:
1320: -- if the from agent is not yet set by users, reset it based on the retrieve
1321: -- protocol_type. Otherwise, honor whatever has been set by the users.
1318: end if;
1319:
1320: -- if the from agent is not yet set by users, reset it based on the retrieve
1321: -- protocol_type. Otherwise, honor whatever has been set by the users.
1322: if (not ecx_utils.g_event.GetFromAgent() is null)
1323: then
1324: i_from_agent_name := ecx_utils.g_event.GetFromAgent().GetName();
1325: i_from_system_name := ecx_utils.g_event.GetFromAgent().GetSystem();
1326: end if;
1320: -- if the from agent is not yet set by users, reset it based on the retrieve
1321: -- protocol_type. Otherwise, honor whatever has been set by the users.
1322: if (not ecx_utils.g_event.GetFromAgent() is null)
1323: then
1324: i_from_agent_name := ecx_utils.g_event.GetFromAgent().GetName();
1325: i_from_system_name := ecx_utils.g_event.GetFromAgent().GetSystem();
1326: end if;
1327:
1328: if (i_from_agent_name is null AND i_from_system_name is null)
1321: -- protocol_type. Otherwise, honor whatever has been set by the users.
1322: if (not ecx_utils.g_event.GetFromAgent() is null)
1323: then
1324: i_from_agent_name := ecx_utils.g_event.GetFromAgent().GetName();
1325: i_from_system_name := ecx_utils.g_event.GetFromAgent().GetSystem();
1326: end if;
1327:
1328: if (i_from_agent_name is null AND i_from_system_name is null)
1329: or (i_from_agent_name = 'WF_DEFERRED')
1352: raise;
1353: end;
1354:
1355: i_from_agent := wf_agent_t(i_from_agent_name, i_from_system_name);
1356: ecx_utils.g_event.setFromAgent(i_from_agent);
1357:
1358: end if;
1359:
1360: getXMLcover
1367: i_tp_id => p_party_id,
1368: i_tp_site_id => p_party_site_id,
1369: i_document_id => document_id,
1370: i_debug_level => i_debug_level,
1371: i_xmldoc => ecx_utils.g_event.event_data,
1372: i_message_type => p_message_type);
1373:
1374: ecx_debug.setErrorInfo(0,10,'ECX_MESSAGE_CREATED');
1375: ecx_errorlog.outbound_engine (trigger_id,
1372: i_message_type => p_message_type);
1373:
1374: ecx_debug.setErrorInfo(0,10,'ECX_MESSAGE_CREATED');
1375: ecx_errorlog.outbound_engine (trigger_id,
1376: ecx_utils.i_ret_code,
1377: ecx_utils.i_errbuf,
1378: null,null,p_party_type
1379: );
1380:
1373:
1374: ecx_debug.setErrorInfo(0,10,'ECX_MESSAGE_CREATED');
1375: ecx_errorlog.outbound_engine (trigger_id,
1376: ecx_utils.i_ret_code,
1377: ecx_utils.i_errbuf,
1378: null,null,p_party_type
1379: );
1380:
1381: -- Following part is needed only when getxmltp is used with wf_event.send
1378: null,null,p_party_type
1379: );
1380:
1381: -- Following part is needed only when getxmltp is used with wf_event.send
1382: -- set ecx_utils.g_event with the envelope information. This will later be used
1383: -- by the queue handler to enqueue on ECX_OUTBOUND
1384: ecx_utils.g_event.addParameterToList('PARTY_TYPE', p_party_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1380:
1381: -- Following part is needed only when getxmltp is used with wf_event.send
1382: -- set ecx_utils.g_event with the envelope information. This will later be used
1383: -- by the queue handler to enqueue on ECX_OUTBOUND
1384: ecx_utils.g_event.addParameterToList('PARTY_TYPE', p_party_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1381: -- Following part is needed only when getxmltp is used with wf_event.send
1382: -- set ecx_utils.g_event with the envelope information. This will later be used
1383: -- by the queue handler to enqueue on ECX_OUTBOUND
1384: ecx_utils.g_event.addParameterToList('PARTY_TYPE', p_party_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1382: -- set ecx_utils.g_event with the envelope information. This will later be used
1383: -- by the queue handler to enqueue on ECX_OUTBOUND
1384: ecx_utils.g_event.addParameterToList('PARTY_TYPE', p_party_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1383: -- by the queue handler to enqueue on ECX_OUTBOUND
1384: ecx_utils.g_event.addParameterToList('PARTY_TYPE', p_party_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1384: ecx_utils.g_event.addParameterToList('PARTY_TYPE', p_party_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1385: ecx_utils.g_event.addParameterToList('PARTYID', p_party_id);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1386: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', p_source_code);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1387: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1388: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', p_message_type);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1389: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', p_message_standard);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1390: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', p_ext_type);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1391: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', p_ext_subtype);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1392: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', p_destination_type);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1393: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', p_destination_address);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1394: ecx_utils.g_event.addParameterToList('USERNAME', p_username);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1395: ecx_utils.g_event.addParameterToList('PASSWORD', p_password);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1403: ecx_utils.g_event.addParameterToList('ITEM_TYPE', itemtype);
1396: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', ecx_utils.g_company_name);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1403: ecx_utils.g_event.addParameterToList('ITEM_TYPE', itemtype);
1404: ecx_utils.g_event.addParameterToList('ITEM_KEY', itemkey);
1397: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', null);
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1403: ecx_utils.g_event.addParameterToList('ITEM_TYPE', itemtype);
1404: ecx_utils.g_event.addParameterToList('ITEM_KEY', itemkey);
1405:
1398: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', p_destination_code);
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1403: ecx_utils.g_event.addParameterToList('ITEM_TYPE', itemtype);
1404: ecx_utils.g_event.addParameterToList('ITEM_KEY', itemkey);
1405:
1406: -- Populate event structure and set item attribute
1399: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', null);
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1403: ecx_utils.g_event.addParameterToList('ITEM_TYPE', itemtype);
1404: ecx_utils.g_event.addParameterToList('ITEM_KEY', itemkey);
1405:
1406: -- Populate event structure and set item attribute
1407:
1400: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', null);
1401: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1402: ecx_utils.g_event.addParameterToList('TRIGGER_ID', trigger_id);
1403: ecx_utils.g_event.addParameterToList('ITEM_TYPE', itemtype);
1404: ecx_utils.g_event.addParameterToList('ITEM_KEY', itemkey);
1405:
1406: -- Populate event structure and set item attribute
1407:
1408: if event_name is not null
1415: i_event.SetEventKey(event_key);
1416: end if;
1417:
1418: -- set the event data back
1419: wf_engine.SetItemAttrEvent(itemtype, itemkey, evt_name, ecx_utils.g_event);
1420:
1421: addItemAttributes(itemtype,itemkey);
1422:
1423: resultout := 'COMPLETE:';
1427: ecx_errorlog.outbound_trigger
1428: (
1429: trigger_id, transaction_type, transaction_subtype,
1430: p_party_id, p_party_site_id, p_party_type,
1431: document_id, ecx_utils.i_ret_code, ecx_utils.i_errbuf
1432: );
1433:
1434: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1435: wf_core.token('ECX_TRANSACTION_TYPE', transaction_type);
1439: ecx_errorlog.outbound_trigger
1440: (
1441: trigger_id, transaction_type, transaction_subtype,
1442: p_party_id, p_party_site_id, p_party_type,
1443: document_id, ecx_utils.i_ret_code, ecx_utils.i_errbuf
1444: );
1445:
1446: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1447: g_instlmode := wf_core.translate('WF_INSTALL');
1446: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1447: g_instlmode := wf_core.translate('WF_INSTALL');
1448: IF g_instlmode = 'EMBEDDED'
1449: THEN
1450: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1451: ecx_utils.i_errparams));
1452: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1453: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1454: ELSE
1447: g_instlmode := wf_core.translate('WF_INSTALL');
1448: IF g_instlmode = 'EMBEDDED'
1449: THEN
1450: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1451: ecx_utils.i_errparams));
1452: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1453: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1454: ELSE
1455: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1448: IF g_instlmode = 'EMBEDDED'
1449: THEN
1450: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1451: ecx_utils.i_errparams));
1452: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1453: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1454: ELSE
1455: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1456: ecx_utils.i_errparams));
1452: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1453: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1454: ELSE
1455: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1456: ecx_utils.i_errparams));
1457: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1458: wf_core.raise('ECX_PROGRAM_EXIT');
1459: END IF;
1460: when ecx_document.ecx_no_party_setup then
1453: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1454: ELSE
1455: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1456: ecx_utils.i_errparams));
1457: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1458: wf_core.raise('ECX_PROGRAM_EXIT');
1459: END IF;
1460: when ecx_document.ecx_no_party_setup then
1461: ecx_errorlog.outbound_trigger
1461: ecx_errorlog.outbound_trigger
1462: (
1463: trigger_id, transaction_type, transaction_subtype,
1464: p_party_id, p_party_site_id, p_party_type,
1465: document_id, ecx_utils.i_ret_code, ecx_utils.i_errbuf
1466: );
1467:
1468: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1469: wf_core.token('ECX_PARTY_ID', party_id);
1475: ecx_errorlog.outbound_trigger
1476: (
1477: trigger_id, transaction_type, transaction_subtype,
1478: p_party_id, p_party_site_id, p_party_type,
1479: document_id, ecx_utils.i_ret_code, ecx_utils.i_errbuf
1480: );
1481:
1482: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1483: wf_core.token('ECX_PARTY_ID', party_id);
1484: wf_core.token('ECX_PARTY_SITE_ID', party_site_id);
1485: wf_core.token('ECX_TRANSACTION_TYPE', transaction_type);
1486: wf_core.token('ECX_TRANSACTION_SUBTYPE', transaction_subtype);
1487: wf_core.raise('ECX_DELIVERY_SETUP_ERROR');
1488: when ecx_utils.program_exit then
1489: ecx_errorlog.outbound_trigger
1490: (
1491: trigger_id, transaction_type, transaction_subtype,
1492: p_party_id, p_party_site_id, p_party_type,
1489: ecx_errorlog.outbound_trigger
1490: (
1491: trigger_id, transaction_type, transaction_subtype,
1492: p_party_id, p_party_site_id, p_party_type,
1493: document_id, ecx_utils.i_ret_code, ecx_utils.i_errbuf
1494: );
1495:
1496: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1497: g_instlmode := wf_core.translate('WF_INSTALL');
1496: wf_core.context('ECX_STANDARD','getXMLTP',transaction_type,transaction_subtype,party_id,party_site_id);
1497: g_instlmode := wf_core.translate('WF_INSTALL');
1498: IF g_instlmode = 'EMBEDDED'
1499: THEN
1500: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1501: ecx_utils.i_errparams));
1502: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1503: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1504: ELSE
1497: g_instlmode := wf_core.translate('WF_INSTALL');
1498: IF g_instlmode = 'EMBEDDED'
1499: THEN
1500: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1501: ecx_utils.i_errparams));
1502: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1503: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1504: ELSE
1505: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1498: IF g_instlmode = 'EMBEDDED'
1499: THEN
1500: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1501: ecx_utils.i_errparams));
1502: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1503: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1504: ELSE
1505: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1506: ecx_utils.i_errparams));
1501: ecx_utils.i_errparams));
1502: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1503: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1504: ELSE
1505: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1506: ecx_utils.i_errparams));
1507: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1508: wf_core.raise('ECX_PROGRAM_EXIT');
1509: END IF;
1502: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1503: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1504: ELSE
1505: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1506: ecx_utils.i_errparams));
1507: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1508: wf_core.raise('ECX_PROGRAM_EXIT');
1509: END IF;
1510: when others then
1503: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1504: ELSE
1505: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(ecx_utils.i_errbuf,
1506: ecx_utils.i_errparams));
1507: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1508: wf_core.raise('ECX_PROGRAM_EXIT');
1509: END IF;
1510: when others then
1511: ecx_errorlog.outbound_trigger
1511: ecx_errorlog.outbound_trigger
1512: (
1513: trigger_id, transaction_type, transaction_subtype,
1514: p_party_id, p_party_site_id, p_party_type,
1515: document_id, ecx_utils.i_ret_code, ecx_utils.i_errbuf
1516: );
1517:
1518: Wf_Core.Context('ECX_STANDARD', 'getXMLTP', itemtype, itemkey, to_char(actid), funcmode);
1519: raise;
1590: end if;
1591:
1592:
1593: -- Set the Global itemtype,itemkey and the activity_id
1594: ecx_utils.g_item_type := itemtype;
1595: ecx_utils.g_item_key := itemkey;
1596: ecx_utils.g_activity_id := actid;
1597:
1598: -- Do nothing in cancel or timeout mode
1591:
1592:
1593: -- Set the Global itemtype,itemkey and the activity_id
1594: ecx_utils.g_item_type := itemtype;
1595: ecx_utils.g_item_key := itemkey;
1596: ecx_utils.g_activity_id := actid;
1597:
1598: -- Do nothing in cancel or timeout mode
1599: if (funcmode <> wf_engine.eng_run) then
1592:
1593: -- Set the Global itemtype,itemkey and the activity_id
1594: ecx_utils.g_item_type := itemtype;
1595: ecx_utils.g_item_key := itemkey;
1596: ecx_utils.g_activity_id := actid;
1597:
1598: -- Do nothing in cancel or timeout mode
1599: if (funcmode <> wf_engine.eng_run) then
1600: resultout := wf_engine.eng_null;
1639: Populate the Parameters in the original event Object being passed. if it is null , initialize and create
1640: a new Instance and populate the variables
1641: if i_event is null
1642: then
1643: wf_event_t.initialize(ecx_utils.g_event);
1644: else
1645: ecx_utils.g_event := i_event;
1646: end if;
1647: **/
1641: if i_event is null
1642: then
1643: wf_event_t.initialize(ecx_utils.g_event);
1644: else
1645: ecx_utils.g_event := i_event;
1646: end if;
1647: **/
1648:
1649: /*Always initialize ecx_utils.g_event before using it */
1645: ecx_utils.g_event := i_event;
1646: end if;
1647: **/
1648:
1649: /*Always initialize ecx_utils.g_event before using it */
1650: wf_event_t.initialize(ecx_utils.g_event);
1651: if i_event is not null
1652: then
1653: ecx_utils.g_event := i_event;
1646: end if;
1647: **/
1648:
1649: /*Always initialize ecx_utils.g_event before using it */
1650: wf_event_t.initialize(ecx_utils.g_event);
1651: if i_event is not null
1652: then
1653: ecx_utils.g_event := i_event;
1654: End If;
1649: /*Always initialize ecx_utils.g_event before using it */
1650: wf_event_t.initialize(ecx_utils.g_event);
1651: if i_event is not null
1652: then
1653: ecx_utils.g_event := i_event;
1654: End If;
1655:
1656:
1657: -- Add the above Parameters to the Global Event Message Object
1655:
1656:
1657: -- Add the above Parameters to the Global Event Message Object
1658: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1659: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1660: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1661: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1662: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1663: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1656:
1657: -- Add the above Parameters to the Global Event Message Object
1658: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1659: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1660: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1661: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1662: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1663: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1664:
1657: -- Add the above Parameters to the Global Event Message Object
1658: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1659: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1660: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1661: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1662: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1663: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1664:
1665: -- KH comment: is null values for TP info going to casue an issue in GetXMLCover
1658: -- For backward compatability , we are passing ECX_PARAMETER1 -> PARAMETER1 on the Engine.
1659: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1660: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1661: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1662: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1663: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1664:
1665: -- KH comment: is null values for TP info going to casue an issue in GetXMLCover
1666: getXMLcover(i_map_code => i_map_code,
1659: ecx_utils.g_event.addparametertolist('PARAMETER1',parameter1);
1660: ecx_utils.g_event.addparametertolist('PARAMETER2',parameter2);
1661: ecx_utils.g_event.addparametertolist('PARAMETER3',parameter3);
1662: ecx_utils.g_event.addparametertolist('PARAMETER4',parameter4);
1663: ecx_utils.g_event.addparametertolist('PARAMETER5',parameter5);
1664:
1665: -- KH comment: is null values for TP info going to casue an issue in GetXMLCover
1666: getXMLcover(i_map_code => i_map_code,
1667: i_transaction_type => transaction_type,
1669: i_tp_id => party_id,
1670: i_tp_site_id => party_site_id,
1671: i_document_id => document_id,
1672: i_debug_level => i_debug_level,
1673: i_xmldoc => ecx_utils.g_event.event_data
1674: );
1675:
1676: -- Populate event structure and set item attribute
1677:
1685: i_event.SetEventKey(event_key);
1686: end if;
1687:
1688: -- set the event data back
1689: wf_engine.SetItemAttrEvent(itemtype, itemkey, evt_name, ecx_utils.g_event);
1690:
1691: addItemAttributes(itemtype,itemkey);
1692:
1693: resultout := 'COMPLETE:';
1722: g_instlmode varchar2(100);
1723: begin
1724:
1725: -- Set the Global itemtype,itemkey and the activity_id
1726: ecx_utils.g_item_type := itemtype;
1727: ecx_utils.g_item_key := itemkey;
1728: ecx_utils.g_activity_id := actid;
1729:
1730: -- RUN mode - normal process execution
1723: begin
1724:
1725: -- Set the Global itemtype,itemkey and the activity_id
1726: ecx_utils.g_item_type := itemtype;
1727: ecx_utils.g_item_key := itemkey;
1728: ecx_utils.g_activity_id := actid;
1729:
1730: -- RUN mode - normal process execution
1731:
1724:
1725: -- Set the Global itemtype,itemkey and the activity_id
1726: ecx_utils.g_item_type := itemtype;
1727: ecx_utils.g_item_key := itemkey;
1728: ecx_utils.g_activity_id := actid;
1729:
1730: -- RUN mode - normal process execution
1731:
1732: if (funcmode = 'RUN') then
1762: g_instlmode := wf_core.translate('WF_INSTALL');
1763: IF g_instlmode = 'EMBEDDED'
1764: THEN
1765: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1766: ecx_utils.i_errparams));
1767: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1768: wf_core.raise('ECX_REPROCESS_INBOUND_EMBD');
1769: ELSE
1770: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1763: IF g_instlmode = 'EMBEDDED'
1764: THEN
1765: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1766: ecx_utils.i_errparams));
1767: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1768: wf_core.raise('ECX_REPROCESS_INBOUND_EMBD');
1769: ELSE
1770: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1771: ecx_utils.i_errparams));
1767: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1768: wf_core.raise('ECX_REPROCESS_INBOUND_EMBD');
1769: ELSE
1770: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1771: ecx_utils.i_errparams));
1772: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1773: wf_core.raise('ECX_REPROCESS_INBOUND');
1774: END IF;
1775:
1768: wf_core.raise('ECX_REPROCESS_INBOUND_EMBD');
1769: ELSE
1770: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1771: ecx_utils.i_errparams));
1772: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1773: wf_core.raise('ECX_REPROCESS_INBOUND');
1774: END IF;
1775:
1776: else
1777: g_instlmode := wf_core.translate('WF_INSTALL');
1778: IF g_instlmode = 'EMBEDDED'
1779: THEN
1780: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1781: ecx_utils.i_errparams));
1782: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1783: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1784: ELSE
1785: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1778: IF g_instlmode = 'EMBEDDED'
1779: THEN
1780: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1781: ecx_utils.i_errparams));
1782: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1783: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1784: ELSE
1785: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1786: ecx_utils.i_errparams));
1782: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1783: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1784: ELSE
1785: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1786: ecx_utils.i_errparams));
1787: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1788: wf_core.raise('ECX_PROGRAM_EXIT');
1789: END IF;
1790: end if;
1783: wf_core.raise('ECX_PROGRAM_EXIT_EMBD');
1784: ELSE
1785: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1786: ecx_utils.i_errparams));
1787: wf_core.token('ECX_LOGFILE',ecx_utils.g_logfile);
1788: wf_core.raise('ECX_PROGRAM_EXIT');
1789: END IF;
1790: end if;
1791:
1840: errmsg varchar2(2000);
1841: begin
1842:
1843: -- Set the Global itemtype,itemkey and the activity_id
1844: ecx_utils.g_item_type := itemtype;
1845: ecx_utils.g_item_key := itemkey;
1846: ecx_utils.g_activity_id := actid;
1847:
1848:
1841: begin
1842:
1843: -- Set the Global itemtype,itemkey and the activity_id
1844: ecx_utils.g_item_type := itemtype;
1845: ecx_utils.g_item_key := itemkey;
1846: ecx_utils.g_activity_id := actid;
1847:
1848:
1849: -- RUN mode - normal process execution
1842:
1843: -- Set the Global itemtype,itemkey and the activity_id
1844: ecx_utils.g_item_type := itemtype;
1845: ecx_utils.g_item_key := itemkey;
1846: ecx_utils.g_activity_id := actid;
1847:
1848:
1849: -- RUN mode - normal process execution
1850:
1867: return;
1868: elsif retcode = 1
1869: then
1870: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1871: ecx_utils.i_errparams));
1872: wf_core.raise('ECX_RESEND_WARNING');
1873: else
1874: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1875: ecx_utils.i_errparams));
1871: ecx_utils.i_errparams));
1872: wf_core.raise('ECX_RESEND_WARNING');
1873: else
1874: wf_core.token('ECX_ERRMSG',ecx_debug.getMessage(errmsg,
1875: ecx_utils.i_errparams));
1876: wf_core.raise('ECX_RESEND_ERROR');
1877: end if;
1878:
1879: result := 'COMPLETE:';
1908: return;
1909:
1910: exception
1911: when others then
1912: wf_core.context('ECX_STANDARD', 'ReSend',itemtype, itemkey, to_char(actid),funcmode,retcode, ecx_debug.getMessage(errmsg,ecx_utils.i_errparams));
1913: raise;
1914: end resend;
1915:
1916: -- getEventDetails (PUBLIC)
1946: itemkey := null;
1947: parentitemtype := null;
1948: parentitemkey := null;
1949:
1950: if ecx_utils.g_event is not null
1951: then
1952: eventname := ecx_utils.g_event.event_name;
1953: eventkey := ecx_utils.g_event.event_key;
1954: itemtype := ecx_utils.g_item_type;
1948: parentitemkey := null;
1949:
1950: if ecx_utils.g_event is not null
1951: then
1952: eventname := ecx_utils.g_event.event_name;
1953: eventkey := ecx_utils.g_event.event_key;
1954: itemtype := ecx_utils.g_item_type;
1955: itemkey := ecx_utils.g_item_key;
1956:
1949:
1950: if ecx_utils.g_event is not null
1951: then
1952: eventname := ecx_utils.g_event.event_name;
1953: eventkey := ecx_utils.g_event.event_key;
1954: itemtype := ecx_utils.g_item_type;
1955: itemkey := ecx_utils.g_item_key;
1956:
1957: p_parameter_list := ecx_utils.g_event.parameter_list;
1950: if ecx_utils.g_event is not null
1951: then
1952: eventname := ecx_utils.g_event.event_name;
1953: eventkey := ecx_utils.g_event.event_key;
1954: itemtype := ecx_utils.g_item_type;
1955: itemkey := ecx_utils.g_item_key;
1956:
1957: p_parameter_list := ecx_utils.g_event.parameter_list;
1958: if p_parameter_list is not null
1951: then
1952: eventname := ecx_utils.g_event.event_name;
1953: eventkey := ecx_utils.g_event.event_key;
1954: itemtype := ecx_utils.g_item_type;
1955: itemkey := ecx_utils.g_item_key;
1956:
1957: p_parameter_list := ecx_utils.g_event.parameter_list;
1958: if p_parameter_list is not null
1959: then
1953: eventkey := ecx_utils.g_event.event_key;
1954: itemtype := ecx_utils.g_item_type;
1955: itemkey := ecx_utils.g_item_key;
1956:
1957: p_parameter_list := ecx_utils.g_event.parameter_list;
1958: if p_parameter_list is not null
1959: then
1960: i_string := wf_event.getValueForParameter('#CONTEXT',p_parameter_list);
1961: if i_string is not null
1997: to_agent := null;
1998: from_system := null;
1999: to_system := null;
2000:
2001: if ecx_utils.g_event is not null
2002: then
2003: if ecx_utils.g_event.from_agent is not null
2004: then
2005: from_agent := ecx_utils.g_event.from_agent.name;
1999: to_system := null;
2000:
2001: if ecx_utils.g_event is not null
2002: then
2003: if ecx_utils.g_event.from_agent is not null
2004: then
2005: from_agent := ecx_utils.g_event.from_agent.name;
2006: from_system := ecx_utils.g_event.from_agent.system;
2007: else
2001: if ecx_utils.g_event is not null
2002: then
2003: if ecx_utils.g_event.from_agent is not null
2004: then
2005: from_agent := ecx_utils.g_event.from_agent.name;
2006: from_system := ecx_utils.g_event.from_agent.system;
2007: else
2008: -- Use the Local System
2009: from_system := wf_event.local_system_name;
2002: then
2003: if ecx_utils.g_event.from_agent is not null
2004: then
2005: from_agent := ecx_utils.g_event.from_agent.name;
2006: from_system := ecx_utils.g_event.from_agent.system;
2007: else
2008: -- Use the Local System
2009: from_system := wf_event.local_system_name;
2010: end if;
2008: -- Use the Local System
2009: from_system := wf_event.local_system_name;
2010: end if;
2011:
2012: if ecx_utils.g_event.to_agent is not null
2013: then
2014: to_agent := ecx_utils.g_event.to_agent.name;
2015: to_system := ecx_utils.g_event.to_agent.system;
2016: else
2010: end if;
2011:
2012: if ecx_utils.g_event.to_agent is not null
2013: then
2014: to_agent := ecx_utils.g_event.to_agent.name;
2015: to_system := ecx_utils.g_event.to_agent.system;
2016: else
2017: -- Use the Local System
2018: from_system := wf_event.local_system_name;
2011:
2012: if ecx_utils.g_event.to_agent is not null
2013: then
2014: to_agent := ecx_utils.g_event.to_agent.name;
2015: to_system := ecx_utils.g_event.to_agent.system;
2016: else
2017: -- Use the Local System
2018: from_system := wf_event.local_system_name;
2019: end if;
2050: retcode => i_retcode,
2051: retmsg => i_retmsg
2052: );
2053:
2054: if ecx_utils.g_event.from_agent is not null
2055: then
2056: i_from_system := ecx_utils.g_event.from_agent.system;
2057: else
2058: i_from_system := wf_event.local_system_name;
2052: );
2053:
2054: if ecx_utils.g_event.from_agent is not null
2055: then
2056: i_from_system := ecx_utils.g_event.from_agent.system;
2057: else
2058: i_from_system := wf_event.local_system_name;
2059: end if;
2060:
2141: into l_dtd_payload;
2142: close get_dtd;
2143: end if;
2144:
2145: -- convert i_xml_file from CLOB to DOMNode and set in ecx_utils.g_xmldoc
2146: l_parser := xmlparser.newParser;
2147:
2148: if (l_dtd_payload is not null)
2149: then
2157: xmlparser.parseCLOB(l_parser, i_xml_file);
2158:
2159: l_xml_doc := xmlparser.getDocument(l_parser);
2160:
2161: ecx_utils.g_xmldoc := xmlDOM.makeNode(l_xml_doc);
2162:
2163: -- call transform_xml_with_xslt to do the transformation
2164: ecx_actions.transform_xml_with_xslt (i_xslt_file_name,
2165: i_version,
2164: ecx_actions.transform_xml_with_xslt (i_xslt_file_name,
2165: i_version,
2166: i_xslt_application_code
2167: );
2168: -- get the transformed xml from ecx_utils.g_xml_doc
2169: -- convert from DOMNode to clob and set it in original xmlfile
2170:
2171: /* Bug #2517237 : Trim the Clob before writing the transformed xml */
2172: dbms_lob.trim(i_xml_file, 0);
2170:
2171: /* Bug #2517237 : Trim the Clob before writing the transformed xml */
2172: dbms_lob.trim(i_xml_file, 0);
2173:
2174: xmlDOM.writeToClob(ecx_utils.g_xmldoc, i_xml_file);
2175:
2176: -- free all the used variables
2177: l_dtd_payload := null;
2178: xmlparser.freeParser(l_parser);
2175:
2176: -- free all the used variables
2177: l_dtd_payload := null;
2178: xmlparser.freeParser(l_parser);
2179: ecx_utils.g_xmldoc := null;
2180: ecx_utils.g_logdir := null;
2181: ecx_utils.g_logfile := null;
2182: if (not xmldom.isNull(l_xml_doc))
2183: then
2176: -- free all the used variables
2177: l_dtd_payload := null;
2178: xmlparser.freeParser(l_parser);
2179: ecx_utils.g_xmldoc := null;
2180: ecx_utils.g_logdir := null;
2181: ecx_utils.g_logfile := null;
2182: if (not xmldom.isNull(l_xml_doc))
2183: then
2184: xmldom.freeDocument(l_xml_doc);
2177: l_dtd_payload := null;
2178: xmlparser.freeParser(l_parser);
2179: ecx_utils.g_xmldoc := null;
2180: ecx_utils.g_logdir := null;
2181: ecx_utils.g_logfile := null;
2182: if (not xmldom.isNull(l_xml_doc))
2183: then
2184: xmldom.freeDocument(l_xml_doc);
2185: end if;
2187: i_retcode := 0;
2188: i_retmsg := ecx_debug.getTranslatedMessage('ECX_XSLT_TRANSFORMED');
2189:
2190: exception
2191: when ecx_utils.program_exit then
2192: i_retcode := ecx_utils.i_ret_code;
2193: i_retmsg := ecx_debug.getMessage(ecx_utils.i_errbuf,ecx_utils.i_errparams);
2194:
2195: -- free all the used variables
2188: i_retmsg := ecx_debug.getTranslatedMessage('ECX_XSLT_TRANSFORMED');
2189:
2190: exception
2191: when ecx_utils.program_exit then
2192: i_retcode := ecx_utils.i_ret_code;
2193: i_retmsg := ecx_debug.getMessage(ecx_utils.i_errbuf,ecx_utils.i_errparams);
2194:
2195: -- free all the used variables
2196: l_dtd_payload := null;
2189:
2190: exception
2191: when ecx_utils.program_exit then
2192: i_retcode := ecx_utils.i_ret_code;
2193: i_retmsg := ecx_debug.getMessage(ecx_utils.i_errbuf,ecx_utils.i_errparams);
2194:
2195: -- free all the used variables
2196: l_dtd_payload := null;
2197: xmlparser.freeParser(l_parser);
2194:
2195: -- free all the used variables
2196: l_dtd_payload := null;
2197: xmlparser.freeParser(l_parser);
2198: ecx_utils.g_xmldoc := null;
2199: ecx_utils.g_logdir := null;
2200: ecx_utils.g_logfile := null;
2201: ecx_utils.i_ret_code := 0;
2202: ecx_utils.i_errbuf := null;
2195: -- free all the used variables
2196: l_dtd_payload := null;
2197: xmlparser.freeParser(l_parser);
2198: ecx_utils.g_xmldoc := null;
2199: ecx_utils.g_logdir := null;
2200: ecx_utils.g_logfile := null;
2201: ecx_utils.i_ret_code := 0;
2202: ecx_utils.i_errbuf := null;
2203: ecx_utils.i_errparams := null;
2196: l_dtd_payload := null;
2197: xmlparser.freeParser(l_parser);
2198: ecx_utils.g_xmldoc := null;
2199: ecx_utils.g_logdir := null;
2200: ecx_utils.g_logfile := null;
2201: ecx_utils.i_ret_code := 0;
2202: ecx_utils.i_errbuf := null;
2203: ecx_utils.i_errparams := null;
2204: if (not xmldom.isNull(l_xml_doc))
2197: xmlparser.freeParser(l_parser);
2198: ecx_utils.g_xmldoc := null;
2199: ecx_utils.g_logdir := null;
2200: ecx_utils.g_logfile := null;
2201: ecx_utils.i_ret_code := 0;
2202: ecx_utils.i_errbuf := null;
2203: ecx_utils.i_errparams := null;
2204: if (not xmldom.isNull(l_xml_doc))
2205: then
2198: ecx_utils.g_xmldoc := null;
2199: ecx_utils.g_logdir := null;
2200: ecx_utils.g_logfile := null;
2201: ecx_utils.i_ret_code := 0;
2202: ecx_utils.i_errbuf := null;
2203: ecx_utils.i_errparams := null;
2204: if (not xmldom.isNull(l_xml_doc))
2205: then
2206: xmldom.freeDocument(l_xml_doc);
2199: ecx_utils.g_logdir := null;
2200: ecx_utils.g_logfile := null;
2201: ecx_utils.i_ret_code := 0;
2202: ecx_utils.i_errbuf := null;
2203: ecx_utils.i_errparams := null;
2204: if (not xmldom.isNull(l_xml_doc))
2205: then
2206: xmldom.freeDocument(l_xml_doc);
2207: end if;
2211:
2212: -- free all the used variables
2213: l_dtd_payload := null;
2214: xmlparser.freeParser(l_parser);
2215: ecx_utils.g_xmldoc := null;
2216: ecx_utils.g_logdir := null;
2217: ecx_utils.g_logfile := null;
2218: ecx_utils.i_ret_code := 0;
2219: ecx_utils.i_errbuf := null;
2212: -- free all the used variables
2213: l_dtd_payload := null;
2214: xmlparser.freeParser(l_parser);
2215: ecx_utils.g_xmldoc := null;
2216: ecx_utils.g_logdir := null;
2217: ecx_utils.g_logfile := null;
2218: ecx_utils.i_ret_code := 0;
2219: ecx_utils.i_errbuf := null;
2220: ecx_utils.i_errparams := null;
2213: l_dtd_payload := null;
2214: xmlparser.freeParser(l_parser);
2215: ecx_utils.g_xmldoc := null;
2216: ecx_utils.g_logdir := null;
2217: ecx_utils.g_logfile := null;
2218: ecx_utils.i_ret_code := 0;
2219: ecx_utils.i_errbuf := null;
2220: ecx_utils.i_errparams := null;
2221: if (not xmldom.isNull(l_xml_doc))
2214: xmlparser.freeParser(l_parser);
2215: ecx_utils.g_xmldoc := null;
2216: ecx_utils.g_logdir := null;
2217: ecx_utils.g_logfile := null;
2218: ecx_utils.i_ret_code := 0;
2219: ecx_utils.i_errbuf := null;
2220: ecx_utils.i_errparams := null;
2221: if (not xmldom.isNull(l_xml_doc))
2222: then
2215: ecx_utils.g_xmldoc := null;
2216: ecx_utils.g_logdir := null;
2217: ecx_utils.g_logfile := null;
2218: ecx_utils.i_ret_code := 0;
2219: ecx_utils.i_errbuf := null;
2220: ecx_utils.i_errparams := null;
2221: if (not xmldom.isNull(l_xml_doc))
2222: then
2223: xmldom.freeDocument(l_xml_doc);
2216: ecx_utils.g_logdir := null;
2217: ecx_utils.g_logfile := null;
2218: ecx_utils.i_ret_code := 0;
2219: ecx_utils.i_errbuf := null;
2220: ecx_utils.i_errparams := null;
2221: if (not xmldom.isNull(l_xml_doc))
2222: then
2223: xmldom.freeDocument(l_xml_doc);
2224: end if;