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.2.12000000.2 2007/07/03 03:59:57 sstomar 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 980: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.Begin',

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

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

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

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

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

Line 991: wf_event.setAccountName();

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

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

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

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

993:
994: l_dequeue_options.correlation := wf_event.account_name || ':' ||WF_EVENT.g_correlation;
995:
996: else
997: l_dequeue_options.correlation := WF_EVENT.g_correlation;
998: end if;
999:
1000: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1001: wf_log_pkg.string(wf_log_pkg.level_statement,

Line 1002: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corr',

998: end if;
999:
1000: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1001: wf_log_pkg.string(wf_log_pkg.level_statement,
1002: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.corr',
1003: 'Setting correlation: ' || l_dequeue_options.correlation);
1004: end if;
1005:
1006: END IF;

Line 1011: l_dequeue_options.navigation := wf_event.navigation;

1007: -- set the dequeue options
1008:
1009: l_dequeue_options.consumer_name := l_agent_name;
1010: l_dequeue_options.wait := p_wait;
1011: l_dequeue_options.navigation := wf_event.navigation;
1012: -- l_dequeue_options.navigation := dbms_aq.FIRST_MESSAGE;
1013:
1014: begin
1015: dbms_aq.dequeue(queue_name => l_queue_name,

Line 1021: wf_event.navigation := dbms_aq.next_message;

1017: message_properties => l_message_properties, -- out
1018: payload => l_jms_text_message, -- out
1019: msgid => l_msgid); -- out
1020:
1021: wf_event.navigation := dbms_aq.next_message;
1022: exception
1023: when no_messages then
1024: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
1025: wf_log_pkg.string(wf_log_pkg.level_event,

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

1022: exception
1023: when no_messages then
1024: if (wf_log_pkg.level_event >= fnd_log.g_current_runtime_level) then
1025: wf_log_pkg.string(wf_log_pkg.level_event,
1026: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.queue_empty',
1027: 'No more messages in dequeue.');
1028: end if;
1029:
1030: wf_event.navigation := dbms_aq.first_message;

Line 1030: wf_event.navigation := dbms_aq.first_message;

1026: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.queue_empty',
1027: 'No more messages in dequeue.');
1028: end if;
1029:
1030: wf_event.navigation := dbms_aq.first_message;
1031: p_event := null;
1032:
1033: return;
1034: --Capture the snapshot too old error

Line 1039: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then

1035: when snap_too_old then
1036: --Workaround for AQ when receiving ORA-01555 using NEXT_MESSAGE as
1037: --navigation. We will try to set to FIRST_MESSAGE and dequeue to
1038: --silently handle this exception.
1039: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then
1040: raise;
1041: else
1042: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
1043: l_dequeue_options.navigation := wf_event.navigation;

Line 1042: wf_event.navigation := dbms_aq.FIRST_MESSAGE;

1038: --silently handle this exception.
1039: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then
1040: raise;
1041: else
1042: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
1043: l_dequeue_options.navigation := wf_event.navigation;
1044: dbms_aq.dequeue(queue_name => l_queue_name,
1045: dequeue_options => l_dequeue_options,
1046: message_properties => l_message_properties, -- out

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

1039: if (wf_event.navigation = dbms_aq.FIRST_MESSAGE) then
1040: raise;
1041: else
1042: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
1043: l_dequeue_options.navigation := wf_event.navigation;
1044: dbms_aq.dequeue(queue_name => l_queue_name,
1045: dequeue_options => l_dequeue_options,
1046: message_properties => l_message_properties, -- out
1047: payload => l_jms_text_message, -- out

Line 1051: wf_event.navigation := dbms_aq.next_message;

1047: payload => l_jms_text_message, -- out
1048: msgid => l_msgid); -- out
1049:
1050: --Set the navigation now to the next message
1051: wf_event.navigation := dbms_aq.next_message;
1052: end if;
1053: when others then
1054: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
1055: raise;

Line 1054: wf_event.navigation := dbms_aq.FIRST_MESSAGE;

1050: --Set the navigation now to the next message
1051: wf_event.navigation := dbms_aq.next_message;
1052: end if;
1053: when others then
1054: wf_event.navigation := dbms_aq.FIRST_MESSAGE;
1055: raise;
1056: end;
1057:
1058: deserialize(l_jms_text_message, p_event);

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

1068: p_event.addparametertolist('#MSG_ID', l_msgid);
1069:
1070: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1071: wf_log_pkg.string(wf_log_pkg.level_procedure,
1072: 'wf.plsql.WF_EVENT_OJMSTEXT_QH.dequeue.End',
1073: 'Finished');
1074: end if;
1075:
1076: exception

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

1074: end if;
1075:
1076: exception
1077: when others then
1078: wf_core.context('WF_EVENT_OJMSTEXT_QH', 'Dequeue', l_queue_name,
1079: 'SQL error is ' || substr(sqlerrm, 1, 200));
1080: raise;
1081: end dequeue;
1082:

Line 1083: end wf_event_ojmstext_qh;

1079: 'SQL error is ' || substr(sqlerrm, 1, 200));
1080: raise;
1081: end dequeue;
1082:
1083: end wf_event_ojmstext_qh;