DBA Data[Home] [Help]

APPS.WF_BES_CACHE dependencies on WF_BES_CACHE

Line 1: package body WF_BES_CACHE as

1: package body WF_BES_CACHE as
2: /* $Header: WFBECACB.pls 120.7.12020000.2 2012/10/30 13:14:25 alsosa ship $ */
3:
4: /*---------+
5: | Globals |

Line 84: wf_core.context('WF_BES_CACHE', 'MetaDataUploaded');

80: value => to_char(sysdate, g_date_mask),
81: client_id => l_username);
82: exception
83: when others then
84: wf_core.context('WF_BES_CACHE', 'MetaDataUploaded');
85: raise;
86: end SetMetaDataUploaded;
87:
88: -- GetMetaDataUploaded (PRIVATE)

Line 100: wf_core.context('WF_BES_CACHE', 'GetMetaDataUploaded');

96: l_value := sys_context('WFBES_CACHE_CTX', 'WFBES_METADATA_UPLOADED');
97: return to_date(l_value, g_date_mask);
98: exception
99: when others then
100: wf_core.context('WF_BES_CACHE', 'GetMetaDataUploaded');
101: raise;
102: end GetMetaDataUploaded;
103:
104: -- SetMetaDataCached (PRIVATE)

Line 134: 'wf.plsql.WF_BES_CACHE.CacheValid.Check',

130: l_lastMetaUpload := GetMetaDataUploaded();
131:
132: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
133: wf_log_pkg.string(wf_log_pkg.level_statement,
134: 'wf.plsql.WF_BES_CACHE.CacheValid.Check',
135: 'Last upload time {'||to_char(l_lastMetaUpload, g_date_mask)||
136: '} Last cache time {'||to_char(g_LastCacheUpdate, g_date_mask)||'}');
137: end if;
138:

Line 166: 'wf.plsql.WF_BES_CACHE.ValidateCache.Cache_Invalid',

162: -- if cache is invalid, clear it so that it can be rebuilt from database
163: if (not CacheValid()) then
164: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
165: wf_log_pkg.string(wf_log_pkg.level_statement,
166: 'wf.plsql.WF_BES_CACHE.ValidateCache.Cache_Invalid',
167: 'Cache is invalid. Clearing the cache');
168: end if;
169: ClearCache();
170: end if;

Line 234: 'wf.plsql.WF_BES_CACHE.Load_Event.Not_Found',

230: p_event_obj.java_generate_func, p_event_obj.licensed_flag;
231: if (c_get_event%NOTFOUND) then
232: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
233: wf_log_pkg.string(wf_log_pkg.level_statement,
234: 'wf.plsql.WF_BES_CACHE.Load_Event.Not_Found',
235: 'Event {'||p_event_name||'} not found in the database');
236: end if;
237: -- If event not found in the set wf_event_obj to null
238: p_event_obj := null;

Line 286: and system_guid = wf_bes_cache.g_local_system_guid

282: and subscription_source_type = cp_source_type
283: and ((subscription_source_agent_guid is NOT NULL AND
284: subscription_source_agent_guid = nvl(cp_source_agent_guid, subscription_source_agent_guid))
285: OR subscription_source_agent_guid is NULL)
286: and system_guid = wf_bes_cache.g_local_system_guid
287: order by 5;
288:
289: cursor active_event_subs(cp_event_name varchar2,
290: cp_source_type varchar2,

Line 340: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.Check',

336: -- Check if subscriptions are already loaded for this source type
337: if (upper(p_event_obj.GetSubsLoaded(p_source_type)) = g_status_yes) then
338: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
339: wf_log_pkg.string(wf_log_pkg.level_statement,
340: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.Check',
341: p_source_type||' subscriptions for event {'||
342: p_event_name||'} are already loaded.');
343: end if;
344: return;

Line 355: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.active_event_subs',

351: if (lower(p_event_name) in (g_event_unexpected, g_event_any)) then
352: open active_event_subs(p_event_name, p_source_type, p_source_agent);
353: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
354: wf_log_pkg.string(wf_log_pkg.level_procedure,
355: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.active_event_subs',
356: 'Using cursor active_event_subs for event {'||p_event_name||'}');
357: end if;
358:
359: loop

Line 398: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.active_subs',

394: else
395: open active_subs(p_event_name, p_source_type, p_source_agent);
396: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
397: wf_log_pkg.string(wf_log_pkg.level_procedure,
398: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.active_subs',
399: 'Using cursor active_subs for event {'||p_event_name||'}');
400: end if;
401:
402: loop

Line 441: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.End',

437: end if;
438:
439: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
440: wf_log_pkg.string(wf_log_pkg.level_procedure,
441: 'wf.plsql.WF_BES_CACHE.Load_Subscriptions.End',
442: 'Loaded {'||l_count||'} '||p_source_type||' subscriptions '||
443: 'for event {'||p_event_name||'}');
444: end if;
445:

Line 466: 'wf.plsql.WF_BES_CACHE.GetEventByName.Begin',

462: l_dummy pls_integer;
463: begin
464: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
465: wf_log_pkg.string(wf_log_pkg.level_procedure,
466: 'wf.plsql.WF_BES_CACHE.GetEventByName.Begin',
467: 'Getting event details for {'||p_event_name||'}');
468: end if;
469:
470: l_event_obj := null;

Line 483: 'wf.plsql.WF_BES_CACHE.GetEventByName.Create_Cache',

479: -- the session
480: if (not wf_object_cache.IsCacheCreated(g_Event_Idx)) then
481: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
482: wf_log_pkg.string(wf_log_pkg.level_statement,
483: 'wf.plsql.WF_BES_CACHE.GetEventByName.Create_Cache',
484: 'Cache is not created for EVENTS index {'||g_Event_Idx||'}');
485: end if;
486: wf_object_cache.CreateCache(g_Event_Idx);
487: SetMetaDataCached(sysdate);

Line 491: 'wf.plsql.WF_BES_CACHE.GetEventByName.Cache_Get',

487: SetMetaDataCached(sysdate);
488: else
489: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
490: wf_log_pkg.string(wf_log_pkg.level_statement,
491: 'wf.plsql.WF_BES_CACHE.GetEventByName.Cache_Get',
492: 'Getting the event from Cache');
493: end if;
494: Get_Event_Object(p_event_name, l_event_obj);
495: end if;

Line 502: 'wf.plsql.WF_BES_CACHE.GetEventByName.Load_Event',

498: -- retrieve the details from the database
499: if (l_event_obj is null) then
500: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
501: wf_log_pkg.string(wf_log_pkg.level_statement,
502: 'wf.plsql.WF_BES_CACHE.GetEventByName.Load_Event',
503: 'Event not found in cache. Loading from Database');
504: end if;
505: -- Load event from the database to the object
506: Load_Event(p_event_name, l_event_obj);

Line 511: 'wf.plsql.WF_BES_CACHE.GetEventByName.Set_Cache',

507:
508: if (l_event_obj is not null) then
509: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
510: wf_log_pkg.string(wf_log_pkg.level_statement,
511: 'wf.plsql.WF_BES_CACHE.GetEventByName.Set_Cache',
512: 'Setting event {'||p_event_name||'} to cache');
513: end if;
514: Set_Event_Object(p_event_name, l_event_obj);
515: end if;

Line 529: wf_core.context('WF_BES_CACHE', 'GetEventByName', p_event_name);

525: end if;
526:
527: exception
528: when others then
529: wf_core.context('WF_BES_CACHE', 'GetEventByName', p_event_name);
530: raise;
531: end GetEventByName;
532:
533: -- GetSubscriptions

Line 548: 'wf.plsql.WF_BES_CACHE.GetSubscriptions.Begin',

544: l_subs_count number;
545: begin
546: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
547: wf_log_pkg.string(wf_log_pkg.level_procedure,
548: 'wf.plsql.WF_BES_CACHE.GetSubscriptions.Begin',
549: 'Getting subscriptions for event {'||p_event_name||'}'||
550: ' Source Type {'||p_source_type||'} Source Agt {'||p_source_agent||'}');
551: end if;
552:

Line 566: 'wf.plsql.WF_BES_CACHE.GetSubscriptions.Load_Subs',

562: if (upper(l_event_obj.GetSubsLoaded(p_source_type)) = g_status_no) then
563:
564: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
565: wf_log_pkg.string(wf_log_pkg.level_statement,
566: 'wf.plsql.WF_BES_CACHE.GetSubscriptions.Load_Subs',
567: 'Subscriptions for {'||p_event_name||'} is not already loaded.'||
568: ' Loading from DB for Source Type {'||p_source_type||
569: '} Source Agt {'||p_source_agent||'}');
570: end if;

Line 583: 'wf.plsql.WF_BES_CACHE.GetSubscriptions.Subs_Loaded',

579: Set_Event_Object(p_event_name, l_event_obj);
580: else
581: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
582: wf_log_pkg.string(wf_log_pkg.level_statement,
583: 'wf.plsql.WF_BES_CACHE.GetSubscriptions.Subs_Loaded',
584: 'Subscriptions for {'||p_event_name||'} is already loaded to cache');
585: end if;
586: end if;
587:

Line 599: wf_core.context('WF_BES_CACHE', 'GetSubscriptions', p_event_name, p_source_type);

595: return l_event_obj.GetSubscriptionList(p_source_type);
596: end if;
597: exception
598: when others then
599: wf_core.context('WF_BES_CACHE', 'GetSubscriptions', p_event_name, p_source_type);
600: raise;
601: end GetSubscriptions;
602:
603: -- GetSubscriptionByGUID

Line 619: l_event_obj := wf_bes_cache.GetEventByName(p_event_name);

615: if (p_event_name is null or p_sub_guid is null) then
616: return null;
617: end if;
618:
619: l_event_obj := wf_bes_cache.GetEventByName(p_event_name);
620:
621: if (l_event_obj is null) then
622: return null;
623: end if;

Line 648: wf_core.context('WF_BES_CACHE', 'GetSubscriptionByGUID', p_event_name, p_sub_guid);

644:
645: return l_event_obj.GetSubscriptionByGUID(p_sub_guid);
646: exception
647: when others then
648: wf_core.context('WF_BES_CACHE', 'GetSubscriptionByGUID', p_event_name, p_sub_guid);
649: raise;
650: end GetSubscriptionByGUID;
651:
652: --

Line 726: 'wf.plsql.WF_BES_CACHE.Load_Agent.Cursor',

722:
723: if (p_agent_name is not null and p_system_name is not null) then
724: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
725: wf_log_pkg.string(wf_log_pkg.level_statement,
726: 'wf.plsql.WF_BES_CACHE.Load_Agent.Cursor',
727: 'Loading agent by name '||p_agent_name||'+'||p_system_name);
728: end if;
729: open c_get_agent_n(p_agent_name, p_system_name);
730: fetch c_get_agent_n into p_agent_obj.GUID,

Line 747: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',

743:
744: if (c_get_agent_n%NOTFOUND) then
745: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
746: wf_log_pkg.string(wf_log_pkg.level_statement,
747: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',
748: 'Agent not found in the database.');
749: end if;
750: -- If agent not found in the set wf_agent_obj to null
751: p_agent_obj := null;

Line 757: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',

753: close c_get_agent_n;
754: elsif (p_agent_guid is not null) then
755: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
756: wf_log_pkg.string(wf_log_pkg.level_statement,
757: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',
758: 'Loading agent by GUID '||p_agent_guid);
759: end if;
760: open c_get_agent_g(p_agent_guid);
761: fetch c_get_agent_g into p_agent_obj.GUID,

Line 778: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',

774:
775: if (c_get_agent_g%NOTFOUND) then
776: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
777: wf_log_pkg.string(wf_log_pkg.level_statement,
778: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',
779: 'Agent not found in the database');
780: end if;
781: -- If agent not found in the set wf_agent_obj to null
782: p_agent_obj := null;

Line 821: 'wf.plsql.WF_BES_CACHE.Load_Agent_QH.Cursor',

817: end if;
818:
819: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
820: wf_log_pkg.string(wf_log_pkg.level_statement,
821: 'wf.plsql.WF_BES_CACHE.Load_Agent_QH.Cursor',
822: 'Loading from DB for Queue Handler '||p_agent_qh);
823: end if;
824:
825: open c_get_agent(p_agent_qh, p_direction);

Line 843: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',

839:
840: if (c_get_agent%NOTFOUND) then
841: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
842: wf_log_pkg.string(wf_log_pkg.level_statement,
843: 'wf.plsql.WF_BES_CACHE.Load_Agent.Not_Found',
844: 'No Agent exists for the given queue handler');
845: end if;
846: -- If agent not found in the set wf_agent_obj to null
847: p_agent_obj := null;

Line 869: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Begin',

865: l_system_name varchar2(30);
866: begin
867: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
868: wf_log_pkg.string(wf_log_pkg.level_procedure,
869: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Begin',
870: 'Getting agent details for {'||p_agent_name||
871: '+'||p_system_name||'}');
872: end if;
873:

Line 900: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Create_Cache',

896: -- the session
897: if (not wf_object_cache.IsCacheCreated(g_Agent_Idx)) then
898: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
899: wf_log_pkg.string(wf_log_pkg.level_statement,
900: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Create_Cache',
901: 'Cache is not created for AGENTS index {'||g_Agent_Idx||'}');
902: end if;
903: wf_object_cache.CreateCache(g_Agent_Idx);
904: SetMetaDataCached(sysdate);

Line 908: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Cache_Get',

904: SetMetaDataCached(sysdate);
905: else
906: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
907: wf_log_pkg.string(wf_log_pkg.level_statement,
908: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Cache_Get',
909: 'Getting the Agent from Cache');
910: end if;
911: Get_Agent_Object(l_agent_key, l_agent_obj);
912: end if;

Line 919: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Load_Agent',

915: -- retrieve the details from the database
916: if (l_agent_obj is null) then
917: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
918: wf_log_pkg.string(wf_log_pkg.level_statement,
919: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Load_Agent',
920: 'Agent not found in cache. Loading from Database');
921: end if;
922: -- Load agent from the database to the object
923:

Line 929: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Set_Cache',

925:
926: if (l_agent_obj is not null) then
927: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
928: wf_log_pkg.string(wf_log_pkg.level_statement,
929: 'wf.plsql.WF_BES_CACHE.GetAgentByName.Set_Cache',
930: 'Setting Agent {'||l_agent_key||'} to cache');
931: end if;
932: Set_Agent_Object(l_agent_key, l_agent_obj);
933: end if;

Line 973: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Create_Cache',

969: -- check if the Agent cache is created. if created get all agent objects
970: if (not wf_object_cache.IsCacheCreated(g_Agent_Idx)) then
971: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
972: wf_log_pkg.string(wf_log_pkg.level_statement,
973: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Create_Cache',
974: 'Cache is not created for AGENTS index {'||g_Agent_Idx||'}');
975: end if;
976: wf_object_cache.CreateCache(g_Agent_Idx);
977: SetMetaDataCached(sysdate);

Line 981: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Get_All',

977: SetMetaDataCached(sysdate);
978: else
979: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
980: wf_log_pkg.string(wf_log_pkg.level_statement,
981: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Get_All',
982: 'Getting all cached agent objects');
983: end if;
984: l_all_agents := wf_object_cache.GetAllObjects(g_Agent_Idx);
985: end if;

Line 1005: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Cache_Hit',

1001:
1002: if (l_found) then
1003: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1004: wf_log_pkg.string(wf_log_pkg.level_statement,
1005: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Cache_Hit',
1006: 'Agent found in cache for GUID '||p_agent_guid);
1007: end if;
1008: return l_agent_obj;
1009: end if;

Line 1022: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Set_Object',

1018: l_system_name := l_agent_obj.SYSTEM_NAME;
1019: l_agent_key := l_agent_name||l_system_name;
1020: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1021: wf_log_pkg.string(wf_log_pkg.level_statement,
1022: 'wf.plsql.WF_BES_CACHE.GetAgentByGUID.Set_Object',
1023: 'Agent loaded from Database for GUID '||p_agent_guid||
1024: '. Setting to cache for '||l_agent_key);
1025: end if;
1026: Set_Agent_Object(l_agent_key, l_agent_obj);

Line 1032: wf_core.context('WF_BES_CACHE', 'GetAgentByGUID', p_agent_guid);

1028: return l_agent_obj;
1029:
1030: exception
1031: when others then
1032: wf_core.context('WF_BES_CACHE', 'GetAgentByGUID', p_agent_guid);
1033: raise;
1034: end GetAgentByGUID;
1035:
1036: -- GetAgentByQH

Line 1070: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Create_Cache',

1066: -- check if the Agent cache is created. if created get all agent objects
1067: if (not wf_object_cache.IsCacheCreated(g_Agent_Idx)) then
1068: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1069: wf_log_pkg.string(wf_log_pkg.level_statement,
1070: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Create_Cache',
1071: 'Cache is not created for AGENTS index {'||g_Agent_Idx||'}');
1072: end if;
1073: wf_object_cache.CreateCache(g_Agent_Idx);
1074: SetMetaDataCached(sysdate);

Line 1078: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Get_All',

1074: SetMetaDataCached(sysdate);
1075: else
1076: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1077: wf_log_pkg.string(wf_log_pkg.level_statement,
1078: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Get_All',
1079: 'Getting all cached agent objects');
1080: end if;
1081: l_all_agents := wf_object_cache.GetAllObjects(g_Agent_Idx);
1082: end if;

Line 1103: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Cache_Hit',

1099:
1100: if (l_found) then
1101: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1102: wf_log_pkg.string(wf_log_pkg.level_statement,
1103: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Cache_Hit',
1104: 'Agent found in cache for Queue Handler '||p_agent_qh);
1105: end if;
1106: return l_agent_obj;
1107: end if;

Line 1120: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Set_Object',

1116: l_system_name := l_agent_obj.SYSTEM_NAME;
1117: l_agent_key := l_agent_name||l_system_name;
1118: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1119: wf_log_pkg.string(wf_log_pkg.level_statement,
1120: 'wf.plsql.WF_BES_CACHE.GetAgentByQH.Set_Object',
1121: 'Agent loaded from Database for Queue Hander '||p_agent_qh||
1122: '. Setting to cache for '||l_agent_key);
1123: end if;
1124: Set_Agent_Object(l_agent_key, l_agent_obj);

Line 1130: wf_core.context('WF_BES_CACHE', 'GetAgentByQH', p_agent_qh, p_direction);

1126: return l_agent_obj;
1127:
1128: exception
1129: when others then
1130: wf_core.context('WF_BES_CACHE', 'GetAgentByQH', p_agent_qh, p_direction);
1131: raise;
1132: end GetAgentByQH;
1133:
1134: --

Line 1148: end WF_BES_CACHE;

1144: begin
1145: return null;
1146: end GetSystemByName;
1147:
1148: end WF_BES_CACHE;