DBA Data[Home] [Help]

PACKAGE: APPS.EDR_UTILITIES

Source


1 PACKAGE EDR_UTILITIES AS
2 /* $Header: EDRUTILS.pls 120.2.12000000.1 2007/01/18 05:55:56 appldev ship $ */
3 
4 -- Bug 3621309: Start
5 -- variable that determines the usage context of generate_xml api
6 validate_setup_ui_ctx                  CONSTANT VARCHAR2(20)   := 'VALIDATE_SETUP';
7 -- Bug 3621309: End
8 
9 
10 --Bug 2674799 : start
11 SUBTYPE APPROVERS_TABLE IS AME_UTIL.APPROVERSTABLE2;
12 SUBTYPE ID_LIST IS AME_UTIL.IDLIST;
13 SUBTYPE STRING_LIST IS AME_UTIL.STRINGLIST;
14 
15 --Bug 4160412: Start
16 TYPE STRING_TABLE is TABLE of VARCHAR2(4000) INDEX by BINARY_INTEGER;
17 --Bug 4160412: End
18 
19 PROCEDURE PRINTCLOB(result IN OUT NOCOPY CLOB);
20 
21 
22 PROCEDURE VERIFY_SETUP(ERRBUF       OUT NOCOPY VARCHAR2,
23                        RETCODE      OUT NOCOPY VARCHAR2,
24                        P_EVENT      IN  VARCHAR2,
25                        P_EVENT_KEY  IN  VARCHAR2
26 
27                       );
28 
29 PROCEDURE GENERATE_ERECORD(P_XML IN CLOB,
30                            P_XSL IN CLOB,
31                            P_DOC OUT NOCOPY VARCHAR2);
32 
33 PROCEDURE GENERATE_XML(P_MAP_CODE      IN  VARCHAR2,
34                        P_DOCUMENT_ID   IN  VARCHAR2,
35                        P_XML           OUT NOCOPY CLOB,
36                        P_ERROR_CODE    OUT NOCOPY NUMBER,
37                        P_ERROR_MSG     OUT NOCOPY VARCHAR2,
38                        P_LOG_FILE      OUT NOCOPY VARCHAR2);
39 
40 PROCEDURE TEMP_DATA_CLEANUP(ERRBUF       OUT NOCOPY VARCHAR2,
41                             RETCODE      OUT NOCOPY VARCHAR2);
42 
43 --This function would take the original string and use the delimiter to return the substring
44 --from the start of the string till the delimiter. The original script along with the
45 --substring are returned to the calling function
46 
47 FUNCTION GET_DELIMITED_STRING(p_original_string IN OUT NOCOPY VARCHAR2,
48                               p_delimiter       IN VARCHAR2) return varchar2;
49 
50 PROCEDURE EDR_RAISE3(	p_event_name	IN 	varchar2,
51                 	p_event_key    	IN 	varchar2,
52                 	p_event_data 	IN 	clob default NULL,
53 			p_param_list	IN OUT	NOCOPY FND_TABLE_OF_VARCHAR2_255,
54 			p_send_date  	IN 	date   default NULL,
55 			p_param_value	IN OUT	NOCOPY FND_TABLE_OF_VARCHAR2_255
56 		    );
57 
58 
59 PROCEDURE EDR_NTF_HISTORY(  document_id   in varchar2,
60                             display_type  in varchar2,
61                             document      in out NOCOPY varchar2,
62                             document_type in out  NOCOPY varchar2);
63 
64 --This procdeure would return the value of the standard WHO columns
65 --for a table. It can be sued while inserting or updating an existing
66 --row in any of the table.
67 --This is a PRIVATE procedure
68 
69 -- Start of comments
70 -- API name             : getWhoColumns
71 -- Type                 : Private Utility.
72 -- Function             : Gets the WHO columns for inserting a row
73 -- Pre-reqs             : None.
74 -- Parameters           :
75 -- OUT                  : creation_date         out date
76 --                        created_by            out number
77 --                        last_update_date      out date
78 --                        last_updated_by       out number
79 --                        last_update_login     out number
80 --
81 -- End of comments
82 
83 PROCEDURE getWhoColumns(creation_date     out nocopy date,
84                         created_by        out nocopy number,
85                         last_update_date  out nocopy date,
86                         last_updated_by   out nocopy number,
87                         last_update_login out nocopy number);
88 
89 --Bug 3164491 : start
90 
91 --This function would return the userdisplayname for the
92 --username passed. It would be used in ERES and would not be
93 --exposed to public.
94 
95 -- Start of comments
96 -- API name             : getUserDisplayName
97 -- Type                 : Private Utility.
98 -- Function             : Gets the User Display name for the username
99 -- Pre-reqs             : None.
100 -- Parameters           :
101 -- IN                   : p_username in varchar2
102 -- RETURN               : varchar2 userdisplayname
103 --
104 -- End of comments
105 FUNCTION getUserDisplayName(p_username in varchar2) return varchar2;
106 
107 --This function would return the overriding details for the username
108 -- passed. It would be used in ERES and would not be exposed to public.
109 
110 -- Start of comments
111 -- API name             : getOverridingDetails
112 -- Type                 : Private Utility.
113 -- Function             : Gets the User Display name for the username
114 -- Pre-reqs             : None.
115 -- Parameters           :
116 -- IN                   : p_username in varchar2
117 -- RETURN               : varchar2 overridingdetails
118 --
119 -- End of comments
120 FUNCTION getOverridingDetails(p_username in varchar2) return varchar2;
121 
122 --This function would return the actual recipient for the username
123 -- passed. It would be used in ERES and would not be exposed to public.
124 
125 -- Start of comments
126 -- API name             : getActualRecipient
127 -- Type                 : Private Utility.
128 -- Function             : Gets the User Display name for the username
129 -- Pre-reqs             : None.
130 -- Parameters           :
131 -- IN                   : p_username in varchar2
132 -- RETURN               : varchar2 actualrecipient
133 --
134 -- End of comments
135 FUNCTION getActualRecipient(p_username in varchar2) return varchar2;
136 
137 --This procedure would get the userid and usergroupname for the
138 --groupname passed. It would return a list of the userid and
139 -- usergroupname with 1:1 relationship
140 
141 -- Start of comments
142 -- API name             : getUseridFromAme
143 -- Type                 : Private Utility.
144 -- Function             : Gets the userid and usergroupname for the partial
145 --                        groupname
146 -- Pre-reqs             : None.
147 -- Parameters           :
148 -- IN                   : p_groupname       in varchar2
149 -- OUT                  : x_userid          out FND_TABLE_OF_VARCHAR2_255
150 --                        x_usergroupname   out FND_TABLE_OF_VARCHAR2_255
151 --
152 -- End of comments
153 
154 --Bug 3589701 : start
155 --Unsupport the functionality to search by group as ame has not released it.
156 --Whenever ame supports it, we will uncomment this.
157 /*
158 PROCEDURE getUseridFromAme(p_groupname in varchar2,
159                             x_userid    out NOCOPY FND_TABLE_OF_VARCHAR2_255,
160                             x_usergroupname out NOCOPY FND_TABLE_OF_VARCHAR2_255);
161 */
162 --Bug 3589701 : end
163 --Bug 3164491 : end
164 
165 --Bug 3465204 : start
166 --This procedure would return the profile option value for the profile specified
167 --As the profile option values are being cached now. we need to create our
168 --wrapper to avoid it.
169 
170 -- Start of comments
171 -- API name             : getProfileValue
172 -- Type                 : Private Utility.
173 -- Function             : Gets the profile option value
174 -- Pre-reqs             : None.
175 -- Parameters           :
176 -- IN                   : p_profile in varchar2
177 -- OUT                  : x_profileValue out varchar2
178 --
179 -- End of comments
180 procedure getProfileValue (p_profile in varchar2, x_profileValue out nocopy varchar2);
181 
182 
183 --This procedure would return the profile option value for the profile specified
184 --As the profile option values are being cached now. we need to create our
185 --wrapper to avoid it.
186 
187 -- Start of comments
188 -- API name             : getProfileValueSpecific
189 -- Type                 : Private Utility.
190 -- Function             : Gets the profile option value
191 -- Pre-reqs             : None.
192 -- Parameters           :
193 -- IN                   : p_profile in varchar2
194 --                        p_user_id in number default null
195 --                        p_responsibility_id in number default null
196 --                        p_org_id in number default null
197 --                        p_server_id in number default null
198 -- OUT                  : x_profileValue out varchar2
199 --
200 -- End of comments
201 procedure getProfileValueSpecific  (p_profile in varchar2,
202                                     p_user_id in number default null,
203                                     p_responsibility_id in number default null,
204                                     p_application_id in number default null,
205                                     p_org_id in number default null,
206                                     p_server_id number default null,
207                                     x_profilevalue out nocopy varchar2);
208 --Bug 3465204 : end
209 
210 --Bug 3437422: Start
211 -- Start of comments
212 -- API name             : GET_USER_DATA
213 -- Type                 : Private.
214 -- Function             : Returns the contents of the USER_DATA node in xml payload
215 --                        of any ERES event
216 -- Pre-reqs             : None
217 -- Returns              : VARCHAR2(2000) containing the user_data xml node
218 --                        contents
219 
220 FUNCTION GET_USER_DATA RETURN VARCHAR2;
221 
222 -- Start of comments
223 -- API name             : REPLACE_USER_DATA_TOKEN
224 -- Type                 : Private.
225 -- Function             : Replaces the placeholder for user_data node contents
226 --                        in the XML payload of a document with actual contents
227 --                        of that node
228 -- Pre-reqs             : None
229 -- IN/OUT               : CLOB containing the xml payload that needs to be changed
230 --                        This XML is changed such that iff it contains user data
231 --                        token its replaced by actual contents of the USER_DATA
232 --                        node
233 PROCEDURE REPLACE_USER_DATA_TOKEN
234 (P_IN_XML          IN OUT NOCOPY   CLOB);
235 
236 -- Start of comments
237 -- API name             : CLOB_REPLACE
238 -- Type                 : Public.
239 -- Function             : Function to replace a string with another one in a CLOB
240 -- Pre-reqs             : None
241 -- IN                   : p_source the source clob
242 --                        p_srch_str the string to be replaced
243 --                        p_replace_str the string that would replace the existing string
244 -- RETURNS              : new CLOB with the replaced string
245 FUNCTION CLOB_REPLACE
246 (p_source                  IN CLOB,
247  p_srch_str                IN VARCHAR2,
248  p_replace_str             IN VARCHAR2)
249 return CLOB;
250 
251 --Bug 3437422: End
252 
253 
254 --Bug 3101047 : Start
255 -- Start of comments
256 -- API name             : GETUSERROLEINFO
257 -- Type                 : Private.
258 -- Function             : This API is used to obtain the USER DISPLAY NAME, ORIG SYSTEM NAME and SYSTEM ID for a
259 --			                  given USER NAME. The values are fetched from FND tables.
260 -- Pre-reqs             : None
261 -- IN                   : P_USER_NAME
262 -- OUT			            : X_USER_DISPLAY_NAME
263 --			                : X_ORIG_SYSTEM
264 --                			: X_ORIG_SYSTEM_ID
265 PROCEDURE GETUSERROLEINFO
266 (P_USER_NAME		IN VARCHAR2,
267  X_USER_DISPLAY_NAME	OUT NOCOPY VARCHAR2,
268  X_ORIG_SYSTEM		OUT NOCOPY VARCHAR2,
269  X_ORIG_SYSTEM_ID	OUT NOCOPY NUMBER);
270 
271 
272 -- Start of comments
273 -- API name             : GET_EVENT_DESCRIPTION
274 -- Type                 : Private Utility.
275 -- Function             : This API is used to obtain the actual event display name for a given event name.
276 -- Pre-reqs             : None.
277 -- Parameters           :
278 -- IN                   : P_EVENT Name of the event
279 -- OUT                  : P_DESCRIPTION  Display name of the Event
280 
281 PROCEDURE GET_EVENT_DESCRIPTION(P_EVENT IN VARCHAR2,
282                                 P_DESCRIPTION OUT NOCOPY VARCHAR2);
283 
284 -- Bug 3863508 : Start
285 -- Changed signature to use P_SIGNATURE_ID instead of P_DOCUMENT_ID
286 
287 -- Start of comments
288 -- API name             : FETCH_USER_DISPLAY_NAME
289 -- Type                 : Private Utility.
290 -- Function             : This API is used to obtain the USER DISPLAY NAME for a given USER NAME.
291 --                        If the entry in EDR_PSIG_DETAILS is null, then it is fetched from WF_ROLES.
292 -- Pre-reqs             : None.
293 -- Parameters           :
294 -- IN                   : P_USER_NAME The user name for which the display name is to be obtained.
295 --			: P_SIGNATURE_ID The SIGNATURE_ID for the document in EDR_PSIG_DETAILS table
296 -- OUT                  : X_USER_DISPLAY_NAME: The corresponding User Display Name
297 
298 /*PROCEDURE FETCH_USER_DISPLAY_NAME(P_USER_NAME IN VARCHAR2,
299 			     P_DOCUMENT_ID IN VARCHAR2,
300 			     X_USER_DISPLAY_NAME OUT NOCOPY VARCHAR2);
301 */
302 
303 PROCEDURE FETCH_USER_DISPLAY_NAME(P_USER_NAME IN VARCHAR2,
304                                   P_SIGNATURE_ID NUMBER,
305                                   X_USER_DISPLAY_NAME OUT NOCOPY VARCHAR2);
306 
307 
308 --Bug 3863508 : End
309 
310 --Bug 3101047 : End
311 
312 
313 -- Bug 3630380 : Start
314 -- Start of comments
315 -- API name             : FETCH_USER_DISPLAY_NAME
316 -- Type                 : Private Utility.
317 -- Function             : This API is used to obtain the USER DISPLAY NAME for a given USER ID.
318 -- Pre-reqs             : None.
319 -- Parameters           :
320 -- IN                   : P_USER_ID The user id for which the display name is to be obtained.
321 -- OUT                  : X_USER_DISPLAY_NAME: The corresponding User Display Name
322 
323 PROCEDURE FETCH_USER_DISPLAY_NAME(P_USER_ID IN NUMBER,
324 			     X_USER_DISPLAY_NAME OUT NOCOPY VARCHAR2);
325 
326 -- Bug 3630380 : End
327 
328 
329 -- Bug 2674799 :start
330 -- changed to use new approversTable table type of EDR_UTILITIES.
331 
332 -- Bug 3607477 : Start
333 -- Start of comments
334 -- API name             : GET_UNIQUE_AME_APPROVERS
335 -- Type                 : Private Utility.
336 -- Function             : This API is used to obtain the  unique ame approvers
337 --                        after filtering out the duplicate and deleted approvers. This function will
338 --                        filter the approvers having approval status as REPEATE and SUPPRESS.
339 -- Pre-reqs             : None.
340 -- Parameters           :
341 -- IN                   : P_APPROVER_LIST EDR approvers_Table containing all approvers.
342 -- RETURNS              : approvers_Table  EDR approver Table containing unique approvers
343 
344 FUNCTION  GET_UNIQUE_AME_APPROVERS(P_APPROVER_LIST IN APPROVERS_TABLE)
345 RETURN  approvers_Table;
346 
347 -- Bug 3607477 : End
348 -- Bug 2674799 : end
349 
350 
351 -- Bug 2674799 :start
352 --
353 -- Start of comments
354 -- API name             : GET_APPROVERS
355 -- Type                 : Private Utility.
356 -- Function             : This API is used to obtain the  unique ame approvers
357 --                        after filtering out the duplicate and deleted approvers.
358 -- Pre-reqs             : None.
359 -- Parameters           :
360 -- P_APPLICATION_ID      : APPLICATION ID
361 -- P_TRANSACTION_TYPE    : TRANSACTION TYPE NAME as defined in AME
362 -- P_TRANSACTION_ID      : TRANSACTION ID
363 -- APPROVERSOUT         : TABLE OF APPROVERS
364 -- X_RULE_IDS           : TABLE OF RULE IDS
365 -- X_RULE_DESCRIPTIONS  : TABLE OF RULE NAMES
366 -- RETURNS              : EDR_UTILITIES.approversTable approver Table containing unique approvers
367 
368 PROCEDURE GET_APPROVERS(
369         P_APPLICATION_ID  IN NUMBER,
370         P_TRANSACTION_ID IN VARCHAR2,
371         P_TRANSACTION_TYPE IN VARCHAR2,
372         X_APPROVERS OUT NOCOPY APPROVERS_TABLE,
373         X_RULE_IDS OUT NOCOPY ID_LIST,
374         X_RULE_DESCRIPTIONS OUT NOCOPY STRING_LIST
375      );
376 
377 --Bug 2674799: end
378 
379 -- Bug 3667036: Start
380 
381 -- Start of comments
382 -- API name             : GET_XML_ATTRIBUTE
383 -- Type                 : Private Utility.
384 -- Function             : Obtain the required XPATH value for a given event name and event key
385 --
386 -- Pre-reqs             : None.
387 -- Parameters           :
388 -- IN                   : P_EVENT_NAME	    IN  VARCHAR2: The event name
389 --			                : P_EVENT_KEY	      IN  VARCHAR2: The event key
390 --			                : P_XPATH_EXPRESSION  IN  VARCHAR2: The xpath expression
391 -- RETURNS              : The value for the specified xpath expression
392 --                        If the xpath is invalid: returns null
393 --                        If the xpath returns duplicate values: returns null
394 --                        In case of any unexpected exception: returns null
395 FUNCTION GET_XML_ATTRIBUTE
396 (
397   P_EVENT_NAME       VARCHAR2,
398   P_EVENT_KEY        VARCHAR2,
399   p_XPATH_EXPRESSION VARCHAR2
400 ) RETURN VARCHAR2;
401 
402 -- Bug 3667036: End
403 
404 
405 --Bug 3621309: Start
406 
407 -- Start of comments
408 -- API name             : GENERATE_XML_PAYLOAD
409 -- Type                 : Private Utility.
410 -- Function             : Create the XML run time payload by performing the
411 --                        required XML gateway operation.
412 --
413 -- Pre-reqs             : None.
414 -- Parameters           :
415 --
416 -- IN
417 --                      : P_MAP_CODE    IN  VARCHAR2: The XML gateway map code.
418 --			                : P_DOCUMENT_ID	IN  VARCHAR2: The event key
419 --			                : P_RAW_XML     IN  CLOB:     The raw xml payload
420 --                      : P_EVENT_NAME  IN  VARCHAR2: The event name identifying the transaction
421 --                      : P_USE_CONTEXT IN  VARCHAR2: The usage context
422 --
423 --  OUT
424 --                      : X_XML_PAYLOAD OUT CLOB: The transformed XML payload
425 --                      : X_DISPLAY_XML OUT CLOB: The XML payload with some more transformation
426 --                                                to ensure that it is displayable in
427 --                                                a UI bean of an OA page.
428 --
429 PROCEDURE GENERATE_XML_PAYLOAD( P_MAP_CODE      IN         VARCHAR2,
430                                 P_DOCUMENT_ID   IN         VARCHAR2,
431                                 P_RAW_XML       IN         CLOB      DEFAULT NULL,
432                                 P_EVENT_NAME    IN         VARCHAR2  DEFAULT NULL,
433                                 P_USE_CONTEXT   IN         VARCHAR2  DEFAULT NULL,
434                                 X_XML_PAYLOAD   OUT NOCOPY CLOB,
435                                 X_DISPLAY_XML   OUT NOCOPY CLOB);
436 
437 -- Start of comments
438 -- API name             : ADJUST_CLOB_FOR_DISPLAY
439 -- Type                 : Private Utility.
440 -- Function             : Adjusts the payload provided as per the
441 --                      : payload type. If the payload is of type "XMLPAYLOAD"
442 --                        then the whole payload would be placed between <pre>
443 --                        </pre> tags and all '<', '>' would be replaced by
444 --                        '<' and '>' respectively. If the payload is of
445 --                        any other type then it is adjusted to be prefixed and
446 --                        suffixed with the <pre> and </pre> tags respectively.
447 --                        This is primarily done to ensure that the payload is
448 --                        rendered properly on the UI bean of an OA page. The
449 --                        manipulated payload is returned.
450 --
451 -- Pre-reqs             : None.
452 -- Parameters           :
453 --
454 -- IN
455 --                      : P_PAYLOAD      IN   CLOB: The XML Payload to be
456 --                                                  adjusted.
457 --
458 --			                : P_PAYLOAD_TYPE IN   CLOB: The payload type.
459 --
460 -- RETURNS              : The adjusted payload.
461 
462 FUNCTION ADJUST_CLOB_FOR_DISPLAY(P_PAYLOAD      IN CLOB,
463                                  P_PAYLOAD_TYPE IN VARCHAR2)
464 RETURN CLOB;
465 
466 
467 -- Start of comments
468 -- API name             : XSLT_TRANSFORMATION
469 -- Type                 : Private Utility.
470 -- Function             : This API is used to apply the specified XSL style
471 --                        sheet on the XML payload provided.
472 --
473 -- Pre-reqs             : None.
474 -- Parameters           :
475 --
476 -- IN
477 --                      : P_XML_FILE              IN  CLOB:     The XML payload
478 --			                : P_XSLT_FILE_NAME	      IN  VARCHAR2: The XSL file to be applied
479 --                                                              on the XML payload.
480 
481 --			                : P_XSLT_APPLICATION_CODE IN  CLOB:     The application code to which
482 --                                                              the style sheet belongs.
483 --
484 --
485 --  OUT
486 --                      : X_OUTPUT  CLOB:   The transformed XML payload
487 --                      : X_RETCODE NUMBER: The execution status code of the API
488 --                      : X_RETMSG  CLOB:   The return message indicating the
489 --                                          actual execution details performed
490 --                                          and any errors that occurred.
491 --
492 
493 PROCEDURE XSLT_TRANSFORMATION ( P_XML_FILE               IN         CLOB,
494                                 P_XSLT_FILE_NAME         IN         VARCHAR2,
495                         				P_XSLT_APPLICATION_CODE  IN         VARCHAR2,
496                                 P_XSLT_FILE_VER          IN         VARCHAR2,
497                           			X_OUTPUT                 OUT NOCOPY CLOB,
498                                 X_RETCODE                OUT NOCOPY NUMBER,
499                         				X_RETMSG                 OUT NOCOPY VARCHAR2);
500 
501 
502 -- Start of comments
503 -- API name             : SAVE_RAW_XML
504 -- Type                 : Private Utility.
505 -- Function             : This API stores the specified transaction data into
506 --                        ERES temp(functional) table EDR_RAW_XML_T. If a row
507 --                        already exists for the specified event name and key
508 --                        combination, then the row is updated.
509 --
510 -- Pre-reqs             : None.
511 
512 -- Parameters           :
513 --
514 -- IN
515 --                      : P_TRANSACTION_NAME  IN  VARCHAR2: The event name representing the transaction.
516 --			                : P_TRANSACTION_KEY	  IN  VARCHAR2: The event key identifying the transaction.
517 --			                : P_RAW_XML           IN  CLOB:     The runtime transaction data.
518 --
519 
520 PROCEDURE SAVE_RAW_XML( P_TRANSACTION_NAME IN VARCHAR2,
521                         P_TRANSACTION_KEY  IN VARCHAR2,
522                         P_RAW_XML          IN CLOB);
523 
524 -- Start of comments
525 -- API name             : GET_RULES_AND_VARIABLES
526 -- Type                 : Private Utility.
527 -- Function             : This API is used to obtain the AME rule ids, rule descriptions
528 --                        that are applicable for the specified transaction.
529 --                        Also the rule variable names and values are also obtained.
530 --
531 -- Pre-reqs             : None.
532 -- Parameters           :
533 --
534 -- IN
535 --                      : P_EVENT_NAME  IN  VARCHAR2: The event name representing the transaction.
536 --                    	: P_EVENT_KEY   IN  VARCHAR2: The event key identifying the transaction.
537 --
538 --  OUT
539 --                      : X_AME_RULE_IDS           FND_TABLE_OF_VARCHAR2_255: The AME rule ids.
540 --                      : X_AME_RULE_DESCRIPTIONS  FND_TABLE_OF_VARCHAR2_255: The AME rule descriptions.
541 --                      : X_VARIABLE_NAMES         FND_TABLE_OF_VARCHAR2_255: The rule variable names.
542 --                      : X_VARIABLE_VALUES        FND_TABLE_OF_VARCHAR2_255: The rule variable values.
543 --
544 
545 PROCEDURE GET_RULES_AND_VARIABLES
546 (
547          P_EVENT_NAME              IN         VARCHAR2,
548       	 P_EVENT_KEY               IN         VARCHAR2 DEFAULT NULL,
549          X_AME_RULE_IDS            OUT NOCOPY FND_TABLE_OF_VARCHAR2_255,
550          X_AME_RULE_DESCRIPTIONS   OUT NOCOPY FND_TABLE_OF_VARCHAR2_255,
551          X_VARIABLE_NAMES          OUT NOCOPY FND_TABLE_OF_VARCHAR2_255,
552          X_VARIABLE_VALUES         OUT NOCOPY FND_TABLE_OF_VARCHAR2_255
553 );
554 
555 --Bug 3621309 : End
556 
557 -- Bug 3575265 :Start
558 -- Start of comments
559 -- API Name 		: GET_TEST_SCENARIO_XML
560 -- Type 		: PRIVATE UTILITY
561 -- Function		: This API is called by XML Gateway while producing EDR
562 --			  ERES OAF Inter Event 4 Payload
563 -- Pre-reqs 		: None
564 -- Parameters		:
565 -- IN			: P_TEST_SCENARIO_ID - TestScenarioId of the event being
566 --			 tested
567 -- OUT 		        : P_PARTIAL_XML - XML returned to XML gateway which will
568 --                        be part of event payload
569 -- OUT 		        : P_TEST_SCENARIO - XML returned to XML gateway which will
570 --                        be part of event payload
571 -- OUT 		        : P_TEST_SCENARIO_INSTANCE - XML returned to XML gateway which will
572 --                        be part of event payload
573 
574 PROCEDURE GET_TEST_SCENARIO_XML
575 (
576 	P_TEST_SCENARIO_ID IN NUMBER,
577 	P_PARTIAL_XML OUT NOCOPY VARCHAR2,
578 	P_TEST_SCENARIO OUT NOCOPY VARCHAR2,
579 	P_TEST_SCENARIO_INSTANCE OUT NOCOPY VARCHAR2
580 );
581 
582 -- Bug 3575265 : End
583 
584 
585 
586 -- Bug 3882605 : start
587 /* Utility procedures for Print option */
588 
589 -- Start of comments
590 -- API name             : GET_PARENT_ERECORD_ID
591 -- Type                 : Private Utility.
592 -- Function             : fetches Parent eRecord ID for a given erecord. P_PARENT_ERECORD_ID will be NULL if not found
593 -- Pre-reqs             : None.
594 -- Parameters           :
595 -- IN                   : P_ERECORD_ID eRecord id for which parent erecord id need to be retrieved
596 -- OUT                  : P_PARENT_ERECORD_ID Parent eRecord id of a given eRecord
597 
598 -- End of comments
599 PROCEDURE GET_PARENT_ERECORD_ID(P_ERECORD_ID IN NUMBER,
600                                 P_PARENT_ERECORD_ID OUT NOCOPY NUMBER);
601 
602 -- Bug 3882605 : end
603 
604 --Bug 3893101: Start
605 -- Start of comments
606 -- API name             : GENERATE_XML_FOR_INTER_EVENT_FORM
607 -- Type                 : Private Utility.
608 -- Function             : Generates the XML payload for the inter event form.
609 -- Pre-reqs             : None.
610 -- Parameters           :
611 -- IN                   : P_EVENT_KEY The event key of the event raised in
612 --                                    the inter event form.
613 -- IN                   : P_XML_CLOB_ID The XML CLOB ID to be used.
614 
615 -- End of comments
616 PROCEDURE GENERATE_EVENT_PAYLOAD (P_EVENT_KEY   IN VARCHAR2,
617                                   P_XML_CLOB_ID IN NUMBER);
618 --Bug 3893101: End
619 
620 
621 --Bug 4122622: Start
622 -- Start of comments
623 -- API name             : REPEATING_NUMBERS_EXIST
624 -- Type                 : Private Utility.
625 -- Function             : Checks if any of the number in the method
626 --                        are repeated. If so it returns true. Else it returns
627 --                        false.
628 
629 -- Pre-reqs             : None.
630 -- Parameters           :
631 -- IN                   : P_NUMBERS IN EDR_ERES_EVENT_PUB.ERECORD_ID_TBL_TYPE
632 --                      : Array of numbers.
633 -- RETURNS              : Boolean valye which indicates if any of the e-record ids
634 --                      : are repeating.
635 
636 FUNCTION REPEATING_NUMBERS_EXIST(P_NUMBERS IN EDR_ERES_EVENT_PUB.ERECORD_ID_TBL_TYPE)
637 
638 return boolean;
639 
640 
641 
642 -- Start of comments
643 -- API name             : GET_ERECORD_IDS
644 -- Type                 : Private Utility.
645 -- FUNCTION             : The procedure takes a comma separated string of
646 --                      : child e-record IDs and converts them into table of numbers.
647 
648 -- Pre-reqs             : None.
649 -- Parameters           :
650 -- IN                   : P_ERECORD_IDS_STRING IN VARCHAR2
651 --                      : Comma separated string of child e-record IDs.
652 -- OUT                  : X_ERECORD_IDS_ARRAY
653 --                      : The array of e-record ID values.
654 
655 PROCEDURE GET_ERECORD_IDS(P_ERECORD_IDS_STRING IN VARCHAR2,
656                           X_ERECORD_IDS_ARRAY OUT NOCOPY EDR_ERES_EVENT_PUB.ERECORD_ID_TBL_TYPE);
657 
658 --Bug 4122622: End
659 
660 --Bug 4160412: Start
661 -- Start of comments
662 -- API name             : GET_APPROVER_LIST
663 -- Type                 : Private Utility.
664 -- FUNCTION             : The procedure takes a comma separated string of
665 --                        approvers and converts them into table of approvers
666 
667 -- Pre-reqs             : None.
668 -- Parameters           :
669 -- IN                   : P_APPROVING_USERS  - The comma separated string of approvers.
670 
671 -- OUT                  : X_APPROVER_LIST       - The table of approvers.
672 --                      : X_ARE_APPROVERS_VALID - Flag indicating if the approvers provided are valid.
673 --                      : X_INVALID_APPROVERS   - Comma separated string of invalid approvers if they exist.
674 PROCEDURE GET_APPROVER_LIST(P_APPROVING_USERS       IN VARCHAR2,
675                             X_APPROVER_LIST         OUT NOCOPY EDR_UTILITIES.APPROVERS_TABLE,
676                             X_ARE_APPROVERS_VALID   OUT NOCOPY VARCHAR2,
677                             X_INVALID_APPROVERS     OUT NOCOPY VARCHAR2);
678 
679 
680 -- Start of comments
681 -- API name             : ARE_APPROVERS_REPEATING
682 -- Type                 : Private Utility.
683 -- FUNCTION             : This function checks the table of approvers for any repetition.
684 --                        If any approver is repeated in the table then it returns true, else it
685 --                        returns false.
686 
687 -- Pre-reqs             : None.
688 -- Parameters           :
689 -- IN                   : P_APPROVING_LIST  - Table of approvers to be validated for repetition.
690 
691 -- RETURN                : The correspinding boolean value indicating the result of the validation.
692 FUNCTION ARE_APPROVERS_REPEATING(P_APPROVER_LIST IN EDR_UTILITIES.APPROVERS_TABLE)
693 RETURN BOOLEAN;
694 
695 --Bug 4160412: End
696 
697 
698 
699 END EDR_UTILITIES;