33: l_clob clob;
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:
114: IF p_ObjectKey IS NOT NULL THEN
115: l_ObjectKey := '%'||p_ObjectKey||'%';
116: END IF;
117:
118: dbms_lob.createtemporary(p_eventdata, FALSE, DBMS_LOB.CALL);
119:
120: dbms_lob.writeappend(p_eventdata, length(g_begin_clob), g_begin_clob);
121:
122: --
116: END IF;
117:
118: dbms_lob.createtemporary(p_eventdata, FALSE, DBMS_LOB.CALL);
119:
120: dbms_lob.writeappend(p_eventdata, length(g_begin_clob), g_begin_clob);
121:
122: --
123: -- Might have to change these to constants for MLS
124: --
125: -- Bug 2558446: Events, Subscriptions and Agents/Systems downloaded in separate
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,
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));
135: ELSIF g_objecttype = 'EVENTS' THEN
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
137: dbms_lob.append(p_eventdata,
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));
139:
140: dbms_lob.append(p_eventdata,
141: wf_event_synchronize_pkg.GetEventGroups(
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));
143: ELSIF g_objecttype = 'EVENT_GROUPS' THEN
144: -- Download event groups
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,
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,
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));
151: ELSIF g_objecttype = 'SUBSCRIPTIONS' THEN
152: -- Download subscriptions in one file
153: dbms_lob.append(p_eventdata,
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,
155: p_isexact, p_ownertag));
156:
157: ELSE -- including ALL
155: p_isexact, p_ownertag));
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,
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));
165: dbms_lob.append(p_eventdata,
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));
167: dbms_lob.append(p_eventdata,
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));
169: dbms_lob.append(p_eventdata,
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));
171:
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;
173:
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);
175:
176: --return (syncclob);
177:
178: exception
214: else
215: l_isExactNum := 0;
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
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,
225: 'wf.plsql.WF_EVENT_SYNCHRONIZE_PKG.CREATEFILE.Clob_Size',
226: 'l_clob null');
293: -- are none
294: --
295: l_counter := l_counter + 1;
296:
297: l_begin_position := dbms_lob.instr(p_clob, g_begin_string,
298: 1, l_counter);
299:
300: EXIT when l_begin_position = 0; -- No More Event Objects left
301:
298: 1, l_counter);
299:
300: EXIT when l_begin_position = 0; -- No More Event Objects left
301:
302: l_end_position := dbms_lob.instr(p_clob , g_end_string,
303: 1, l_counter);
304:
305: --
306: -- Figure out the amount to read out of the CLOB, and subst
308: l_end_position := l_end_position + l_length_end_string;
309:
310: l_amount_to_read := l_end_position - l_begin_position;
311:
312: l_messagedata := dbms_lob.substr(p_clob, l_amount_to_read,
313: l_begin_position);
314:
315: utl_file.putf(l_filehandle, l_messagedata);
316:
320:
321: /**
322: LOOP
323:
324: l_messagedata := dbms_lob.substr(p_clob, l_splice_size,
325: l_current_position);
326:
327: utl_file.putf(l_filehandle, l_messagedata);
328:
379: end if;
380:
381: l_filehandle := UTL_FILE.FOPEN(p_Directory, p_Filename,'r');
382:
383: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
384:
385: LOOP
386: begin
387: dbms_lob.createtemporary( l_workingclob, FALSE, DBMS_LOB.CALL);
383: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
384:
385: LOOP
386: begin
387: dbms_lob.createtemporary( l_workingclob, FALSE, DBMS_LOB.CALL);
388:
389: utl_file.get_line(l_filehandle, l_buffer);
390:
391: if length(l_buffer) > 0 then
388:
389: utl_file.get_line(l_filehandle, l_buffer);
390:
391: if length(l_buffer) > 0 then
392: dbms_lob.write(l_workingclob, length(l_buffer), 1, l_buffer);
393: dbms_lob.append(l_clob,l_workingclob);
394: end if;
395:
396: l_workingclob := null;
389: utl_file.get_line(l_filehandle, l_buffer);
390:
391: if length(l_buffer) > 0 then
392: dbms_lob.write(l_workingclob, length(l_buffer), 1, l_buffer);
393: dbms_lob.append(l_clob,l_workingclob);
394: end if;
395:
396: l_workingclob := null;
397: l_buffer := '';
477: -- are none
478: --
479: l_counter := l_counter + 1;
480:
481: l_begin_position := dbms_lob.instr(p_eventdata, g_begin_string,
482: 1, l_counter);
483:
484: if (wf_log_pkg.level_statement >= fnd_log.g_current_runtime_level) then
485: -- This is for logging only
490: end if;
491:
492: EXIT when l_begin_position = 0; -- No More Event Objects left
493:
494: l_end_position := dbms_lob.instr(p_eventdata, g_end_string,
495: 1, l_counter);
496:
497: --
498: -- Figure out the amount to read out of the CLOB, and subst
500: l_end_position := l_end_position + l_length_end_string;
501:
502: l_amount_to_read := l_end_position - l_begin_position;
503:
504: l_messagedata := dbms_lob.substr(p_eventdata, l_amount_to_read,
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,
549: where name like nvl(p_key,'%');
550:
551: begin
552:
553: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
554:
555: FOR g IN systems LOOP
556:
557: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
553: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
554:
555: FOR g IN systems LOOP
556:
557: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
558:
559: -- Get our XML document
560: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.system.update', g.guid);
561:
559: -- Get our XML document
560: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.system.update', g.guid);
561:
562: -- Add this to our return CLOB
563: dbms_lob.append(returnclob, l_clob);
564:
565: -- Kill the Loop CLOB
566: l_clob := null;
567:
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);
621:
622: FOR g IN agents(l_guid) LOOP
623:
624: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
620: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
621:
622: FOR g IN agents(l_guid) LOOP
623:
624: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
625:
626: -- Get our XML document
627: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.agent.update', g.guid);
628:
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);
637: dbms_lob.read(l_clob, l_clob_len, 1, l_tmpStr);
638:
639: -- # replacement in
640: l_tmpStr := SetPound(1,l_tmpStr,'
633: 'Substitute with pounds.');
634: end if;
635:
636: l_clob_len := dbms_lob.getlength(l_clob);
637: dbms_lob.read(l_clob, l_clob_len, 1, l_tmpStr);
638:
639: -- # replacement in
640: l_tmpStr := SetPound(1,l_tmpStr,'
641: l_tmpStr := SetPound(1,l_tmpStr,'
644: l_tmpStr := SetPound(l_searchPos,l_tmpStr,'@','','SID',null);
645: l_tmpStr := SetPound(1,l_tmpStr,'
646: l_tmpStrLen := length(l_tmpStr);
647:
648: dbms_lob.erase(l_clob, l_clob_len, 1);
649: dbms_lob.write(l_clob, l_tmpStrLen, 1, l_tmpStr);
650: end if;
651:
652: -- Add this to our return CLOB
645: l_tmpStr := SetPound(1,l_tmpStr,'
646: l_tmpStrLen := length(l_tmpStr);
647:
648: dbms_lob.erase(l_clob, l_clob_len, 1);
649: dbms_lob.write(l_clob, l_tmpStrLen, 1, l_tmpStr);
650: end if;
651:
652: -- Add this to our return CLOB
653: dbms_lob.append(returnclob, l_clob);
649: dbms_lob.write(l_clob, l_tmpStrLen, 1, l_tmpStr);
650: end if;
651:
652: -- Add this to our return CLOB
653: dbms_lob.append(returnclob, l_clob);
654:
655: -- Kill the Loop CLOB
656: l_clob := null;
657:
693: );*/
694:
695: begin
696:
697: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
698:
699: FOR g IN agent_groups LOOP
700:
701: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
697: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
698:
699: FOR g IN agent_groups LOOP
700:
701: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
702:
703: -- Get our XML document
704: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.agentgroup.update', g.guid);
705:
703: -- Get our XML document
704: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.agentgroup.update', g.guid);
705:
706: -- Add this to our return CLOB
707: dbms_lob.append(returnclob, l_clob);
708:
709: -- Kill the Loop CLOB
710: l_clob := null;
711:
748: and owner_tag like nvl(p_ownertag, '%');
749:
750: begin
751:
752: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
753: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
754:
755: if (p_key is not null OR p_key <> '') then
756:
749:
750: begin
751:
752: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
753: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
754:
755: if (p_key is not null OR p_key <> '') then
756:
757: FOR g IN events LOOP
757: FOR g IN events LOOP
758: -- Get our XML document
759: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
760: -- Add this to our return CLOB
761: dbms_lob.append(returnclob, l_clob);
762: -- Kill the Loop CLOB
763: dbms_lob.trim(l_clob, 0);
764: END LOOP;
765:
759: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
760: -- Add this to our return CLOB
761: dbms_lob.append(returnclob, l_clob);
762: -- Kill the Loop CLOB
763: dbms_lob.trim(l_clob, 0);
764: END LOOP;
765:
766: else
767:
768: FOR g IN events_all LOOP
769: -- Get our XML document
770: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
771: -- Add this to our return CLOB
772: dbms_lob.append(returnclob, l_clob);
773: -- Kill the Loop CLOB
774: dbms_lob.trim(l_clob, 0);
775: END LOOP;
776:
770: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
771: -- Add this to our return CLOB
772: dbms_lob.append(returnclob, l_clob);
773: -- Kill the Loop CLOB
774: dbms_lob.trim(l_clob, 0);
775: END LOOP;
776:
777: end if;
778:
817: order by e.name;
818:
819: begin
820:
821: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
822: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
823:
824: if (p_key is not null OR p_key <> '') then
825:
818:
819: begin
820:
821: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
822: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
823:
824: if (p_key is not null OR p_key <> '') then
825:
826: FOR g IN event_groups LOOP
826: FOR g IN event_groups LOOP
827: -- Get our XML document
828: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.group.update', g.names);
829: -- Add this to our return CLOB
830: dbms_lob.append(returnclob, l_clob);
831: -- Kill the Loop CLOB
832: dbms_lob.trim(l_clob, 0);
833: END LOOP;
834:
828: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.group.update', g.names);
829: -- Add this to our return CLOB
830: dbms_lob.append(returnclob, l_clob);
831: -- Kill the Loop CLOB
832: dbms_lob.trim(l_clob, 0);
833: END LOOP;
834:
835: else
836:
837: FOR g IN event_groups_all LOOP
838: -- Get our XML document
839: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.group.update', g.names);
840: -- Add this to our return CLOB
841: dbms_lob.append(returnclob, l_clob);
842: -- Kill the Loop CLOB
843: dbms_lob.trim(l_clob, 0);
844: END LOOP;
845:
839: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.group.update', g.names);
840: -- Add this to our return CLOB
841: dbms_lob.append(returnclob, l_clob);
842: -- Kill the Loop CLOB
843: dbms_lob.trim(l_clob, 0);
844: END LOOP;
845:
846: end if;
847:
880: and owner_tag like nvl(p_ownertag, '%');
881:
882: begin
883:
884: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
885: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
886:
887: if (p_key is not null OR p_key <> '') then
888:
881:
882: begin
883:
884: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
885: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
886:
887: if (p_key is not null OR p_key <> '') then
888:
889: FOR g IN events LOOP
889: FOR g IN events LOOP
890: -- Get our XML document
891: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
892: -- Add this to our return CLOB
893: dbms_lob.append(returnclob, l_clob);
894: -- Kill the Loop CLOB
895: dbms_lob.trim(l_clob, 0);
896: END LOOP;
897:
891: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
892: -- Add this to our return CLOB
893: dbms_lob.append(returnclob, l_clob);
894: -- Kill the Loop CLOB
895: dbms_lob.trim(l_clob, 0);
896: END LOOP;
897:
898: else
899:
900: FOR g IN events_all LOOP
901: -- Get our XML document
902: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
903: -- Add this to our return CLOB
904: dbms_lob.append(returnclob, l_clob);
905: -- Kill the Loop CLOB
906: dbms_lob.trim(l_clob, 0);
907: END LOOP;
908:
902: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.event.update', g.guid);
903: -- Add this to our return CLOB
904: dbms_lob.append(returnclob, l_clob);
905: -- Kill the Loop CLOB
906: dbms_lob.trim(l_clob, 0);
907: END LOOP;
908:
909: end if;
910:
935: order by g.name;
936:
937: begin
938:
939: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
940:
941: FOR g IN event_groups LOOP
942:
943: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
939: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
940:
941: FOR g IN event_groups LOOP
942:
943: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
944:
945: -- Get our XML document
946: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.group.update', g.names);
947:
945: -- Get our XML document
946: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.group.update', g.names);
947:
948: -- Add this to our return CLOB
949: dbms_lob.append(returnclob, l_clob);
950:
951: -- Kill the Loop CLOB
952: l_clob := null;
953:
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);
1018:
1019: FOR g IN event_subscriptions(l_guid) LOOP
1020:
1021: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
1017: dbms_lob.createtemporary(returnclob, FALSE, DBMS_LOB.CALL);
1018:
1019: FOR g IN event_subscriptions(l_guid) LOOP
1020:
1021: dbms_lob.createtemporary(l_clob, FALSE, DBMS_LOB.CALL);
1022:
1023: -- Get our XML document
1024: l_clob := wf_event_functions_pkg.generate('oracle.apps.wf.event.subscription.update', g.guid);
1025:
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);
1034: dbms_lob.read(l_clob, l_clob_len, 1, l_tmpStr);
1035:
1036: -- # replacement in
1037: l_tmpStr := SetPound(1,l_tmpStr,'
1030: 'Substitute with pounds.');
1031: end if;
1032:
1033: l_clob_len := dbms_lob.getlength(l_clob);
1034: dbms_lob.read(l_clob, l_clob_len, 1, l_tmpStr);
1035:
1036: -- # replacement in
1037: l_tmpStr := SetPound(1,l_tmpStr,'
1038: l_tmpStr := SetPound(1,l_tmpStr,'
1114: END LOOP;
1115: **/
1116: l_tmpStrLen := length(l_tmpStr);
1117:
1118: dbms_lob.erase(l_clob, l_clob_len, 1);
1119: dbms_lob.write(l_clob, l_tmpStrLen, 1, l_tmpStr);
1120: end if;
1121:
1122: -- Add this to our return CLOB
1115: **/
1116: l_tmpStrLen := length(l_tmpStr);
1117:
1118: dbms_lob.erase(l_clob, l_clob_len, 1);
1119: dbms_lob.write(l_clob, l_tmpStrLen, 1, l_tmpStr);
1120: end if;
1121:
1122: -- Add this to our return CLOB
1123: dbms_lob.append(returnclob, l_clob);
1119: dbms_lob.write(l_clob, l_tmpStrLen, 1, l_tmpStr);
1120: end if;
1121:
1122: -- Add this to our return CLOB
1123: dbms_lob.append(returnclob, l_clob);
1124:
1125: -- Kill the Loop CLOB
1126: l_clob := null;
1127:
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);
1698: exception
1699: when others then
1700: wf_core.context('WF_EVENT_SYNCHRONIZE_PKG', 'CREATEEMPTYCLOB');
1701: raise;