[Home] [Help]
PACKAGE BODY: APPS.FND_OID_DIAG
Source
1 package body fnd_oid_diag as
2 /* $Header: AFSCODIB.pls 120.9.12000000.3 2007/07/06 14:11:50 bmasa ship $ */
3 --
4 -------------------------------------------------------------------------------
5 is_dbms_ldap_available boolean :=false;
6 is_oid_enabled boolean :=false;
7 ldapSession dbms_ldap.session;
8 errNumber number := 1;
9 helpNumber number := 1;
10 currentMethod varchar2(256);
11 statusStr varchar2(50);
12 errStr varchar2(4000);
13 fixInfo varchar2(4000);
14 isFatal varchar2(50);
15 --oidAdmin varchar2(256);
16 --oidPwd varchar2(256);
17 orclAppName varchar2(256);
18 orclDefaultSubscriber varchar2(256);
19 eBusContainer varchar2(256);
20 svcContainer varchar2(256);
21 appGuid varchar2(256);
22 realmGuid varchar2(256);
23 orclodipprofileinterfacename varchar2(256);
24 orclodipprofileinterfacetype varchar2(256);
25 orclodipprovisioningappname varchar2(256);
26 orclodipprofileinterfaceci varchar2(256);
27 orclodipprofileschedule varchar2(256);
28 orclserviceinstancelocation varchar2(1000);
29 orclservicesublocation varchar2(1000);
30 orclstatus varchar2(256);
31 tableOpen boolean := false;
32 procedure getOrclApp(p_app in out nocopy varchar2);
33 --
34 -------------------------------------------------------------------------------
35 procedure eventsTest;
36 procedure subscriptionsTest;
37 procedure passwordTest;
38 procedure identityRealmTest;
39 procedure containerTest;
40 procedure svcContainerTest;
41 procedure appGuidTest;
42 procedure realmGuidTest;
43 procedure provisionTest;
44 procedure oidToAppTest;
45 procedure appToOIDTest;
46 procedure dasTest;
47 procedure oidSubsTest;
48 procedure linkTest;
49 procedure usersTest;
50 procedure dasSearchTest(dasName in varchar2);
51 function checkEvent(eventName in varchar2) return varchar2;
52 function checkSub(subName in varchar2) return varchar2;
53 function getApp return varchar2;
54 procedure printAttr(ldapentry in dbms_ldap.message, attrName in varchar2);
55 procedure beginTable(title in varchar2, colspan in pls_integer default 2);
56 procedure endTable;
57 procedure insertRow(text in varchar2);
58 procedure insertColumn(text in varchar2);
59 procedure beginRow;
60 procedure endRow;
61 function constructErr(str in varchar2) return varchar2;
62 function constructHelp(str in varchar2) return varchar2;
63 --
64 -------------------------------------------------------------------------------
65 procedure init is
66
67 report jtf_diag_report;
68 reportClob clob;
69 result pls_integer;
70
71 begin
72 currentMethod := 'init';
73 statusStr := 'SUCCESS';
74 errStr := '@html';
75 fixInfo := '@html';
76 isFatal := 'FALSE';
77 errStr := errStr || '<html><body><ol>';
78 fixInfo := fixInfo || '<html><body><ol>';
79
80 /* Now this is part of the test
81 ldapSession := fnd_oid_util.get_oid_session;
82 orclAppName := fnd_preference.get(p_user_name => '#INTERNAL',
83 p_module_name => 'LDAP_SYNCH',
84 p_pref_name => 'USERNAME');
85 getOrclApp(orclAppName);
86 */
87
88 exception
89 when no_data_found then
90 statusStr := 'FAILURE';
91 errStr := constructErr('Oracle Application Common Name not found in Workflow Preferences');
92 fixInfo := constructHelp('Oracle Application Common Name must be registered in Workflow Preferences');
93 isFatal := 'FALSE';
94 report := jtf_diagnostic_adaptutil.constructReport(statusStr,
95 errStr, fixInfo, isFatal);
96 reportClob := jtf_diagnostic_adaptutil.getReportClob;
97 when others then
98 statusStr := 'FAILURE';
99 errStr := constructErr(sqlerrm || ' occured in ' || currentMethod);
100 fixInfo := constructHelp('Contact System Adminstrator');
101 isFatal := 'FALSE';
102 report := jtf_diagnostic_adaptutil.constructReport(statusStr,
103 errStr, fixInfo, isFatal);
104 reportClob := jtf_diagnostic_adaptutil.getReportClob;
105 end init;
106 --
107 -------------------------------------------------------------------------------
108 procedure getDefaultTestParams(defaultInputValues out nocopy jtf_diag_inputtbl) is
109 begin
110 currentMethod := 'getDefaultTestParams';
111 end getDefaultTestParams;
112 --
113 -------------------------------------------------------------------------------
114 procedure cleanup is
115
116 report jtf_diag_report;
117 reportClob clob;
118 result pls_integer;
119
120 begin
121 currentMethod := 'cleanup';
122 result := fnd_oid_util.unbind(ldapSession);
123
124 exception
125 when others then
126 statusStr := 'FAILURE';
127 errStr := constructErr(sqlerrm || ' occured in ' || currentMethod);
128 fixInfo := constructHelp('Contact System Adminstrator');
129 isFatal := 'FALSE';
130 report := jtf_diagnostic_adaptutil.constructReport(statusStr,
131 errStr, fixInfo, isFatal);
132 reportClob := jtf_diagnostic_adaptutil.getReportClob;
133
134 end cleanup;
135 --
136 -------------------------------------------------------------------------------
137 procedure getComponentName(compName out nocopy varchar2) is
138 begin
139 currentMethod := 'getComponentName';
140 compName := 'OID Setup Tests';
141 end getComponentName;
142 --
143 -------------------------------------------------------------------------------
144 procedure getTestDesc(descStr out nocopy varchar2) is
145 begin
146 currentMethod := 'getTestDesc';
147 descStr := 'Tests OID setup';
148 end getTestDesc;
149 --
150 -------------------------------------------------------------------------------
151 procedure getTestName(testName out nocopy varchar2) is
152 begin
153 currentMethod := 'getTestName';
154 testName := 'OID Setup Test';
155 end getTestName;
156 --
157 -------------------------------------------------------------------------------
158 function getTestMode return integer is
159 begin
160 currentMethod := 'getTestMode';
161 return jtf_diagnostic_adaptutil.BOTH_MODE;
162 end getTestMode;
163 --
164 -------------------------------------------------------------------------------
165 procedure dbms_ldap_test is
166 context number := 1;
167 schema varchar2(30);
168 part1 varchar2(30);
169 part2 varchar2(30);
170 dblink varchar2(128);
171 part1_type number;
172 object_number number;
173 trace_level pls_integer;
174 begin
175 currentMethod := 'dbms_ldap_test';
176 is_dbms_ldap_available := false;
177 beginTable('DBMS_LDAP test');
178 begin
179 dbms_utility.name_resolve('dbms_ldap', context, schema,part1, part2, dblink, part1_type, object_number);
180
181 if (schema<>'SYS' OR part1<>'DBMS_LDAP' OR part1_type<>9 )
182 then
183 statusStr := 'FAILURE';
184 errStr := constructErr('DBMS_LDAP resolves to '||schema||'.'||'DBMS_LDAP and not to PACKAGE SYS.DBMS_LDAP');
185 fixInfo := constructHelp('Check DBA_OBJECTS, if it is necesary recreate it Section 5, on Note 233436.1');
186 isFatal := 'TRUE';
187 insertRow('DBMS_LDAP resolves to '||schema||'.'||'DBMS_LDAP and not to PACKAGE SYS.DBMS_LDAP');
188 endTable;
189 return;
190
191 end if;
192
193 exception
194 when others then
195 case when sqlcode = -6564 then
196 statusStr := 'FAILURE';
197 errStr := constructErr('Package DBMS_LDAP is not accessible');
198 fixInfo := constructHelp('See Section 5, on Note 233436.1');
199 isFatal := 'TRUE';
200 insertRow('Package DBMS_LDAP is not accessible');
201 endTable;
202 return;
203 else
204 statusStr := 'FAILURE';
205 errStr := constructErr('Error '||sqlerrm||'(' || sqlcode || ') during dbms_ldap validation');
206 fixInfo := constructHelp('Try to recreate the packaeg as on Note 233436.1');
207 isFatal := 'TRUE';
208 insertRow('Error '||sqlerrm||'(' || sqlcode || ') during dbms_ldap validation');
209 endTable;
210 return;
211 end case;
212 end;
213 -- being there doesn't mean it's working
214 -- For example, dbms_ldap depends on dbms_random, remove the last one, and dbms_ldap becomes invalid
215 begin
216 trace_level := dbms_ldap.get_trace_level;
217 exception when others then
218 statusStr := 'FAILURE';
219 errStr := constructErr('Error '||sqlerrm||'(' || sqlcode || ') durint dbms_ldap validation');
220 fixInfo := constructHelp('Try to recreate the packaeg as on Note 233436.1');
221 isFatal := 'TRUE';
222 insertRow('Error '||sqlerrm||'(' || sqlcode || ') durint dbms_ldap validation');
223 endTable;
224 return;
225 end;
226 is_dbms_ldap_available:=true;
227 insertRow(' SYS.DBMS_LDAP is available');
228 endTable;
229 end dbms_ldap_test;
230 --
231 -------------------------------------------------------------------------------
232 procedure profile_test
233 is
234 sso varchar2(100);
235 sync varchar2(100);
236 defined boolean;
237 begin
238 currentMethod := 'profile_test';
239 is_oid_enabled:=false;
240 beginTable('Profiles ');
241 fnd_profile.get_specific('APPS_SSO',-1,null,null,sso,defined,null,null);
242 if (not defined) then
243 statusStr := 'FAILURE';
244 errStr := constructErr('APPS_SSO is not defined ');
245 fixInfo := constructHelp('!');
246 isFatal := 'TRUE';
247 insertRow('APPS_SSO is not defined ');
248 endTable;
249 return;
250 end if;
251 fnd_profile.get_specific('APPS_SSO_LDAP_SYNC',-1,null,null,sync,defined,null,null);
252 if (not defined) then
253 statusStr := 'FAILURE';
254 errStr := constructErr('APPS_SSO_LDAP_SYNC is not defined ');
255 fixInfo := constructHelp('!');
256 isFatal := 'TRUE';
257 insertRow('APPS_SSO_LDAP_SYNC is not defined ');
258 endTable;
259 return;
260 end if;
261 insertRow(' APPS_SSO= '||sso);
262 insertRow(' APPS_SSO_LDAP_SYNC= '||sync);
263 if ( sync ='Y')
264 then
265 is_oid_enabled:= true;
266 insertRow('OiD synchronization is enabled');
267 else
268 is_oid_enabled:=false;
269 insertRow('OiD synchronization is NOT enabled');
270 end if ;
271 endTable;
272 return;
273
274
275
276 end profile_test;
277 --
278 -------------------------------------------------------------------------------
279 procedure preference_test
280 is
281 host varchar2(100);
282 port varchar2(100);
283 pwd varchar2(100);
284 begin
285 currentMethod := 'preference_test';
286 ldapSession := null;
287 orclAppName := fnd_preference.get(p_user_name => '#INTERNAL', p_module_name => 'LDAP_SYNCH', p_pref_name => 'USERNAME');
288 pwd :=fnd_preference.eget('#INTERNAL','LDAP_SYNCH', 'EPWD', 'LDAP_PWD');
289 host := fnd_preference.get('#INTERNAL', 'LDAP_SYNCH', 'HOST');
290 port := fnd_preference.get('#INTERNAL', 'LDAP_SYNCH', 'PORT');
291 beginTable('OiD connect parameters ');
292 if (orclAppName is null) then
293 insertRow('AppDN is null');
294 statusStr := 'FAILURE';
295 errStr := constructErr('AppDN is not defined');
296 fixInfo := constructHelp('Run the registration utilitity');
297 isFatal := 'TRUE';
298 else
299 insertRow(' AppDn: '||orclAppName);
300 end if;
301 if (pwd is null)
302 then
303 insertRow('Password is null');
304 statusStr := 'FAILURE';
305 errStr := constructErr('AppDN password is not defined');
306 fixInfo := constructHelp('Run the registration utilitity');
307 isFatal := 'TRUE';
308 end if;
309
310 if (host is null)
311 then
312 insertRow('OiD host is null');
313 statusStr := 'FAILURE';
314 errStr := constructErr('OiD host is not defined');
315 fixInfo := constructHelp('Run the registration utilitity');
316 isFatal := 'TRUE';
317 else
318 insertRow('OiD host: '||host);
319 end if;
320 if (port is null)
321 then
322 insertRow('OiD port is null');
323 statusStr := 'FAILURE';
324 errStr := constructErr('OiD port is not defined');
325 fixInfo := constructHelp('Run the registration utilitity');
326 isFatal := 'TRUE';
327 else
328 insertRow('OiD port: '||port);
329 end if;
330 getOrclApp(orclAppName);
331 begin
332 ldapSession := fnd_oid_util.get_oid_session;
333 exception
334 when others then
335 insertRow('Failed to connect to OiD ');
336 statusStr := 'FAILURE';
337 errStr := constructErr('Error connecting to OiD '||sqlcode|| ' ' ||sqlerrm);
338 fixInfo := constructHelp('Run the registration utilitity');
339 isFatal := 'TRUE';
340 ldapSession := null;
341 end;
342
343
344 end preference_test;
345 --
346 -------------------------------------------------------------------------------
347 procedure runtest(inputs in jtf_diag_inputtbl,
348 report out nocopy jtf_diag_report,
349 reportClob out nocopy clob) is
350
351 begin
352 currentMethod := 'runtest';
353 jtf_diagnostic_adaptutil.setUpVars;
354 jtf_diagnostic_adaptutil.addStringToReport('@html');
355 jtf_diagnostic_coreapi.insert_style_sheet;
356 --oidAdmin := jtf_diagnostic_adaptutil.getInputValue('OIDPWD', inputs);
357 --oidPwd := jtf_diagnostic_adaptutil.getInputValue('OIDPWD', inputs);
358
359 profile_test;
360 if (not is_oid_enabled) then
361 jtf_diagnostic_adaptutil.addStringToReport('No additional test executed');
362
363 else
364 dbms_ldap_test;
365 if (is_dbms_ldap_available) then
366 preference_test;
367
368 if (ldapSession is not null) then
369 /* Check whether the workflow events are enabled */
370 eventsTest;
371
372 /* Check whether the workflow event subscriptions are enabled */
373 subscriptionsTest;
374
375 /* Not required: Validate the password in Workflow and OID match */
376 -- passwordTest;
377
378 /* Check the Identity Realm in OID matches the one used by workflow */
379 identityRealmTest;
380
381 /* Check Oracle Application Common Name in OID matches the one workflow searches */
382 containerTest;
383
384 /* Validate the Service Container has been created under the correct realm */
388 appGuidTest;
385 svcContainerTest;
386
387 /* Validate the Global UID for this application exists in OID */
389
390 /* Validate the Global UID for identity management realm exists in OID */
391 realmGuidTest;
392
393 /* Get the Provisional profile details from OID */
394 provisionTest;
395
396 /* Determine whether Provisioning has been configured for OID to EBusiness */
397 oidToAppTest;
398
399 /* Determine whether Provisioning has been configured for EBusiness to OID */
400 appToOIDTest;
401
402 /* Check EBusiness is a member of all the DAS's */
403 --dasTest;
404
405 /* Check Subscriptions have been created in OID */
406 oidSubsTest;
407
408 /* Check Service Instance is correctly linked to the Subscription Instance in OID */
409 linkTest;
410
411 usersTest;
412 else
413 jtf_diagnostic_adaptutil.addStringToReport('Cannot connect to OiD, test terminated');
414 end if;
415 else
416 jtf_diagnostic_adaptutil.addStringToReport('Cannot continue testing, DBMS_LDAP is not available');
417 end if;
418 end if;
419
420 if (tableOpen) then
421 endTable;
422 end if;
423 if (statusStr = 'SUCCESS') then
424 jtf_diagnostic_adaptutil.addStringToReport('Test completed successfully<br>');
425 elsif (statusStr = 'WARNING') then
426 jtf_diagnostic_adaptutil.addStringToReport('Test succeeded with warnings<br>');
427 else
428 jtf_diagnostic_adaptutil.addStringToReport('Test failed<br>');
429 end if;
430
431 errStr := errStr || '</ol></body></html>';
432 fixInfo := fixInfo || '</ol></body></html>';
433 report := jtf_diagnostic_adaptutil.constructReport(statusStr,
434 errStr, fixInfo, isFatal);
435 reportClob := jtf_diagnostic_adaptutil.getReportClob;
436
437 exception
438 when others then
439 --jtf_diagnostic_coreapi.errorprint('Error: '||sqlerrm);
440 --jtf_diagnostic_coreapi.ActionErrorPrint('Contact System Adminstrator');
441 if (tableOpen) then
442 endTable;
443 end if;
444 jtf_diagnostic_adaptutil.addStringToReport('Test failed<br>');
445 statusStr := 'FAILURE';
446 errStr := constructErr(sqlerrm || ' occured in ' || currentMethod);
447 fixInfo := constructHelp('Contact System Adminstrator');
448 errStr := errStr || '</ol></body></html>';
449 fixInfo := fixInfo || '</ol></body></html>';
450 isFatal := 'FALSE';
451 report := jtf_diagnostic_adaptutil.constructReport(statusStr,
452 errStr, fixInfo, isFatal);
453 reportClob := jtf_diagnostic_adaptutil.getReportClob;
454 end runtest;
455 --
456 -------------------------------------------------------------------------------
457 procedure eventsTest is
458
459 TYPE EventsList IS TABLE OF VARCHAR2(50);
460 events EventsList;
461 event varchar2(100);
462 l_status varchar2(10);
463 i pls_integer;
464
465 begin
466 currentMethod := 'eventsTest';
467
468 beginTable('Business Events');
469 insertRow('<TR><TH>Event</TH><TH>Status</TH></TR>');
470 -- SEE fndoidsynce.wfx
471 events := EventsList('oracle.apps.fnd.identity.add','ENABLED',
472 'oracle.apps.fnd.identity.delete','ENABLED',
476 'oracle.apps.fnd.ondemand.create','ENABLED',
473 'oracle.apps.fnd.identity.modify','ENABLED',
474 'oracle.apps.fnd.oidsync.error','ENABLED',
475 'oracle.apps.fnd.oidsync.resend','ENABLED',
477 'oracle.apps.fnd.subscription.add','ENABLED',
478 'oracle.apps.fnd.subscription.delete','ENABLED',
479 'oracle.apps.global.user.change','ENABLED');
480
481 i:=1;
482 while (i<events.count) loop
483 event := events(i);
484 beginRow;
485 insertColumn(event);
486 l_status := checkEvent(event);
487 if (l_status <> events(i+1) ) then
488 insertColumn(l_status||' <em> Incorrect </em>');
489 statusStr := 'FAILURE';
490 errStr := constructErr(event || ' is '||l_status);
491 fixInfo := constructHelp(event || ' should be '||events(i+1));
492 isFatal := 'FALSE';
493 else
494 insertColumn(l_status);
495 end if;
496 endRow;
497 i:=i+2;
498 end loop;
499
500 endTable;
501 exception
502 when no_data_found then
503 statusStr := 'FAILURE';
504 errStr := constructErr(event || ' is not created');
505 fixInfo := constructHelp(event || ' should be created');
506 isFatal := 'FALSE';
507
508 end eventsTest;
509 --
510 -------------------------------------------------------------------------------
511 procedure subscriptionsTest is
512
513 TYPE SubList IS TABLE OF VARCHAR2(50);
514 subs SubList;
515 l_subscription varchar2(100);
516 l_event varchar2(100);
517 l_status varchar2(10);
518 i pls_integer;
519
520 CURSOR c1(sub VARCHAR2) is
521
522 select s.status, e.name
523 from wf_events e, wf_event_subscriptions s
524 where rule_function = sub and
525 s.event_filter_guid = e.guid;
526
527 begin
528 currentMethod := 'subscriptionsTest';
529
530 beginTable('Business Event Subscriptions', 3);
531 -- see fndoidsyncs.wfx
532 jtf_diagnostic_adaptutil.addStringToReport('<tr> <TH>Subscription</TH> <TH>Event</TH> <TH>Status</TH>');
533 subs := SubList('fnd_oid_subscriptions.assign_def_resp',
534 'fnd_oid_subscriptions.event_error',
535 'fnd_oid_subscriptions.event_resend',
536 'fnd_oid_subscriptions.hz_identity_add',
537 'fnd_oid_subscriptions.hz_identity_delete',
538 'fnd_oid_subscriptions.hz_identity_modify',
539 'fnd_oid_subscriptions.hz_subscription_add',
540 'fnd_oid_subscriptions.hz_subscription_delete',
541 'fnd_oid_subscriptions.identity_add',
542 'fnd_oid_subscriptions.identity_delete',
543 'fnd_oid_subscriptions.identity_modify',
544 'fnd_oid_subscriptions.on_demand_user_create',
545 'fnd_oid_subscriptions.subscription_add',
546 'fnd_oid_subscriptions.subscription_delete',
547 'fnd_user_pkg.user_change');
548
549 i:= 1;
550 while (i<subs.count) loop
551 l_subscription := subs(i);
552 jtf_diagnostic_adaptutil.addStringToReport('<tr><td colspan=3 align=left>'|| subs(i)||'</td><tr>');
553
554 open c1(l_subscription);
555 loop
556
557 fetch c1 into l_status, l_event;
558 if (c1%ROWCOUNT = 0 ) then
559 jtf_diagnostic_adaptutil.addStringToReport('<tr><td></td><td colspan=2> MISSING <em>INCORRECT</em></td><tr>');
560 statusStr := 'FAILURE';
561 errStr := constructErr(l_subscription || ' is not created');
562 fixInfo := constructHelp(l_subscription || ' should be created');
563 isFatal := 'FALSE';
564 end if;
565 exit when c1%NOTFOUND;
566
567 jtf_diagnostic_adaptutil.addStringToReport('<tr><td></td><td>'||l_event||'</td><td>'||l_status);
568 end loop;
569 close c1;
570 i:=i+2;
571
572 end loop;
573
574 endTable;
575 end subscriptionsTest;
576 --
577 -------------------------------------------------------------------------------
578 procedure passwordTest is
579
580 appsPwd varchar2(50);
581 result pls_integer;
582
583 begin
584 currentMethod := 'passwordTest';
585 select fnd_preference.eget('#INTERNAL','LDAP_SYNCH', 'EPWD', 'LDAP_PWD')
586 into appsPwd
587 from dual;
588
589 result := dbms_ldap.compare_s(ld => ldapSession, dn => orclAppName,
590 attr => 'userpassword', value => appsPwd);
591
592 if (result = dbms_ldap.COMPARE_FALSE) then
593 statusStr := 'FAILURE';
594 errStr := constructErr('Passwords do not match');
595 fixInfo := constructHelp('TThe Application password in E-Business Suite matches the one registered in OID');
596 isFatal := 'FALSE';
597 else
598 beginTable('The password registered in E-Business Workflow is the same password defined in OID for this application ');
599 endTable;
600 end if;
601
602 exception
603 when others then
604 statusStr := 'FAILURE';
605 errStr := constructErr('Password not registered with Workflow Global Preferences');
606 fixInfo := constructHelp('Password must be registered with Workflow Global Preferences');
610 --
607 isFatal := 'FALSE';
608
609 end passwordTest;
611 -------------------------------------------------------------------------------
612 procedure identityRealmTest is
613
614 result pls_integer;
615 l_message dbms_ldap.message := null;
616 l_entry dbms_ldap.message := null;
617 l_attrs dbms_ldap.string_collection;
618
619 begin
620 currentMethod := 'identityRealmTest';
621
622 result := dbms_ldap.search_s(ld => ldapSession, base => 'cn=Common,cn=Products,cn=OracleContext', scope => dbms_ldap.SCOPE_BASE,
623 filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
624
625 -- get the first entry
626 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
627 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orcldefaultsubscriber');
628
629 orclDefaultSubscriber := l_attrs(0);
630
631 if instr(orclAppName, orclDefaultSubscriber) = 0 then
632 statusStr := 'FAILURE';
633 errStr := constructErr('Oracle Application Common Name does not contain ' || orclDefaultSubscriber);
634 fixInfo := constructHelp('Oracle Application Common Name should contain ' || orclDefaultSubscriber);
635 isFatal := 'FALSE';
636 else
637 beginTable('The Identity Management Realm in OID matches the one registered in E-Business Suite');
638 insertRow(orclDefaultSubscriber);
639 endTable;
640 end if;
641
642 exception
643 when others then
644 statusStr := 'FAILURE';
645 errStr := constructErr('Identity Management Realm could not be found');
646 fixInfo := constructHelp('Identity Management Realm should be registered');
647 isFatal := 'FALSE';
648
649 end identityRealmTest;
650 --
651 -------------------------------------------------------------------------------
652 procedure containerTest is
653
654 l_base varchar2(256);
655 l_dn varchar2(256);
656 result pls_integer;
657 success pls_integer;
658 l_message dbms_ldap.message := NULL;
659 l_entry dbms_ldap.message := NULL;
660 l_attrs dbms_ldap.string_collection;
661 l_dn_norm varchar2(256);
662 l_orclAppName_norm varchar2(256);
663 l_result1 pls_integer;
664 l_result2 pls_integer;
665
666 begin
667 currentMethod := 'containerTest';
668 success := 0;
669 l_base := 'cn=EBusiness,cn=Products,cn=OracleContext,' || orclDefaultSubscriber;
670
671 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
672 scope => dbms_ldap.SCOPE_ONELEVEL, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
673
674 -- get the first entry
675
676 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
677
678 while l_entry is not null loop
679 l_dn := dbms_ldap.get_dn(ldapSession, l_entry);
680 l_result1 := dbms_ldap_utl.normalize_dn_with_case(l_dn, 1, l_dn_norm);
681 l_result2 := dbms_ldap_utl.normalize_dn_with_case(orclAppName, 1, l_orclAppName_norm);
682 if ((l_dn_norm = l_orclAppName_norm) AND (l_result1 = DBMS_LDAP_UTL.SUCCESS) AND (l_result2 = DBMS_LDAP_UTL.SUCCESS)) then
683 success := 1;
684 end if;
685 l_entry := dbms_ldap.next_entry(ldapSession, l_entry);
686 end loop;
687
688 if success = 0 then
689 statusStr := 'FAILURE';
690 errStr := constructErr('Application container is not created properly');
691 fixInfo := constructHelp('Application container should be created properly');
692 isFatal := 'FALSE';
693 else
697 end if;
694 beginTable('Oracle Application Common Name (orclApplCommonName) in E-Business Suite matches the one registered in OID');
695 insertRow(orclAppName);
696 endTable;
698
699 exception
700 when others then
701 statusStr := 'FAILURE';
702 errStr := constructErr('Application container is not created properly');
703 fixInfo := constructHelp('Application container should be created properly');
704 isFatal := 'FALSE';
705 end containerTest;
706 --
707 -------------------------------------------------------------------------------
708 procedure svcContainerTest is
709
710 l_base varchar2(256);
711 result pls_integer;
712 l_message dbms_ldap.message := NULL;
713 l_entry dbms_ldap.message := NULL;
714 l_attrs dbms_ldap.string_collection;
715
716 begin
717 currentMethod := 'svcContainerTest';
718 l_base := 'cn=Services, cn=OracleContext';
719
720 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
721 scope => dbms_ldap.SCOPE_ONELEVEL, filter => 'cn=EBusiness', attrs => l_attrs, attronly => 0, res => l_message);
722
723 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
724 svcContainer := dbms_ldap.get_dn(ldapSession, l_entry);
725
726 beginTable('The Service Container is created under the correct Realm');
727 insertRow(svcContainer);
728 endTable;
729
730 exception
731 when no_data_found then
732 statusStr := 'FAILURE';
733 errStr := constructErr('Service container is not created properly');
734 fixInfo := constructHelp('Register the instance again');
735 isFatal := 'FALSE';
736 end svcContainerTest;
737 --
738 -------------------------------------------------------------------------------
739 procedure appGuidTest is
740
741 result pls_integer;
742 l_message dbms_ldap.message := NULL;
743 l_entry dbms_ldap.message := NULL;
744 l_attrs dbms_ldap.string_collection;
745
746 begin
747 currentMethod := 'appGuidTest';
748
749 l_attrs(0) := 'orclguid';
750
751 result := dbms_ldap.search_s(ld => ldapSession, base => orclAppName,
752 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
753
754 -- get the first entry
755
756 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
757 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclguid');
758
759 appGuid := l_attrs(0);
760
761 if l_attrs(0) is null then
762 statusStr := 'FAILURE';
763 errStr := constructErr('Global UID for this application not found');
764 fixInfo := constructHelp('Global UID for this application should be registered');
765 isFatal := 'FALSE';
766 else
767 beginTable('Application GUID');
768 insertRow(appGuid);
769 endTable;
770 end if;
771
772 exception
773 when no_data_found then
774 statusStr := 'FAILURE';
775 errStr := constructErr('Global UID for this application not found');
776 fixInfo := constructHelp('Global UID for this application should be registered');
777 isFatal := 'FALSE';
778 end appGuidTest;
779 --
780 -------------------------------------------------------------------------------
781 procedure realmGuidTest is
782
783 result pls_integer;
787
784 l_message dbms_ldap.message := NULL;
785 l_entry dbms_ldap.message := NULL;
786 l_attrs dbms_ldap.string_collection;
788 begin
789 currentMethod := 'realmGuidTest';
790
791 l_attrs(0) := 'orclguid';
792
793 result := dbms_ldap.search_s(ld => ldapSession, base => orclDefaultSubscriber,
794 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
795
796 -- get the first entry
797
798 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
799 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclguid');
800
801 realmGuid := l_attrs(0);
802
803 if l_attrs(0) is null then
804 statusStr := 'FAILURE';
805 errStr := constructErr('Global UID for identity realm not found');
806 fixInfo := constructHelp('Global UID for identity realm should be registered');
807 isFatal := 'FALSE';
808 else
809 beginTable('Identity Management Realm GUID');
810 insertRow(realmGuid);
811 endTable;
812 end if;
813
814 exception
815 when no_data_found then
816 statusStr := 'FAILURE';
817 errStr := constructErr('Global UID for identity realm not found');
818 fixInfo := constructHelp('Global UID for identity realm should be registered');
819 isFatal := 'FALSE';
820 end realmGuidTest;
821 --
822 -------------------------------------------------------------------------------
823 procedure provisionTest is
824
825 result pls_integer;
826 l_base varchar2(1000);
827 l_message dbms_ldap.message := NULL;
828 l_entry dbms_ldap.message := NULL;
829 l_attrs dbms_ldap.string_collection;
830
831 begin
832 currentMethod := 'provisionTest';
833
834 l_base := 'orclODIPProfileName=' || realmGuid || '_' || appGuid || ',cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory';
835
836 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
837 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
838
839 -- get the first entry
840
841 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
842
843 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclodipprofileinterfacename');
844 orclodipprofileinterfacename := l_attrs(0);
845
846 l_attrs := dbms_ldap.get_values(ldapSession, l_entry,'orclodipprofileinterfacetype');
847 orclodipprofileinterfacetype := l_attrs(0);
848
849 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclodipprovisioningappname');
850 orclodipprovisioningappname := l_attrs(0);
851
852 -- l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclodipprofileinterfaceconnectinformation');
853 -- orclodipprofileinterfaceci := l_attrs(0);
854
855 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclodipprofileschedule');
856 orclodipprofileschedule := l_attrs(0);
857
858 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclstatus');
859 orclstatus := l_attrs(0);
860
861 if (orclodipprofileinterfacename is null) or (orclodipprofileinterfacetype is null) or ( orclodipprovisioningappname is null) /*or (orclodipprofileinterfaceci is null)*/ or (orclodipprofileschedule is null) or (orclstatus is null)
862 then
863 statusStr := 'FAILURE';
864 errStr := constructErr('Provisioning profile not found');
865 fixInfo := constructHelp('Contact System Administrator');
866 isFatal := 'FALSE';
867 else
868 beginTable('Provisioning Profile');
869 insertRow('Profile Name = ' || l_base);
870 insertRow('orclodipprofileinterfacename = ' || orclodipprofileinterfacename);
871 insertRow('orclodipprofileinterfacetype = ' || orclodipprofileinterfacetype);
872 insertRow('orclodipprovisioningappname = ' || orclodipprovisioningappname);
873 --insertRow('orclodipprofileinterfaceconnectinformation = ' || orclodipprofileinterfaceci);
874 insertRow('orclodipprofileschedule = ' || orclodipprofileschedule);
875 insertRow('orclstatus = ' || orclstatus);
876 endTable;
877 end if;
878
879 exception
880 when others then
881 statusStr := 'FAILURE';
882 errStr := constructErr('Provisioning profile not found');
883 fixInfo := constructHelp('Contact System Administrator');
884 isFatal := 'FALSE';
885 end provisionTest;
886 --
887 -------------------------------------------------------------------------------
888 procedure oidToAppTest is
889
890 result pls_integer;
891 l_base varchar2(1000);
892 attrName varchar2(100);
893 l_message dbms_ldap.message := NULL;
894 l_entry dbms_ldap.message := NULL;
895 l_attrs dbms_ldap.string_collection;
896 l_events dbms_ldap.string_collection;
897 l_status dbms_ldap.string_collection;
898 l_processingstatus dbms_ldap.string_collection;
899
900 begin
901 currentMethod := 'oidToAppTest';
902
903 l_base := 'cn=OIDTOApplication,orclODIPProfileName=' || realmGuid || '_' || appGuid || ',cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory';
904
905 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
906 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
907
908 -- get the first entry
909
910 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
911
912 beginTable('Provisioning Profile Details for OID to Application');
913 printAttr(l_entry, 'orclodipprovisioningeventsubscription');
914 printAttr(l_entry, 'orclstatus');
918 exception
915 printAttr(l_entry, 'orclodipprofileprocessingstatus');
916 endTable;
917
919 when others then
920 /*statusStr := 'FAILURE';
921 errStr := constructErr('Provisioning profile not found');
922 fixInfo := constructHelp('Contact System Administrator');
923 isFatal := 'FALSE';*/
924 beginTable('Provisioning Profile Details for OID to Application');
925 insertRow('Provisioning profile not found for OID to Application');
926 endTable;
927 end oidToAppTest;
928 --
929 -------------------------------------------------------------------------------
930 procedure appToOIDTest is
931
932 result pls_integer;
933 l_base varchar2(1000);
934 l_message dbms_ldap.message := NULL;
935 l_entry dbms_ldap.message := NULL;
936 l_attrs dbms_ldap.string_collection;
937
938 begin
939 currentMethod := 'ApplicationToOID';
940
941 l_base := 'cn=ApplicationToOID,orclODIPProfileName=' || realmGuid || '_' || appGuid || ',cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory';
942
943 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
944 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
945
946 -- get the first entry
947
948 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
949
950 beginTable('Provisioning Profile Details for Application to OID');
951 printAttr(l_entry, 'orclodipprovisioningeventpermittedoperations');
952 printAttr(l_entry, 'orclstatus');
953 printAttr(l_entry, 'orclodipprofileprocessingstatus');
954 endTable;
955
956 exception
957 when others then
958 /* statusStr := 'FAILURE';
959 errStr := constructErr('Provisioning profile not found');
960 fixInfo := constructHelp('Contact System Administrator');
961 isFatal := 'FALSE';*/
962 beginTable('Provisioning Profile Details for Application to OID');
963 insertRow('Provisioning profile not found for Application to OID');
964 endTable;
965 end appToOIDTest;
966 --
967 -------------------------------------------------------------------------------
968 procedure dasTest is
969
970 TYPE DasList IS TABLE OF VARCHAR2(50);
971 dasNames DasList;
972
973 begin
974 currentMethod := 'dasTest';
975
976 beginTable('E-Business Suite is a member of the following Groups');
977
978 dasNames := DasList('cn=OracleDASCreateUser', 'cn=OracleDASEditUser', 'cn=OracleDASCreateGroup', 'cn=OracleDASDeleteGroup','cn=OracleDASEditGroup');
979
980 for i in 1..dasNames.count loop
981 dasSearchTest(dasNames(i));
982 insertRow(dasNames(i));
983 end loop;
984
985 endTable;
986
987 exception
988 when others then
989 statusStr := 'FAILURE';
990 errStr := constructErr('EBusiness is not a member of Oracle DAS');
991 fixInfo := constructHelp('Contact System Administrator'); isFatal := 'FALSE';
992 end dasTest;
993 --
994 -------------------------------------------------------------------------------
995 procedure oidSubsTest is
996
997 result pls_integer;
998 l_base varchar2(1000);
999 l_message dbms_ldap.message := NULL;
1003
1000 l_entry dbms_ldap.message := NULL;
1001 l_dn varchar2(256);
1002 l_attrs dbms_ldap.string_collection;
1004
1005 begin
1006 currentMethod := 'oidSubsTest';
1007
1008 l_base := 'cn=subscriptions,' || orclAppName;
1009
1010 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
1011 scope => dbms_ldap.SCOPE_ONELEVEL, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
1012
1013 -- get the first entry
1014
1015 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
1016 beginTable('Application Subscription List Configuration');
1017 while l_entry is not null loop
1018 l_dn := dbms_ldap.get_dn(ldapSession, l_entry);
1019 insertRow(l_dn);
1020 l_entry := dbms_ldap.next_entry(ldapSession, l_entry);
1021 end loop;
1022
1023 endTable;
1024
1025 exception
1026 when others then
1027 statusStr := 'FAILURE';
1028 errStr := constructErr('Subscriptions not properly created in OID');
1029 fixInfo := constructHelp('Contact System Administrator');
1030 isFatal := 'FALSE';
1031 end oidSubsTest;
1032 --
1033 -------------------------------------------------------------------------------
1034 procedure linkTest is
1035
1036 result pls_integer;
1037 l_base varchar2(1000);
1038 l_app varchar2(256);
1039 l_message dbms_ldap.message := NULL;
1040 l_entry dbms_ldap.message := NULL;
1041 l_attrs dbms_ldap.string_collection;
1042
1043 begin
1044 currentMethod := 'linkTest';
1045
1046 l_app := getApp;
1047 l_base := 'cn=' || l_app || ',' || svcContainer || ',' || orclDefaultSubscriber;
1048
1049 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
1050 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
1051
1052 -- get the first entry
1053
1054 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
1055 beginTable('Service Instance is correctly linked to the Subscription Instance');
1056 insertRow('DN = ' || l_base);
1057
1058 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclserviceinstancelocation');
1059 orclserviceinstancelocation := l_attrs(0);
1060 insertRow('orclserviceinstancelocation = ' || orclserviceinstancelocation);
1061
1062 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'orclservicesubscriptionlocation');
1063 orclservicesublocation := l_attrs(0);
1064 insertRow('orclservicesubscriptionlocation = ' || orclservicesublocation);
1065
1066 endTable;
1067
1068 -- if the entry exists with a different DN, don't fail
1069 /* if (orclserviceinstancelocation is null) or (orclservicesublocation is null)
1070 then
1071 statusStr := 'FAILURE';
1072 errStr := constructErr('Could not obtain the Service Instance details');
1073 fixInfo := constructHelp('Contact System Administrator');
1074 isFatal := 'FALSE';
1075 end if;
1076 */
1077
1078 exception
1079 when others then
1080 -- if the entry exists with a different DN, don't fail
1081 null;
1082 /* statusStr := 'FAILURE';
1083 errStr := constructErr('Could not obtain the Service Instance details');
1084 fixInfo := constructHelp('Contact System Administrator');
1085 isFatal := 'FALSE';*/
1086 end linkTest;
1087 --
1088 -------------------------------------------------------------------------------
1089 procedure usersTest
1090 is
1091
1092 l_base varchar2(1000);
1093 result pls_integer;
1094 success pls_integer;
1095 numberOfUsers pls_integer;
1096 l_message dbms_ldap.message := NULL;
1097 l_entry dbms_ldap.message := NULL;
1098 l_attrs dbms_ldap.string_collection;
1099
1100 begin
1101 currentMethod := 'usersTest';
1102 success := 0;
1103
1104 l_base := 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || orclAppName;
1105
1106 l_attrs(0) := 'uniquemember';
1107
1108 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
1109 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
1110
1111 -- get the first entry
1112
1113 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
1114 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'uniquemember');
1115
1116 if (l_attrs.count < 10) then
1117 numberOfUsers := l_attrs.count-1;
1118 else
1119 numberOfUsers := 9;
1120 end if;
1121
1122 beginTable('Subscribed Users (partial list)');
1123 for i in 0..numberOfUsers loop
1124 --if instr(orclAppName, l_attrs(i)) <> 0 then
1125 --success := 1;
1126 insertRow(l_attrs(i));
1127 --end if;
1128 end loop;
1129 endTable;
1130
1131 end usersTest;
1132 --
1133 -------------------------------------------------------------------------------
1134 procedure dasSearchTest(dasName in varchar2)
1135 is
1136
1137 l_base varchar2(1000);
1138 result pls_integer;
1139 success pls_integer;
1140 l_message dbms_ldap.message := NULL;
1141 l_entry dbms_ldap.message := NULL;
1142 l_attrs dbms_ldap.string_collection;
1143
1144 begin
1145 currentMethod := 'dasSearchTest';
1146 success := 0;
1147
1148 l_base := dasName || ',cn=Groups,cn=OracleContext,' || orclDefaultSubscriber;
1149 l_attrs(0) := 'uniquemember';
1150
1151 result := dbms_ldap.search_s(ld => ldapSession, base => l_base,
1152 scope => dbms_ldap.SCOPE_BASE, filter => 'objectclass=*', attrs => l_attrs, attronly => 0, res => l_message);
1153
1154 -- get the first entry
1155
1156 l_entry := dbms_ldap.first_entry(ldapSession, l_message);
1157 l_attrs := dbms_ldap.get_values(ldapSession, l_entry, 'uniquemember');
1158
1159 for i in 0..l_attrs.count-1 loop
1163 end loop;
1160 if instr(orclAppName, l_attrs(i)) <> 0 then
1161 success := 1;
1162 end if;
1164
1165 if success = 0 then
1166 statusStr := 'FAILURE';
1167 errStr := constructErr('EBusiness is not a member of Oracle DAS');
1168 fixInfo := constructHelp('Contact System Administrator');
1169 isFatal := 'FALSE';
1170 end if;
1171
1172 end dasSearchTest;
1173 --
1174 -------------------------------------------------------------------------------
1175 function checkEvent(eventName in varchar2)
1176 return varchar2 is
1177
1178 l_status varchar2(10);
1179
1180 begin
1181 select status into l_status
1182 from wf_events
1183 where name = eventName;
1184
1185 return l_status;
1186 exception
1187 when no_data_found then
1188 return '<i>not present</i>';
1189 end checkEvent;
1190 --
1191 -------------------------------------------------------------------------------
1192 function checkSub(subName in varchar2)
1193 return varchar2 is
1194
1195 l_status varchar2(10);
1196
1197 begin
1198 select status into l_status
1199 from wf_event_subscriptions
1200 where source_type = 'LOCAL' and
1201 rule_function = subName;
1202
1203 return l_status;
1204 end checkSub;
1205 --
1206 -------------------------------------------------------------------------------
1207 function getApp
1208 return varchar2 is
1209
1210 l_app varchar2(256);
1211 leftIndex pls_integer;
1212 rightIndex pls_integer;
1213
1214 begin
1215
1216 leftIndex := instr(orclAppName, '=') + 1;
1217 rightIndex := instr(orclAppName, ',');
1218 l_app := Substr(orclAppName, leftIndex, rightIndex-leftIndex);
1219
1220 return l_app;
1221 end getApp;
1222 --
1223 -------------------------------------------------------------------------------
1224 procedure printAttr(ldapentry in dbms_ldap.message, attrName in varchar2) is
1225
1226 l_attrs dbms_ldap.string_collection;
1227 l_attrvalue varchar2(1000);
1228
1229 begin
1230
1231 l_attrs := dbms_ldap.get_values(ldapSession, ldapentry, attrName);
1232
1233 for i in 0..l_attrs.count-1 loop
1234 l_attrvalue := l_attrs(i);
1235 insertRow(attrName || ' = ' || l_attrvalue);
1236 end loop;
1237
1238 exception
1239 when no_data_found then
1240 insertRow(attrName);
1241 --jtf_diagnostic_adaptutil.addStringToReport(title || ': ' || '<br><br>');
1242
1243 end printAttr;
1244 --
1245 -------------------------------------------------------------------------------
1246 function constructErr(str in varchar2)
1247 return varchar2 is
1248
1249 l_str varchar2(4000);
1250
1251 begin
1252 l_str := errStr || '<li>' || str || '</li>';
1253 return l_str;
1254 end constructErr;
1255 --
1256 -------------------------------------------------------------------------------
1257 function constructHelp(str in varchar2)
1258 return varchar2 is
1259
1260 l_str varchar2(4000);
1261
1262 begin
1263 l_str := fixInfo || '<li>' || str || '</li>';
1264 return l_str;
1265 end constructHelp;
1266 --
1267 -------------------------------------------------------------------------------
1268 procedure beginTable(title in varchar2, colspan in pls_integer default 2) is
1269
1270 html varchar2(4000);
1271
1272 begin
1273 if (tableOpen) then
1274 endTable;
1275 end if;
1276 html := '<TABLE width=70% border=1><TR><TD colspan=' || colspan || '><B>' || title || '</B></TD></TR>';
1277 jtf_diagnostic_adaptutil.addStringToReport(html);
1278 tableOpen := true;
1279 end beginTable;
1280 --
1281 -------------------------------------------------------------------------------
1282 procedure endTable is
1283
1284 html varchar2(4000);
1285
1286 begin
1287 html := '</TABLE><BR><BR><!------------------------------------------------------>';
1288 jtf_diagnostic_adaptutil.addStringToReport(html);
1289 tableOpen := false;
1290 end endTable;
1291 --
1292 -------------------------------------------------------------------------------
1293 procedure insertRow(text in varchar2) is
1294
1295 html varchar2(4000);
1296
1297 begin
1298 html := '<TR><TD>' || text || '<BR></TD></TR>';
1299 jtf_diagnostic_adaptutil.addStringToReport(html);
1300 end insertRow;
1301 --
1302 -------------------------------------------------------------------------------
1303 procedure insertColumn(text in varchar2) is
1304
1305 html varchar2(4000);
1306
1307 begin
1308 html := '<TD>' || text || '<BR></TD>';
1309 jtf_diagnostic_adaptutil.addStringToReport(html);
1310 end insertColumn;
1311 --
1312 -------------------------------------------------------------------------------
1313 procedure beginRow is
1314
1315 html varchar2(4000);
1316
1317 begin
1318 html := '<TR>';
1319 jtf_diagnostic_adaptutil.addStringToReport(html);
1320 end beginRow;
1321 --
1322 -------------------------------------------------------------------------------
1323 procedure endRow is
1324
1325 html varchar2(4000);
1326
1327 begin
1328 html := '</TR>';
1329 jtf_diagnostic_adaptutil.addStringToReport(html);
1330 end endRow;
1331 --
1332 -------------------------------------------------------------------------------
1333 procedure getOrclApp(p_app in out nocopy varchar2) is
1334
1335 quotesIndex pls_integer;
1336 strLength pls_integer;
1337
1338 begin
1339
1340 strLength := length(p_app);
1341
1342 while instr(p_app, '"') <> 0 loop
1343 quotesIndex := instr(p_app, '"');
1344 p_app := Substr(p_app, 0, quotesIndex-1) || Substr(p_app, quotesIndex+1, strLength);
1345 end loop;
1346
1347 end getOrclApp;
1348 --
1349 -------------------------------------------------------------------------------
1350
1351 end fnd_oid_diag;
1352