DBA Data[Home] [Help]

APPS.WF_EVENT_OJMSTEXT_QH dependencies on WF_EVENT

Line 1: package body wf_event_ojmstext_qh as

1: package body wf_event_ojmstext_qh as
2: /* $Header: wfjmstxb.pls 120.4.12020000.5 2013/04/09 17:15:14 skandepu ship $ */
3:
4: DATE_MASK constant varchar2(21) := 'YYYY/MM/DD HH24:MI:SS';
5: DEFAULT_PRIORITY constant int := 100;

Line 416: procedure serialize(p_event in wf_event_t,

412: --
413: -- p_event - the business event to transform
414: -- p_jms_text_message - the JMS Text Message
415: --------------------------------------------------------------------------------
416: procedure serialize(p_event in wf_event_t,
417: p_jms_text_message out nocopy sys.aq$_jms_text_message)
418: is
419: l_replyto varchar2(2000);
420: l_priority int;

Line 547: -- set the wf_event_t user-defined properties

543: if(p_event.getErrorStack() is not null) then
544: set_string_property(p_jms_text_message, ERROR_STACK, p_event.getErrorStack());
545: end if;
546:
547: -- set the wf_event_t user-defined properties
548:
549: l_parameter_list := p_event.getParameterList();
550:
551: if(l_parameter_list is not null and

Line 566: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'serialize',

562:
563: set_text(p_jms_text_message, p_event.getEventData());
564:
565: exception when others then
566: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'serialize',
567: 'SQL error is ' || substr(sqlerrm, 1, 200));
568: raise;
569: end serialize;
570:

Line 578: p_event out nocopy wf_event_t)

574: -- p_jms_text_message - the JMS Text Message
575: -- p_event - the business event
576: --------------------------------------------------------------------------------
577: procedure deserialize(p_jms_text_message in out nocopy sys.aq$_jms_text_message,
578: p_event out nocopy wf_event_t)
579: is
580: i1 integer;
581:
582: l_jms_agent varchar2(2000);

