1: package body WF_EVENT_SYNCHRONIZE_PKG as
2: /* $Header: WFEVSYNB.pls 120.7 2011/03/01 16:41:59 alsosa ship $ */
3: ------------------------------------------------------------------------------
4: /*
5: ** PRIVATE global variable
34: l_result varchar2(100);
35: begin
36:
37: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
38: wf_event_synchronize_pkg.CreateSyncClob(p_eventdata => l_clob);
39:
40: p_event.SetEventData(l_clob);
41:
42: l_result := wf_rule.default_rule(p_subscription_guid, p_event);
44: return (l_result);
45:
46: exception
47: when others then
48: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SYNCHRONIZE', p_event.event_name,
49: p_event.event_key,
50: 'ERROR'); raise;
51: return('ERROR');
52: end;
64:
65: l_result varchar2(100);
66: begin
67:
68: wf_event_synchronize_pkg.uploadsyncclob(p_event.event_data);
69:
70: l_result := wf_rule.default_rule(p_subscription_guid, p_event);
71:
72: return (l_result);
72: return (l_result);
73:
74: exception
75: when others then
76: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SYNCHRONIZEUPLOAD', p_event.event_name,
77: p_event.event_key,
78: 'ERROR'); raise;
79: return('ERROR');
80: end;
100: g_objecttype := upper(p_objecttype);
101:
102: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
103: wf_log_pkg.string(wf_log_pkg.level_procedure,
104: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATESYNCCLOB.Begin',
105: 'Entered Create Sync Clob');
106: end if;
107:
108: IF (p_isexactnum = 1) THEN
126: -- Files.
127: IF g_objecttype in ('SYSTEMS', 'AGENTS', 'AGENTGROUPS') THEN
128: -- Systems, Agents, Agent Groups in one file
129: dbms_lob.append(p_eventdata,
130: wf_event_synchronize_pkg.GetSystems(l_ObjectKey));
131: dbms_lob.append(p_eventdata,
132: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
133: dbms_lob.append(p_eventdata,
134: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
128: -- Systems, Agents, Agent Groups in one file
129: dbms_lob.append(p_eventdata,
130: wf_event_synchronize_pkg.GetSystems(l_ObjectKey));
131: dbms_lob.append(p_eventdata,
132: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
133: dbms_lob.append(p_eventdata,
134: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
135: ELSIF g_objecttype = 'EVENTS' THEN
136: -- Download event and event groups
130: wf_event_synchronize_pkg.GetSystems(l_ObjectKey));
131: dbms_lob.append(p_eventdata,
132: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
133: dbms_lob.append(p_eventdata,
134: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
135: ELSIF g_objecttype = 'EVENTS' THEN
136: -- Download event and event groups
137: dbms_lob.append(p_eventdata,
138: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
134: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
135: ELSIF g_objecttype = 'EVENTS' THEN
136: -- Download event and event groups
137: dbms_lob.append(p_eventdata,
138: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
139:
140: dbms_lob.append(p_eventdata,
141: wf_event_synchronize_pkg.GetEventGroups(
142: l_ObjectKey,p_ownertag));
137: dbms_lob.append(p_eventdata,
138: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
139:
140: dbms_lob.append(p_eventdata,
141: wf_event_synchronize_pkg.GetEventGroups(
142: l_ObjectKey,p_ownertag));
143: ELSIF g_objecttype = 'EVENT_GROUPS' THEN
144: -- Download event groups
145: dbms_lob.append(p_eventdata,
142: l_ObjectKey,p_ownertag));
143: ELSIF g_objecttype = 'EVENT_GROUPS' THEN
144: -- Download event groups
145: dbms_lob.append(p_eventdata,
146: wf_event_synchronize_pkg.GetGroups(l_ObjectKey, p_ownertag));
147:
148: -- EVENT_GROUPS option now downloads only GROUP type objects. Not members
149: -- dbms_lob.append(p_eventdata,
150: -- wf_event_synchronize_pkg.GetEventGroupByGroup(l_ObjectKey,p_ownertag));
146: wf_event_synchronize_pkg.GetGroups(l_ObjectKey, p_ownertag));
147:
148: -- EVENT_GROUPS option now downloads only GROUP type objects. Not members
149: -- dbms_lob.append(p_eventdata,
150: -- wf_event_synchronize_pkg.GetEventGroupByGroup(l_ObjectKey,p_ownertag));
151: ELSIF g_objecttype = 'SUBSCRIPTIONS' THEN
152: -- Download subscriptions in one file
153: dbms_lob.append(p_eventdata,
154: wf_event_synchronize_pkg.GetSubscriptions(l_ObjectKey,
150: -- wf_event_synchronize_pkg.GetEventGroupByGroup(l_ObjectKey,p_ownertag));
151: ELSIF g_objecttype = 'SUBSCRIPTIONS' THEN
152: -- Download subscriptions in one file
153: dbms_lob.append(p_eventdata,
154: wf_event_synchronize_pkg.GetSubscriptions(l_ObjectKey,
155: p_isexact, p_ownertag));
156:
157: ELSE -- including ALL
158:
156:
157: ELSE -- including ALL
158:
159: dbms_lob.append(p_eventdata,
160: wf_event_synchronize_pkg.GetSystems(l_ObjectKey));
161: dbms_lob.append(p_eventdata,
162: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
163: dbms_lob.append(p_eventdata,
164: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
158:
159: dbms_lob.append(p_eventdata,
160: wf_event_synchronize_pkg.GetSystems(l_ObjectKey));
161: dbms_lob.append(p_eventdata,
162: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
163: dbms_lob.append(p_eventdata,
164: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
165: dbms_lob.append(p_eventdata,
166: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
160: wf_event_synchronize_pkg.GetSystems(l_ObjectKey));
161: dbms_lob.append(p_eventdata,
162: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
163: dbms_lob.append(p_eventdata,
164: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
165: dbms_lob.append(p_eventdata,
166: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
167: dbms_lob.append(p_eventdata,
168: wf_event_synchronize_pkg.GetSubscriptions(l_ObjectKey,p_isexact, p_ownertag));
162: wf_event_synchronize_pkg.GetAgents(l_ObjectKey,p_isexact));
163: dbms_lob.append(p_eventdata,
164: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
165: dbms_lob.append(p_eventdata,
166: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
167: dbms_lob.append(p_eventdata,
168: wf_event_synchronize_pkg.GetSubscriptions(l_ObjectKey,p_isexact, p_ownertag));
169: dbms_lob.append(p_eventdata,
170: wf_event_synchronize_pkg.GetEventGroups(l_ObjectKey, p_ownertag));
164: wf_event_synchronize_pkg.GetAgentGroups(l_ObjectKey));
165: dbms_lob.append(p_eventdata,
166: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
167: dbms_lob.append(p_eventdata,
168: wf_event_synchronize_pkg.GetSubscriptions(l_ObjectKey,p_isexact, p_ownertag));
169: dbms_lob.append(p_eventdata,
170: wf_event_synchronize_pkg.GetEventGroups(l_ObjectKey, p_ownertag));
171:
172: END IF;
166: wf_event_synchronize_pkg.GetEvents(l_ObjectKey, p_ownertag));
167: dbms_lob.append(p_eventdata,
168: wf_event_synchronize_pkg.GetSubscriptions(l_ObjectKey,p_isexact, p_ownertag));
169: dbms_lob.append(p_eventdata,
170: wf_event_synchronize_pkg.GetEventGroups(l_ObjectKey, p_ownertag));
171:
172: END IF;
173:
174: dbms_lob.writeappend(p_eventdata, length(g_end_clob), g_end_clob);
176: --return (syncclob);
177:
178: exception
179: when others then
180: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'CREATESYNCCLOB', g_objecttype,
181: p_ObjectKey ,null);
182: raise;
183: end;
184: ------------------------------------------------------------------------------
204:
205: begin
206: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
207: wf_log_pkg.string(wf_log_pkg.level_procedure,
208: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATEFILE.Begin',
209: 'Entered Create File');
210: end if;
211:
212: if (p_isexact) then
216: end if;
217:
218: dbms_lob.createtemporary( l_clob, FALSE, DBMS_LOB.CALL);
219:
220: wf_event_synchronize_pkg.CreateSyncClob(p_ObjectType, p_ObjectKey, l_isExactNum, null, l_clob);
221:
222: if (dbms_lob.getlength(l_clob) = 0) then
223: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
224: wf_log_pkg.string(wf_log_pkg.level_statement,
221:
222: if (dbms_lob.getlength(l_clob) = 0) then
223: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
224: wf_log_pkg.string(wf_log_pkg.level_statement,
225: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATEFILE.Clob_Size',
226: 'l_clob null');
227: end if;
228: end if;
229:
228: end if;
229:
230: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
231: wf_log_pkg.string(wf_log_pkg.level_statement,
232: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATEFILE.Create',
233: 'Calling to CreateClob File');
234: end if;
235:
236: wf_event_synchronize_pkg.CreateClobFile(p_Directory, p_Filename, l_clob);
232: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATEFILE.Create',
233: 'Calling to CreateClob File');
234: end if;
235:
236: wf_event_synchronize_pkg.CreateClobFile(p_Directory, p_Filename, l_clob);
237:
238: exception
239: when others then
240: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'CREATEFILE', p_Directory||
236: wf_event_synchronize_pkg.CreateClobFile(p_Directory, p_Filename, l_clob);
237:
238: exception
239: when others then
240: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'CREATEFILE', p_Directory||
241: '*'||p_Filename,p_ObjectType||'*'||p_ObjectKey ,null);
242: raise;
243: end;
244: ------------------------------------------------------------------------------
267:
268: begin
269: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
270: wf_log_pkg.string(wf_log_pkg.level_procedure,
271: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATECLOBFILE.Begin',
272: 'Entered Create Clob File: '||p_Directory||'-'||p_Filename);
273: end if;
274:
275: l_filehandle := UTL_FILE.FOPEN(p_Directory, p_Filename,'w');
275: l_filehandle := UTL_FILE.FOPEN(p_Directory, p_Filename,'w');
276:
277: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
278: wf_log_pkg.string(wf_log_pkg.level_statement,
279: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATECLOBFILE.file_handle',
280: 'Got file handle');
281: end if;
282:
283: --
325: l_current_position);
326:
327: utl_file.putf(l_filehandle, l_messagedata);
328:
329: wf_log_pkg.string(6, 'WF_EVENT_SYNCHRONIZE_PKG.CREATEFILE',
330: substr(l_messagedata,1,l_splice_size));
331:
332: l_current_position := l_current_position + l_splice_size;
333:
349: utl_file.fclose(l_filehandle);
350:
351: exception
352: when others then
353: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'CREATECLOBFILE', p_Directory||
354: '*'||p_Filename,null);
355: raise;
356: end;
357: ------------------------------------------------------------------------------
406: -- We have the Clob
407: --
408: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
409: wf_log_pkg.string(wf_log_pkg.level_statement,
410: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADFILE.file_size',
411: 'Clob Size is:'||l_clobsize);
412: wf_log_pkg.string(wf_log_pkg.level_statement,
413: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADFILE.upload',
414: 'About to Upload Clob');
409: wf_log_pkg.string(wf_log_pkg.level_statement,
410: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADFILE.file_size',
411: 'Clob Size is:'||l_clobsize);
412: wf_log_pkg.string(wf_log_pkg.level_statement,
413: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADFILE.upload',
414: 'About to Upload Clob');
415: end if;
416:
417: wf_event_synchronize_pkg.uploadsyncclob( l_clob);
413: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADFILE.upload',
414: 'About to Upload Clob');
415: end if;
416:
417: wf_event_synchronize_pkg.uploadsyncclob( l_clob);
418:
419: exception
420: when utl_file.invalid_path then
421: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
417: wf_event_synchronize_pkg.uploadsyncclob( l_clob);
418:
419: exception
420: when utl_file.invalid_path then
421: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
422: p_Filename,null);
423: wf_core.raise('WFE_INVALID_PATH');
424: when utl_file.invalid_mode then
425: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
421: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
422: p_Filename,null);
423: wf_core.raise('WFE_INVALID_PATH');
424: when utl_file.invalid_mode then
425: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
426: p_Filename,null);
427: wf_core.raise('WFE_INVALID_MODE');
428: when utl_file.invalid_operation then
429: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
425: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
426: p_Filename,null);
427: wf_core.raise('WFE_INVALID_MODE');
428: when utl_file.invalid_operation then
429: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
430: p_Filename,null);
431: wf_core.raise('WFE_INVALID_OPERATION');
432: when utl_file.read_error then
433: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
429: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
430: p_Filename,null);
431: wf_core.raise('WFE_INVALID_OPERATION');
432: when utl_file.read_error then
433: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
434: p_Filename,null);
435: wf_core.raise('WFE_READ_ERROR');
436: when utl_file.internal_error then
437: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
433: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
434: p_Filename,null);
435: wf_core.raise('WFE_READ_ERROR');
436: when utl_file.internal_error then
437: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
438: p_Filename,null);
439: wf_core.raise('WFE_INTERNAL_ERROR');
440: when utl_file.invalid_filehandle then
441: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
437: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
438: p_Filename,null);
439: wf_core.raise('WFE_INTERNAL_ERROR');
440: when utl_file.invalid_filehandle then
441: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
442: p_Filename,null);
443: wf_core.raise('WFE_INVALID_FILEHANDLE');
444: when others then
445: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
441: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
442: p_Filename,null);
443: wf_core.raise('WFE_INVALID_FILEHANDLE');
444: when others then
445: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADFILE', p_Directory,
446: p_Filename,null);
447: raise;
448: end;
449: ------------------------------------------------------------------------------
484: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
485: -- This is for logging only
486: -- BINDVAR_SCAN_IGNORE[3]
487: wf_log_pkg.string(wf_log_pkg.level_statement,
488: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADSYNCCLOB.pos',
489: 'Begin Pos '||l_begin_position);
490: end if;
491:
492: EXIT when l_begin_position = 0; -- No More Event Objects left
505: l_begin_position);
506:
507: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
508: wf_log_pkg.string(wf_log_pkg.level_statement,
509: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADSYNCCLOB.data',
510: 'Message Data: '||substr(l_messagedata,1,100));
511: end if;
512:
513: --
512:
513: --
514: -- Get Object Type, and then call to UploadObject
515: --
516: l_objecttype := wf_event_synchronize_pkg.GetObjectType(l_messagedata);
517:
518: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
519: wf_log_pkg.string(wf_log_pkg.level_statement,
520: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADSYNCCLOB.object',
516: l_objecttype := wf_event_synchronize_pkg.GetObjectType(l_messagedata);
517:
518: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
519: wf_log_pkg.string(wf_log_pkg.level_statement,
520: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADSYNCCLOB.object',
521: 'Object Type: '||l_objecttype);
522: end if;
523:
524: wf_event_synchronize_pkg.UploadObject(l_objecttype, l_messagedata,l_error);
520: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.UPLOADSYNCCLOB.object',
521: 'Object Type: '||l_objecttype);
522: end if;
523:
524: wf_event_synchronize_pkg.UploadObject(l_objecttype, l_messagedata,l_error);
525:
526: END LOOP;
527:
528: exception
526: END LOOP;
527:
528: exception
529: when others then
530: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UPLOADSYNCCLOB', l_counter,
531: substr(l_messagedata,1,100)
532: ,null);
533: raise;
534: end;
570: return (returnclob);
571:
572: exception
573: when others then
574: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetSystems', p_key,null,
575: 'ERROR'); raise;
576: end;
577: ------------------------------------------------------------------------------
578: /*
612: END IF;
613:
614: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
615: wf_log_pkg.string(wf_log_pkg.level_procedure,
616: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.GETAGENTS.Begin',
617: 'Entered GetAgents');
618: end if;
619:
620: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
628:
629: if (p_isexact = false) then
630: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
631: wf_log_pkg.string(wf_log_pkg.level_statement,
632: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.GETAGENTS.set_pound',
633: 'Substitute with pounds.');
634: end if;
635:
636: l_clob_len := dbms_lob.getlength(l_clob);
661:
662:
663: exception
664: when others then
665: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetAgents', p_key,null,
666: 'ERROR'); raise;
667: end;
668: ------------------------------------------------------------------------------
669: /*
714: return (returnclob);
715:
716: exception
717: when others then
718: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetAgentGroups', p_key,null,
719: 'ERROR'); raise;
720: end;
721:
722: ------------------------------------------------------------------------------
779: return (returnclob);
780:
781: exception
782: when others then
783: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetEvents', p_key,null,
784: 'ERROR'); raise;
785: end;
786: ------------------------------------------------------------------------------
787: /*
848: return (returnclob);
849:
850: exception
851: when others then
852: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetEventGroups', p_key,null,
853: 'ERROR'); raise;
854: end;
855: ------------------------------------------------------------------------------
856: /*
911: return (returnclob);
912:
913: exception
914: when others then
915: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetGroups', p_key,null,
916: 'ERROR'); raise;
917: end;
918: ------------------------------------------------------------------------------
919: function GETEVENTGROUPBYGROUP (
956: return (returnclob);
957:
958: exception
959: when others then
960: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetEventGroupByGroup', p_key,null,
961: 'ERROR'); raise;
962: end;
963:
964: ------------------------------------------------------------------------------
1009: END IF;
1010:
1011: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1012: wf_log_pkg.string(wf_log_pkg.level_procedure,
1013: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.GETSUBSCRIPTIONS.Begin',
1014: 'Entered GetSubscriptions');
1015: end if;
1016:
1017: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
1025:
1026: if (p_isexact = false) then
1027: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
1028: wf_log_pkg.string(wf_log_pkg.level_statement,
1029: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.GETSUBSCRIPTIONS.set_pound',
1030: 'Substitute with pounds.');
1031: end if;
1032:
1033: l_clob_len := dbms_lob.getlength(l_clob);
1130: return (returnclob);
1131:
1132: exception
1133: when others then
1134: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetSubscriptions', p_key,null,
1135: 'ERROR'); raise;
1136: end;
1137: ------------------------------------------------------------------------------
1138: /*
1165: return (l_return);
1166:
1167: exception
1168: when others then
1169: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetObjectType',
1170: substr(p_messagedata,1,100),null,
1171: 'ERROR'); raise;
1172: end;
1173: ------------------------------------------------------------------------------
1199: END IF;
1200:
1201: /*exception
1202: when others then
1203: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UploadObject',
1204: substr(p_messagedata,1,100),
1205: p_objecttype,
1206: 'ERROR'); raise;*/
1207: end;
1229: end if;
1230: end if;
1231: exception
1232: when others then
1233: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'UpdateGUID');
1234: raise;
1235: end;
1236: ------------------------------------------------------------------------------
1237: /*
1273: end if;
1274: return (retStr);
1275: exception
1276: when others then
1277: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'ReplaceContent');
1278: raise;
1279: end;
1280: ------------------------------------------------------------------------------
1281: /*
1309: end if;
1310: return (retStr);
1311: exception
1312: when others then
1313: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SetGUID');
1314: raise;
1315: end;
1316: ------------------------------------------------------------------------------
1317: /*
1338: end if;
1339: return (retStr);
1340: exception
1341: when others then
1342: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SetSYSTEMGUID');
1343: raise;
1344: end;
1345: ------------------------------------------------------------------------------
1346: /*
1369: return upper(substr(l_sid,1,30));
1370:
1371: exception
1372: when others then
1373: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetSID');
1374: raise;
1375: end;
1376: ------------------------------------------------------------------------------
1377: /*
1408:
1409: return (g_qowner);
1410: exception
1411: when others then
1412: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'GetQOwner');
1413: raise;
1414: end;
1415: ------------------------------------------------------------------------------
1416: /*
1456: return (retStr);
1457:
1458: exception
1459: when others then
1460: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SetSID');
1461: raise;
1462: end;
1463: ------------------------------------------------------------------------------
1464: /*
1546: return (retStr);
1547:
1548: exception
1549: when others then
1550: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SetAgent');
1551: raise;
1552: end;
1553:
1554: ------------------------------------------------------------------------------
1582:
1583: begin
1584: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1585: wf_log_pkg.string(wf_log_pkg.level_procedure,
1586: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.SETPOUND.Begin',
1587: 'Entered SetPound.');
1588: end if;
1589:
1590: if dataStr is not null then
1619: end if;
1620: return (retStr);
1621: exception
1622: when others then
1623: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SetPound');
1624: raise;
1625: end;
1626:
1627: ------------------------------------------------------------------------------
1648:
1649: begin
1650: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1651: wf_log_pkg.string(wf_log_pkg.level_procedure,
1652: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.SETNULL.Begin',
1653: 'Entered SetNull.');
1654: end if;
1655:
1656: if dataStr is not null then
1674: end if;
1675: return (retStr);
1676: exception
1677: when others then
1678: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'SetNull');
1679: raise;
1680: end;
1681:
1682: ------------------------------------------------------------------------------
1689: begin
1690:
1691: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
1692: wf_log_pkg.string(wf_log_pkg.level_procedure,
1693: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATEEMPTYCLOB.Begin',
1694: 'Entered Create Empty Clob');
1695: end if;
1696:
1697: dbms_lob.createtemporary(p_outclob, FALSE, DBMS_LOB.CALL);
1696:
1697: dbms_lob.createtemporary(p_outclob, FALSE, DBMS_LOB.CALL);
1698: exception
1699: when others then
1700: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'CREATEEMPTYCLOB');
1701: raise;
1702: end;
1703: ------------------------------------------------------------------------------
1704: /*
1757: end if;
1758: return (retStr);
1759: exception
1760: when others then
1761: wf_core.context('Wf_Event_Synchronize_Pkg', 'GetAgent');
1762: raise;
1763: end;
1764: --------------------------------------------------------------------------------------------
1765: /*
1834: P_ERROR_MSG out nocopy varchar2
1835: )
1836: is
1837: begin
1838: Wf_Event_Synchronize_Pkg.CreateSyncClob(P_OBJECTTYPE, P_OBJECTKEY, P_ISEXACTNUM,
1839: P_OWNERTAG, P_EVENTDATA);
1840: p_error_code := null;
1841: p_error_msg := null;
1842: exception
1854: ** WFXLoad modifies when a .wfx is uploaded.
1855: */
1856: procedure Prepare_Zero_Down_Time
1857: is
1858: l_package_name varchar2(30) := 'WF_EVENT_SYNCHRONIZE_PKG';
1859: l_module_name varchar2(30) := 'Prepare_Zero_Down_Time';
1860: l_tem_tab_name varchar2(50);
1861: TYPE TableName is VARRAY(8) OF VARCHAR2(50);
1862: WFTable TableName:=TableName ('WF_RESOURCES',
1881: raise;
1882: end Prepare_Zero_Down_Time;
1883:
1884: --------------------------------------------------------------------------------------------
1885: end WF_EVENT_SYNCHRONIZE_PKG;