Line 595: p_event := wf_event_t(0, null, null, null, null, null, null, null, null,

591: l_boolean_value boolean;
592:
593: l_clob clob;
594: begin
595: p_event := wf_event_t(0, null, null, null, null, null, null, null, null,
596: null, null, null, null);
597:
598: if(p_jms_text_message.header.properties.count > 0) then
599: -- set the wf_event properties

Line 599: -- set the wf_event properties

595: p_event := wf_event_t(0, null, null, null, null, null, null, null, null,
596: null, null, null, null);
597:
598: if(p_jms_text_message.header.properties.count > 0) then
599: -- set the wf_event properties
600:
601: p_event.setEventName(get_string_property(p_jms_text_message, EVENT_NAME));
602: p_event.setEventKey(get_string_property(p_jms_text_message, EVENT_KEY));
603: p_event.setPriority(get_int_property(p_jms_text_message, PRIORITY));

Line 642: -- set the wf_event user-defined properties

638: p_event.setErrorSubscription(get_string_property(p_jms_text_message, ERROR_SUBSCRIPTION));
639: p_event.setErrorMessage(get_string_property(p_jms_text_message, ERROR_MESSAGE));
640: p_event.setErrorStack(get_string_property(p_jms_text_message, ERROR_STACK));
641:
642: -- set the wf_event user-defined properties
643:
644: l_jms_user_properties := p_jms_text_message.header.properties;
645:
646: if(l_jms_user_properties.count > 0) then

Line 759: procedure enqueue(p_event in wf_event_t,

755: --
756: -- p_event - the business event to enqueue
757: -- p_out_agent_override - the out agent override
758: --------------------------------------------------------------------------------
759: procedure enqueue(p_event in wf_event_t,
760: p_out_agent_override in wf_agent_t)
761: is
762: l_jms_text_message sys.aq$_jms_text_message;
763:

Line 809: WF_EVENT.Set_Recipient_List(p_event,

805: -- if there is a to queue, we need to set the recipient list address
806:
807: if((p_event.getToAgent() is not null) and
808: (l_out_agent_name <> 'WF_DEFERRED')) then
809: WF_EVENT.Set_Recipient_List(p_event,
810: l_out_agent_name ,
811: l_out_system_name,
812: l_message_properties);
813: end if;

Line 825: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay',

821:
822: if(p_event.getSendDate() > sysdate) then
823: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
824: wf_log_pkg.string(wf_log_pkg.level_statement,
825: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay',
826: 'Delay Detected');
827: end if;
828:
829: l_delay := (p_event.getSendDate() - sysdate)*24*60*60;

Line 833: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay_time',

829: l_delay := (p_event.getSendDate() - sysdate)*24*60*60;
830:
831: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
832: wf_log_pkg.string(wf_log_pkg.level_statement,
833: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay_time',
834: 'delay = ' || to_char(l_delay));
835: end if;
836:
837: if(l_delay > 1) then

Line 861: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay',

857: if (l_delay is not NULL) then
858:
859: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
860: wf_log_pkg.string(wf_log_pkg.level_statement,
861: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay',
862: 'Delay Detected');
863: wf_log_pkg.string(wf_log_pkg.level_statement,
864: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay_time',
865: 'delay = ' || to_char(l_delay));

Line 864: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay_time',

860: wf_log_pkg.string(wf_log_pkg.level_statement,
861: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay',
862: 'Delay Detected');
863: wf_log_pkg.string(wf_log_pkg.level_statement,
864: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.delay_time',
865: 'delay = ' || to_char(l_delay));
866: end if;
867:
868:

Line 890: if wf_event.account_name is null then

886: -- if we are enqueuing for an internal agent, must set the account name
887: -- into the correlation id
888: if (l_out_agent_name like 'WF_%'
889: or l_to_agent_name like 'WF_%') then
890: if wf_event.account_name is null then
891: wf_event.SetAccountName;
892: end if;
893: l_message_properties.correlation := wf_event.account_name;
894: end if;

Line 891: wf_event.SetAccountName;

887: -- into the correlation id
888: if (l_out_agent_name like 'WF_%'
889: or l_to_agent_name like 'WF_%') then
890: if wf_event.account_name is null then
891: wf_event.SetAccountName;
892: end if;
893: l_message_properties.correlation := wf_event.account_name;
894: end if;
895:

Line 893: l_message_properties.correlation := wf_event.account_name;

889: or l_to_agent_name like 'WF_%') then
890: if wf_event.account_name is null then
891: wf_event.SetAccountName;
892: end if;
893: l_message_properties.correlation := wf_event.account_name;
894: end if;
895:
896: IF ((l_out_agent_name = 'WF_JAVA_DEFERRED') OR
897: (l_to_agent_name = 'WF_JAVA_DEFERRED') OR

Line 918: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.dbms_aq',

914: END IF;
915:
916: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
917: wf_log_pkg.string(wf_log_pkg.level_statement,
918: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.dbms_aq',
919: 'Calling dbms_aq.enqueue');
920: end if;
921:
922: dbms_aq.enqueue(queue_name => l_out_queue_name,

Line 928: -- Storing the enqueue msgid, similar to that been done WF_EVENT_QH

924: message_properties => l_message_properties,
925: payload => l_jms_text_message,
926: msgid => l_msgid);
927:
928: -- Storing the enqueue msgid, similar to that been done WF_EVENT_QH
929: WF_EVENT.g_msgid := l_msgid;
930:
931: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
932: wf_log_pkg.string(wf_log_pkg.level_procedure,

Line 929: WF_EVENT.g_msgid := l_msgid;

925: payload => l_jms_text_message,
926: msgid => l_msgid);
927:
928: -- Storing the enqueue msgid, similar to that been done WF_EVENT_QH
929: WF_EVENT.g_msgid := l_msgid;
930:
931: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
932: wf_log_pkg.string(wf_log_pkg.level_procedure,
933: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.End',

Line 933: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.End',

929: WF_EVENT.g_msgid := l_msgid;
930:
931: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
932: wf_log_pkg.string(wf_log_pkg.level_procedure,
933: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.enqueue.End',
934: 'Finished calling dbms_aq.enqueue');
935: end if;
936:
937: exception

Line 939: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'enqueue', l_out_queue_name,

935: end if;
936:
937: exception
938: when others then
939: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'enqueue', l_out_queue_name,
940: 'SQL error is ' || substr(sqlerrm, 1, 200));
941: raise;
942: end enqueue;
943:

Line 953: p_event out nocopy wf_event_t,

949: -- p_wait - the number of seconds to wait to dequeue the event
950: --------------------------------------------------------------------------------
951:
952: procedure dequeue(p_agent_guid in raw,
953: p_event out nocopy wf_event_t,
954: p_wait in binary_integer)
955: is
956: l_queue_name varchar2(80);
957: l_agent_name varchar2(30);

Line 981: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.Begin',

977: where guid = p_agent_guid;
978:
979: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
980: wf_log_pkg.string(wf_log_pkg.level_procedure,
981: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.Begin',
982: 'Dequeuing '||l_queue_name||' on '||l_agent_name);
983: end if;
984:
985: -- Set correlation if the g_correlation is not null

Line 986: if (WF_EVENT.g_correlation is not null and WF_EVENT.g_correlation <> '%') then

982: 'Dequeuing '||l_queue_name||' on '||l_agent_name);
983: end if;
984:
985: -- Set correlation if the g_correlation is not null
986: if (WF_EVENT.g_correlation is not null and WF_EVENT.g_correlation <> '%') then
987:
988: -- If seeded agent, set the account name as the prefix of correlation.
989: if (l_agent_name like 'WF_%') then
990:

Line 991: if(wf_event.account_name is null) then

987:
988: -- If seeded agent, set the account name as the prefix of correlation.
989: if (l_agent_name like 'WF_%') then
990:
991: if(wf_event.account_name is null) then
992: wf_event.setAccountName();
993: end if;
994:
995: l_dequeue_options.correlation := wf_event.account_name || ':' ||WF_EVENT.g_correlation;

Line 992: wf_event.setAccountName();

988: -- If seeded agent, set the account name as the prefix of correlation.
989: if (l_agent_name like 'WF_%') then
990:
991: if(wf_event.account_name is null) then
992: wf_event.setAccountName();
993: end if;
994:
995: l_dequeue_options.correlation := wf_event.account_name || ':' ||WF_EVENT.g_correlation;
996:

Line 995: l_dequeue_options.correlation := wf_event.account_name || ':' ||WF_EVENT.g_correlation;

991: if(wf_event.account_name is null) then
992: wf_event.setAccountName();
993: end if;
994:
995: l_dequeue_options.correlation := wf_event.account_name || ':' ||WF_EVENT.g_correlation;
996:
997: else
998: l_dequeue_options.correlation := WF_EVENT.g_correlation;
999: end if;

Line 998: l_dequeue_options.correlation := WF_EVENT.g_correlation;

994:
995: l_dequeue_options.correlation := wf_event.account_name || ':' ||WF_EVENT.g_correlation;
996:
997: else
998: l_dequeue_options.correlation := WF_EVENT.g_correlation;
999: end if;
1000:
1001: -- ER 16593551: If standard component is dequeuing the messages, set the dequeue condition
1002: -- as a PLSQL function that evaluates the condition based on the message corrId and dedicated

Line 1006: if (wf_event.account_name is null) then

1002: -- as a PLSQL function that evaluates the condition based on the message corrId and dedicated
1003: -- components correlation Id list and returns 0 or 1
1004: elsif (l_agent_name = 'WF_JAVA_DEFERRED' or l_agent_name = 'WF_NOTIFICATION_OUT') then
1005:
1006: if (wf_event.account_name is null) then
1007: wf_event.SetAccountName;
1008: end if;
1009:
1010: l_dequeue_options.correlation := null;

Line 1007: wf_event.SetAccountName;

1003: -- components correlation Id list and returns 0 or 1
1004: elsif (l_agent_name = 'WF_JAVA_DEFERRED' or l_agent_name = 'WF_NOTIFICATION_OUT') then
1005:
1006: if (wf_event.account_name is null) then
1007: wf_event.SetAccountName;
1008: end if;
1009:
1010: l_dequeue_options.correlation := null;
1011: -- Get the dedicated components correlation Id list

Line 1012: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(l_agent_name, wf_event.account_name);

1008: end if;
1009:
1010: l_dequeue_options.correlation := null;
1011: -- Get the dedicated components correlation Id list
1012: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(l_agent_name, wf_event.account_name);
1013:
1014: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1015: wf_log_pkg.string(wf_log_pkg.level_statement,
1016: 'wf.plsql.WF_EVENT_QH.dequeue.corr',

Line 1016: 'wf.plsql.WF_EVENT_QH.dequeue.corr',

1012: l_corrId_list := WF_CORE.getDedicatedComponentsCorrIds(l_agent_name, wf_event.account_name);
1013:
1014: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1015: wf_log_pkg.string(wf_log_pkg.level_statement,
1016: 'wf.plsql.WF_EVENT_QH.dequeue.corr',
1017: 'The dedicated components correlation ids list is:' || l_corrId_list);
1018: end if;
1019:
1020: if(l_corrId_list is not null) then

Line 1029: if (wf_event.g_correlation is not null) then

1025:
1026: end if;
1027:
1028: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1029: if (wf_event.g_correlation is not null) then
1030: wf_log_pkg.string(wf_log_pkg.level_procedure,
1031: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',
1032: 'Dequeuing with Correlation:' || l_dequeue_options.correlation);
1033: else

Line 1031: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',

1027:
1028: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1029: if (wf_event.g_correlation is not null) then
1030: wf_log_pkg.string(wf_log_pkg.level_procedure,
1031: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',
1032: 'Dequeuing with Correlation:' || l_dequeue_options.correlation);
1033: else
1034: wf_log_pkg.string(wf_log_pkg.level_procedure,
1035: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',

Line 1035: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',

1031: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',
1032: 'Dequeuing with Correlation:' || l_dequeue_options.correlation);
1033: else
1034: wf_log_pkg.string(wf_log_pkg.level_procedure,
1035: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corrid',
1036: 'Dequeuing with dequeue condition:' || l_dequeue_options.deq_condition);
1037: end if;
1038: end if;
1039:

Line 1043: l_dequeue_options.navigation := wf_event.getQueueNavigation;

1039:
1040: -- set the dequeue options
1041: l_dequeue_options.consumer_name := l_agent_name;
1042: l_dequeue_options.wait := p_wait;
1043: l_dequeue_options.navigation := wf_event.getQueueNavigation;
1044:
1045: begin
1046: dbms_aq.dequeue(queue_name => l_queue_name,
1047: dequeue_options => l_dequeue_options,

Line 1056: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.queue_empty',

1052: exception
1053: when no_messages then
1054: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
1055: wf_log_pkg.string(wf_log_pkg.level_event,
1056: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.queue_empty',
1057: 'No more messages in dequeue.');
1058: end if;
1059:
1060: -- reset navigation

Line 1061: wf_event.resetNavigationParams;

1057: 'No more messages in dequeue.');
1058: end if;
1059:
1060: -- reset navigation
1061: wf_event.resetNavigationParams;
1062: p_event := null;
1063:
1064: return;
1065: --Capture the snapshot too old error

Line 1068: wf_event.resetNavigationParams;

1064: return;
1065: --Capture the snapshot too old error
1066: when snap_too_old then
1067: -- reset navigation
1068: wf_event.resetNavigationParams;
1069: l_dequeue_options.navigation := wf_event.getQueueNavigation;
1070: dbms_aq.dequeue(queue_name => l_queue_name,
1071: dequeue_options => l_dequeue_options,
1072: message_properties => l_message_properties, -- out

Line 1069: l_dequeue_options.navigation := wf_event.getQueueNavigation;

1065: --Capture the snapshot too old error
1066: when snap_too_old then
1067: -- reset navigation
1068: wf_event.resetNavigationParams;
1069: l_dequeue_options.navigation := wf_event.getQueueNavigation;
1070: dbms_aq.dequeue(queue_name => l_queue_name,
1071: dequeue_options => l_dequeue_options,
1072: message_properties => l_message_properties, -- out
1073: payload => l_jms_text_message, -- out

Line 1077: wf_event.resetNavigationParams;

1073: payload => l_jms_text_message, -- out
1074: msgid => l_msgid); -- out
1075:
1076: when others then
1077: wf_event.resetNavigationParams;
1078: raise;
1079: end;
1080:
1081: deserialize(l_jms_text_message, p_event);

Line 1095: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.End',

1091: p_event.addparametertolist('#MSG_ID', l_msgid);
1092:
1093: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1094: wf_log_pkg.string(wf_log_pkg.level_procedure,
1095: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.End',
1096: 'Finished');
1097: end if;
1098:
1099: exception

Line 1101: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'Dequeue', l_queue_name,

1097: end if;
1098:
1099: exception
1100: when others then
1101: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'Dequeue', l_queue_name,
1102: 'SQL error is ' || substr(sqlerrm, 1, 200));
1103: raise;
1104: end dequeue;
1105:

Line 1106: end wf_event_ojmstext_qh;

1102: 'SQL error is ' || substr(sqlerrm, 1, 200));
1103: raise;
1104: end dequeue;
1105:
1106: end wf_event_ojmstext_qh;