DBA Data[Home] [Help]

PACKAGE: APPS.GMO_INSTRUCTION_PVT

Source


1 PACKAGE GMO_INSTRUCTION_PVT AS
2 /* $Header: GMOVINTS.pls 120.5 2006/07/12 04:49:03 rahugupt noship $ */
3 
4 -- This API is called to create a definition context with multiple
5 -- entity name, entity key, entity display names, and Instruction
6 -- types. It is called before definition UI is invoked to create
7 -- the necessary context for definition
8 
9 -- Start of comments
10 -- API name             : CREATE_DEFN_CONTEXT
11 -- Type                 : Private API
12 -- Function             : Create the definition context for list
13 --                        of entity name and key pairs
14 
15 -- Pre-reqs             : None.
16 -- Parameters
17 
18 -- P_INSTRUCTION_PROCESS_ID Instruction Process Id for current Session.
19 -- P_ENTITY_NAME	   Table of entity names to be used during definition
20 -- P_ENTITY_KEY		   Table of entity keys
21 -- P_ENTITY_DISPLAYNAME    Table of MLS Compliant Entity display names
22 -- P_INSTRUCTION_TYPE      Table of Instruction Types to support in definition
23 -- P_MODE                  Mode of operation in definition UI = READ | UPDATE
24 -- P_CONTEXT_PARAMETERS    Table of context parameters
25 
26 -- X_INSTRUCTION_PROCESS_ID The transaction/ process id, used in the definition
27 --                          process to identify a particular session
28 
29 -- X_RETURN_STATUS         The return status based on standard API convention
30 -- X_MSG_COUNT             Message count
31 -- X_MSG_DATA              Return messages
32 
33 -- End of comments
34 
35 PROCEDURE CREATE_DEFN_CONTEXT
36 (
37     P_CURR_INSTR_PROCESS_ID IN NUMBER DEFAULT NULL,
38     P_ENTITY_NAME           IN FND_TABLE_OF_VARCHAR2_255,
39     P_ENTITY_KEY            IN FND_TABLE_OF_VARCHAR2_255,
40     P_ENTITY_DISPLAYNAME    IN FND_TABLE_OF_VARCHAR2_255,
41     P_INSTRUCTION_TYPE      IN FND_TABLE_OF_VARCHAR2_255,
42     P_MODE                  IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_INSTR_DEFN_MODE_UPDATE,
43     P_CONTEXT_PARAMETERS    IN GMO_DATATYPES_GRP.GMO_DEFINITION_PARAM_TBL_TYPE,
44     X_INSTRUCTION_PROCESS_ID OUT NOCOPY NUMBER,
45     X_RETURN_STATUS          OUT NOCOPY VARCHAR2,
46     X_MSG_COUNT              OUT NOCOPY NUMBER,
47     X_MSG_DATA               OUT NOCOPY VARCHAR2
48 );
49 
50 -- This API is called to create a definition context with single
51 -- entity name, entity key, entity display name, and Instruction
52 -- type. It is called before definition UI is invoked to create
53 -- the necessary context for definition.
54 
55 -- Start of comments
56 -- API name             : CREATE_DEFN_CONTEXT
57 -- Type                 : Private API
58 -- Function             : Create the definition context for single
59 --                        of entity name and key pair
60 
61 -- Pre-reqs             : None
62 -- Parameters
63 
64 -- P_INSTRUCTION_PROCESS_ID Instruction Process Id for current Session.
65 -- P_ENTITY_NAME	   Entity name to be used during definition
66 -- P_ENTITY_KEY		   Entity key
67 -- P_ENTITY_DISPLAYNAME    MLS Compliant Entity display name
68 -- P_INSTRUCTION_TYPE      Instruction Type to support in definition
69 -- P_MODE                  Mode of operation in definition UI = READ | UPDATE
70 -- P_CONTEXT_PARAMETERS    Table of context parameters
71 
72 -- X_INSTRUCTION_PROCESS_ID The transaction/ process id, used in the definition
73 --                          process to identify a particular session
74 
75 -- X_RETURN_STATUS         The return status based on standard API convention
76 -- X_MSG_COUNT             Message count
77 -- X_MSG_DATA              Return messages
78 
79 -- End of comments
80 
81 PROCEDURE CREATE_DEFN_CONTEXT
82 (
83     P_CURR_INSTR_PROCESS_ID IN NUMBER DEFAULT NULL,
84     P_ENTITY_NAME           IN VARCHAR2,
85     P_ENTITY_KEY            IN VARCHAR2,
86     P_ENTITY_DISPLAYNAME    IN VARCHAR2,
87     P_INSTRUCTION_TYPE      IN VARCHAR2,
88     P_MODE                  IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_INSTR_DEFN_MODE_UPDATE,
89     P_CONTEXT_PARAMETERS    IN GMO_DATATYPES_GRP.GMO_DEFINITION_PARAM_TBL_TYPE,
90     X_INSTRUCTION_PROCESS_ID OUT NOCOPY NUMBER,
91     X_RETURN_STATUS          OUT NOCOPY VARCHAR2,
92     X_MSG_COUNT              OUT NOCOPY NUMBER,
93     X_MSG_DATA               OUT NOCOPY VARCHAR2
94 );
95 
96 -- This API is called to create a definition context with multiple
97 -- entity name, entity key, entity display names, and Instruction
98 -- types. It is called before definition UI is invoked to create
99 -- the necessary context for definition. This flavor is used by
100 -- GMO_INSTR_GRP PLL Package, as FORMS does not support
101 -- FND_TABLE_OF_VARCHAR2_255
102 
103 -- Start of comments
104 -- API name             : CREATE_DEFN_CONTEXT
105 -- Type                 : Private API
106 -- Function             : Create the definition context for list
107 --                        of entity name and key pairs
108 
109 -- Pre-reqs             : None.
110 -- Parameters
111 
112 -- P_INSTRUCTION_PROCESS_ID Instruction Process Id for current Session.
113 -- P_ENTITY_NAME	   Table of entity names to be used during definition
114 -- P_ENTITY_KEY		   Table of entity keys
115 -- P_ENTITY_DISPLAYNAME    Table of MLS Compliant Entity display names
116 -- P_INSTRUCTION_TYPE      Table of Instruction Types to support in definition
117 -- P_MODE                  Mode of operation in definition UI = READ | UPDATE
118 -- P_CONTEXT_PARAMETERS    Table of context parameters
119 
120 -- X_INSTRUCTION_PROCESS_ID The transaction/ process id, used in the definition
121 --                          process to identify a particular session
122 
123 -- X_RETURN_STATUS         The return status based on standard API convention
124 -- X_MSG_COUNT             Message count
125 -- X_MSG_DATA              Return messages
126 
127 -- End of comments
128 
129 PROCEDURE CREATE_DEFN_CONTEXT
130 (
131     P_CURR_INSTR_PROCESS_ID IN NUMBER DEFAULT NULL,
132     P_ENTITY_NAME           IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
133     P_ENTITY_KEY            IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
134     P_ENTITY_DISPLAYNAME    IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
135     P_INSTRUCTION_TYPE      IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
136     P_MODE                  IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_INSTR_DEFN_MODE_UPDATE,
137     P_CONTEXT_PARAMETERS    IN GMO_DATATYPES_GRP.GMO_DEFINITION_PARAM_TBL_TYPE,
138     X_INSTRUCTION_PROCESS_ID OUT NOCOPY NUMBER,
139     X_RETURN_STATUS          OUT NOCOPY VARCHAR2,
140     X_MSG_COUNT              OUT NOCOPY NUMBER,
141     X_MSG_DATA               OUT NOCOPY VARCHAR2
142 );
143 
144 -- This API is called to delete the instructions related to an entity
145 -- from the Process Instructions System.
146 -- Start of comments
147 -- API name             : DELETE_ENTITY_FOR_PROCESS
148 -- Type                 : Group API
149 -- Function             : Create the definition context for list
150 --                        of entity name and key pairs
151 
152 -- Pre-reqs             : None.
153 -- Parameters
154 
155 -- P_CURR_INSTR_PROCESS_ID The current instruction process id for session.
156 -- P_ENTITY_NAME	   Table of entity names to be used during definition
157 -- P_ENTITY_KEY		   Table of entity keys
158 -- X_INSTRUCTION_PROCESS_ID The transaction/ process id, used in the definition
159 --                          process to identify a particular session
160 
161 -- X_RETURN_STATUS         The return status based on standard API convention
162 -- X_MSG_COUNT             Message count
163 -- X_MSG_DATA              Return messages
164 
165 -- End of comments
166 
167 PROCEDURE DELETE_ENTITY_FOR_PROCESS
168 (
169        P_CURR_INSTR_PROCESS_ID   IN NUMBER,
170        P_ENTITY_NAME             IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
171        P_ENTITY_KEY              IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
172        X_INSTRUCTION_PROCESS_ID  OUT NOCOPY NUMBER,
173        X_RETURN_STATUS           OUT NOCOPY VARCHAR2,
174        X_MSG_COUNT               OUT NOCOPY NUMBER,
175        X_MSG_DATA                OUT NOCOPY VARCHAR2
176 );
177 
178 -- This API is called to create a definition from existing
179 -- definition. It is called by the entity application to create
180 -- a new definition from existing ones
181 
182 -- Start of comments
183 -- API name             : CREATE_DEFN_FROM_DEFN
184 -- Type                 : Private API
185 -- Function             : Create the definition from existing definition
186 
187 -- Pre-reqs             : None.
188 -- Parameters
189 
190 -- P_SOURCE_ENTITY_NAME   Source entity name
191 -- P_SOURCE_ENTITY_KEY    Source entity key
192 
193 -- P_TARGET_ENTITY_NAME   Target entity name
194 -- P_TARGET_ENTITY_KEY    Target entity key
195 
196 -- P_INSTRUCTION_TYPE     Instruction Type
197 
198 -- X_INSTRUCTION_SET_ID   The INSTRUCTION_SET_ID of newly created definition
199 
200 -- X_RETURN_STATUS        The return status based on standard API convention
201 -- X_MSG_COUNT            Message count
202 -- X_MSG_DATA             Return messages
203 
204 -- End of comments
205 
206 PROCEDURE CREATE_DEFN_FROM_DEFN
207 (
208     P_SOURCE_ENTITY_NAME   IN VARCHAR2,
209     P_SOURCE_ENTITY_KEY    IN VARCHAR2,
210     P_TARGET_ENTITY_NAME   IN VARCHAR2,
211     P_TARGET_ENTITY_KEY    IN VARCHAR2,
212     P_INSTRUCTION_TYPE     IN VARCHAR2,
213     X_INSTRUCTION_SET_ID   OUT NOCOPY NUMBER,
214     X_RETURN_STATUS        OUT NOCOPY VARCHAR2,
215     X_MSG_COUNT            OUT NOCOPY NUMBER,
216     X_MSG_DATA             OUT NOCOPY VARCHAR2
217 );
218 
219 -- This API is called to send the definition acknowledgement
220 -- This API also copies the data from temporary tables to permenant
221 -- tables
222 
223 -- Start of comments
224 -- API name             : SEND_DEFN_ACKN
225 -- Type                 : Private API
226 -- Function             : Send definition acknowledgement
227 
228 -- Pre-reqs             : None
229 -- Parameters
230 
231 -- P_INSTRUCTION_PROCESS_ID  The instruction process id
232 -- P_ENTITY_NAME             The entity name
233 
234 -- P_SOURCE_ENTITY_KEY    Source entity key
235 -- P_TARGET_ENTITY_KEY    Target entity key
236 
237 -- X_RETURN_STATUS         The return status based on standard API convention
238 -- X_MSG_COUNT             Message count
239 -- X_MSG_DATA              Return messages
240 
241 -- End of comments
242 PROCEDURE SEND_DEFN_ACKN
243 (
244     P_INSTRUCTION_PROCESS_ID    IN NUMBER,
245     P_ENTITY_NAME               IN VARCHAR2,
246     P_SOURCE_ENTITY_KEY         IN VARCHAR2,
247     P_TARGET_ENTITY_KEY         IN VARCHAR2,
248     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
249     X_MSG_COUNT                 OUT NOCOPY NUMBER,
250     X_MSG_DATA                  OUT NOCOPY VARCHAR2
251 );
252 
253 -- This API is called to send the definition acknowledgement
254 -- for multiple entity name and key values
255 
256 -- This API also copies the data from temporary tables to permenant
257 -- tables
258 
259 -- Start of comments
260 -- API name             : SEND_DEFN_ACKN
261 -- Type                 : Private API
262 -- Function             : Send definition acknowledgement
263 
264 -- Pre-reqs             : None
265 -- Parameters
266 
267 -- P_INSTRUCTION_PROCESS_ID  The instruction process id
268 -- P_ENTITY_NAME          The entity name as FND_TABLE_OF_VARCHAR2_255
269 -- P_SOURCE_ENTITY_KEY    Source entity key
270 -- P_TARGET_ENTITY_KEY    Target entity key
271 
272 -- X_RETURN_STATUS         The return status based on standard API convention
273 -- X_MSG_COUNT             Message count
274 -- X_MSG_DATA              Return messages
275 
276 -- End of comments
277 
278 PROCEDURE SEND_DEFN_ACKN
279 (
280     P_INSTRUCTION_PROCESS_ID    IN NUMBER,
281     P_ENTITY_NAME               IN FND_TABLE_OF_VARCHAR2_255,
282     P_SOURCE_ENTITY_KEY         IN FND_TABLE_OF_VARCHAR2_255,
283     P_TARGET_ENTITY_KEY         IN FND_TABLE_OF_VARCHAR2_255,
284     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
285     X_MSG_COUNT                 OUT NOCOPY NUMBER,
286     X_MSG_DATA                  OUT NOCOPY VARCHAR2
287 );
288 
289 -- This API is called to send the definition acknowledgement
290 -- for multiple entity name and key values, from  FORMS
291 
292 -- This API also copies the data from temporary tables to permenant
293 -- tables
294 
295 -- Start of comments
296 -- API name             : SEND_DEFN_ACKN
297 -- Type                 : Private API
298 -- Function             : Send definition acknowledgement
299 
300 -- Pre-reqs             : None
301 -- Parameters
302 
303 -- P_INSTRUCTION_PROCESS_ID  The instruction process id
304 -- P_ENTITY_NAME          The entity name as FND_TABLE_OF_VARCHAR2_255
305 -- P_SOURCE_ENTITY_KEY    Source entity key
306 -- P_TARGET_ENTITY_KEY    Target entity key
307 
308 -- X_RETURN_STATUS         The return status based on standard API convention
309 -- X_MSG_COUNT             Message count
310 -- X_MSG_DATA              Return messages
311 
312 -- End of comments
313 
314 PROCEDURE SEND_DEFN_ACKN
315 (
316     P_INSTRUCTION_PROCESS_ID    IN NUMBER,
317     P_ENTITY_NAME               IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
318     P_SOURCE_ENTITY_KEY         IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
319     P_TARGET_ENTITY_KEY         IN GMO_DATATYPES_GRP.GMO_TABLE_OF_VARCHAR2_255,
320     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
321     X_MSG_COUNT                 OUT NOCOPY NUMBER,
322     X_MSG_DATA                  OUT NOCOPY VARCHAR2
323 );
324 
325 
326 
327 -- This API is called to create instance from definition
328 -- for given entity name, entity key and instruction type
329 
330 -- Start of comments
331 -- API name             : CREATE_INSTANCE_FROM_DEFN
332 -- Type                 : Private API
333 -- Function             : Creates an instance from the definition
334 
335 -- Pre-reqs             : None
336 -- Parameters
337 
338 -- P_DEFINITION_ENTITY_NAME  The definition entity name
339 -- P_DEFINITION_ENTITY_KEY   The definition entity key
340 -- P_INSTANCE_ENTITY_NAME    The instance entity name
341 -- P_INSTANCE_ENTITY_KEY     The instance entity key
342 
343 -- P_INSTRUCTION_TYPE        The instruction type
344 -- X_INSTRUCTION_SET_ID      The instruction set id output
345 
346 -- X_RETURN_STATUS         The return status based on
347 --                         standard API convention
348 
349 -- X_MSG_COUNT             Message count
350 -- X_MSG_DATA              Return messages
351 
352 -- End of comments
353 
354 PROCEDURE CREATE_INSTANCE_FROM_DEFN
355 (
356     P_DEFINITION_ENTITY_NAME    IN VARCHAR2,
357     P_DEFINITION_ENTITY_KEY     IN VARCHAR2,
358     P_INSTANCE_ENTITY_NAME      IN VARCHAR2,
359     P_INSTANCE_ENTITY_KEY       IN VARCHAR2,
360     P_INSTRUCTION_TYPE          IN VARCHAR2,
361     X_INSTRUCTION_SET_ID        OUT NOCOPY NUMBER,
362     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
363     X_MSG_COUNT                 OUT NOCOPY NUMBER,
364     X_MSG_DATA                  OUT NOCOPY VARCHAR2
365 );
366 
367 -- This API is called to create instance from instance
368 
369 -- Start of comments
370 -- API name             : CREATE_INSTANCE_FROM_INSTANCE
371 -- Type                 : Private API
372 -- Function             : Creates an instance from the instance
373 
374 -- Pre-reqs             : None
375 -- Parameters
376 
377 -- P_SOURCE_ENTITY_NAME   The INSTANCE entity name
378 -- P_SOURCE_ENTITY_KEY    The INSTANCE entity key
379 -- P_TARGET_ENTITY_KEY    The instance TARGET  entity key
380 
381 -- P_INSTRUCTION_TYPE     The instruction type
382 -- X_INSTRUCTION_SET_ID   The instruction set id
383 
384 -- X_RETURN_STATUS         The return status based on
385 --                         standard API convention
386 
387 -- X_MSG_COUNT             Message count
388 -- X_MSG_DATA              Return messages
389 
390 -- End of comments
391 
392 PROCEDURE CREATE_INSTANCE_FROM_INSTANCE
393 (
394     P_SOURCE_ENTITY_NAME        IN VARCHAR2,
395     P_SOURCE_ENTITY_KEY         IN VARCHAR2,
396     P_TARGET_ENTITY_KEY         IN VARCHAR2,
397     P_INSTRUCTION_TYPE          IN VARCHAR2,
398     X_INSTRUCTION_SET_ID        OUT NOCOPY NUMBER,
399     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
400     X_MSG_COUNT                 OUT NOCOPY NUMBER,
401     X_MSG_DATA                  OUT NOCOPY VARCHAR2
402 );
403 
404 -- This API is called to get mode for entity
405 -- The mode for entity is returned READ if all
406 -- instructions are compeleted in instruction set.
407 -- It is UPDATE is some instructions are pending,
408 -- and INSERT if there are no instruction defined
409 
410 -- Start of comments
411 -- API name             : GET_MODE_FOR_ENTITY
412 -- Type                 : Private API
413 -- Function             : Gets the mode for entity
414 
415 -- Pre-reqs             : None
416 -- Parameters
417 
418 -- P_ENTITY_NAME           The instance entity name
419 -- P_ENTITY_KEY            The instance entity key
420 -- P_INSTRUCTION_TYPE      The instruction type
421 -- X_MODE                  The MODE for entity
422 
423 -- X_RETURN_STATUS         The return status based on
424 --                         standard API convention
425 
426 -- X_MSG_COUNT             Message count
427 -- X_MSG_DATA              Return messages
428 
429 -- End of comments
430 
431 
432 PROCEDURE GET_MODE_FOR_ENTITY
433 (
434     P_ENTITY_NAME IN VARCHAR2,
435     P_ENTITY_KEY IN VARCHAR2,
436     P_INSTRUCTION_TYPE IN VARCHAR2,
437     X_MODE OUT NOCOPY VARCHAR2,
438     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
439     X_MSG_COUNT                 OUT NOCOPY NUMBER,
440     X_MSG_DATA                  OUT NOCOPY VARCHAR2
441 );
442 
443 -- This API is called to get the list of all instructions
444 -- in a single table type for given entity name, entity key
445 -- and instruction type. It returns Definition Time Instructions
446 
447 -- Start of comments
448 -- API name             : GET_DEFN_INSTRUCTIONS
449 -- Type                 : Private API
450 -- Function             : Gets all instructions for entity
451 
452 -- Pre-reqs             : None
453 -- Parameters
454 
455 -- P_API_VERSION	   API Version
456 -- P_INIT_MSG_LIST         Initialize message list default = FALSE
457 -- P_VALIDATION_LEVEL	   Default validation level = FULL
458 
459 -- P_ENTITY_NAME           The Definition Entity name
460 -- P_ENTITY_KEY            The Definition Entity key
461 -- P_INSTRUCTION_TYPE      The Instruction type
462 
463 -- X_INSTRUCTION_TABLE     GMO_INSTRUCTION_TBL_TYPE table of
464 --                         available instructions
465 
466 -- X_RETURN_STATUS         The return status based on
467 --                         standard API convention
468 
469 -- X_MSG_COUNT             Message count
470 -- X_MSG_DATA              Return messages
471 
472 -- End of comments
473 
474 PROCEDURE GET_DEFN_INSTRUCTIONS
475 (
476     P_ENTITY_NAME IN VARCHAR2,
477     P_ENTITY_KEY IN VARCHAR2,
478     P_INSTRUCTION_TYPE VARCHAR2,
479     X_INSTRUCTION_TABLE OUT NOCOPY GMO_DATATYPES_GRP.GMO_INSTRUCTION_TBL_TYPE,
480     X_RETURN_STATUS             OUT NOCOPY VARCHAR2,
481     X_MSG_COUNT                 OUT NOCOPY NUMBER,
482     X_MSG_DATA                  OUT NOCOPY VARCHAR2
483 );
484 
485 -- This API is checks if there are any pending instructions for
486 -- the given entity name, key and instruction type on instance
487 -- permenant tables
488 
489 -- Start of comments
490 -- API name             : HAS_PENDING_INSTRUCTIONS
491 -- Type                 : Private API
492 -- Function             : Gets the number of pending instructions
493 
494 -- Pre-reqs             : None
495 
496 -- Parameters
497 -- P_ENTITY_NAME           The Instance Entity name
498 -- P_ENTITY_KEY            The Instance Entity key
499 -- P_INSTRUCTION_TYPE      The Instruction type
500 
501 -- X_INSTRUCTION_PENDING   'Y' if there are pending instructions
502 --                         'N' otherwise
503 
504 -- X_TOTAL_INSTRUCTIONS      Total number of instructions for entity
505 -- X_OPTIONAL_PENDING_INSTR  Number of optional instructions pending
506 -- X_MANDATORY_PENDING_INSTR Number of mandatory instructions pending
507 
508 -- X_RETURN_STATUS         The return status based on standard API convention
509 -- X_MSG_COUNT             Message count
510 -- X_MSG_DATA              Return messages
511 
512 -- End of comments
513 
514 PROCEDURE HAS_PENDING_INSTRUCTIONS
515 (
516     P_ENTITY_NAME IN VARCHAR2,
517     P_ENTITY_KEY IN VARCHAR2,
518     P_INSTRUCTION_TYPE IN VARCHAR2,
519     X_INSTRUCTION_PENDING OUT NOCOPY VARCHAR2,
520     X_TOTAL_INSTRUCTIONS OUT NOCOPY NUMBER,
521     X_OPTIONAL_PENDING_INSTR OUT NOCOPY NUMBER,
522     X_MANDATORY_PENDING_INSTR OUT NOCOPY NUMBER,
523     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
524     X_MSG_COUNT                 OUT NOCOPY NUMBER,
525     X_MSG_DATA                  OUT NOCOPY VARCHAR2
526 );
527 
528 -- This API is checks if there are any pending instructions for
529 -- the given entity name, key and instruction type on instance
530 -- process / temporary tables
531 
532 -- Start of comments
533 -- API name             : HAS_PENDING_INSTR_FOR_PROCESS
534 -- Type                 : Private API
535 -- Function             : Gets number of pending instructions on
536 --                        particular process id
537 
538 -- Pre-reqs             : None
539 
540 -- Parameters
541 
542 -- P_INSTRUCTION_PROCESS_ID  The instruction process id
543 -- X_INSTRUCTION_PENDING   'Y' if there are pending instructions
544 --                         'N' otherwise
545 
546 -- X_TOTAL_INSTRUCTIONS      Total number of instructions for entity
547 -- X_OPTIONAL_PENDING_INSTR  Number of optional instructions pending
548 -- X_MANDATORY_PENDING_INSTR Number of mandatory instructions pending
549 
550 -- X_RETURN_STATUS         The return status based on standard API convention
551 -- X_MSG_COUNT             Message count
552 -- X_MSG_DATA              Return messages
553 
554 -- End of comments
555 
556 PROCEDURE HAS_PENDING_INSTR_FOR_PROCESS
557 (
558     P_INSTRUCTION_PROCESS_ID IN VARCHAR2,
559     X_INSTRUCTION_PENDING OUT NOCOPY VARCHAR2,
560     X_TOTAL_INSTRUCTIONS OUT NOCOPY NUMBER,
561     X_OPTIONAL_PENDING_INSTR OUT NOCOPY NUMBER,
562     X_MANDATORY_PENDING_INSTR OUT NOCOPY NUMBER,
563     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
564     X_MSG_COUNT                 OUT NOCOPY NUMBER,
565     X_MSG_DATA                  OUT NOCOPY VARCHAR2
566 );
567 
568 -- This API is called to send the instance acknowledgment
569 -- It acknowledges the instruction set and copies the temporary
570 -- data to permenant instance tables. It also marks all DONE instructions
571 -- to COMPLETE
572 
573 -- Start of comments
574 -- API name             : SEND_INSTANCE_ACKN
575 -- Type                 : Private API
576 -- Function             : Send instance acknowledgment
577 
578 -- Pre-reqs             : None
579 -- Parameters
580 
581 -- P_API_VERSION	   API Version
582 -- P_INIT_MSG_LIST         Initialize message list default = FALSE
583 -- P_VALIDATION_LEVEL	   Default validation level = FULL
584 
585 -- P_INSTRUCTION_PROCESS_ID  The instruction process id
586 -- P_ENTITY_NAME	     The instance entity name
587 -- P_ENTITY_KEY              The instance entity key
588 
589 -- X_RETURN_STATUS         The return status based on standard API convention
590 -- X_MSG_COUNT             Message count
591 -- X_MSG_DATA              Return messages
592 
593 -- End of comments
594 
595 PROCEDURE SEND_INSTANCE_ACKN
596 (
597     P_INSTRUCTION_PROCESS_ID IN NUMBER,
598     P_ENTITY_NAME IN VARCHAR2,
599     P_ENTITY_KEY IN VARCHAR2,
600     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
601     X_MSG_COUNT                 OUT NOCOPY NUMBER,
602     X_MSG_DATA                  OUT NOCOPY VARCHAR2
603 );
604 
605 -- This API is called to send the task acknowledgment
606 -- It acknowledges the task identifier, value and e-record
607 -- id into the GMO_INSTR_TASK_INSTANCE_T table
608 
609 -- Start of comments
610 -- API name             : SEND_TASK_ACKN
611 -- Type                 : Private API
612 -- Function             : Send task acknowledgment
613 
614 -- Pre-reqs             : None
615 -- Parameters
616 
617 -- P_INSTRUCTION_PROCESS_ID  The instruction process id
618 -- P_ENTITY_KEY              The instance entity key
619 
620 -- P_TASK_ERECORD_ID       The task e-record id array
621 -- P_TASK_IDENTIFIER       The task identifier array
622 -- P_TASK_VALUE            The task value array
623 
624 -- P_DISABLE_TASK          The default value is 'N', set this to 'Y', if the
625 --                         manual entry from task is to be disabled
626 
627 -- P_MANUAL_ENTRY          Whether, the task details being submitted are manually entered
628 --                         This parameter IS FOR internal USE only
629 
630 -- X_RETURN_STATUS         The return status based on standard API convention
631 -- X_MSG_COUNT             Message count
632 -- X_MSG_DATA              Return messages
633 
634 -- End of comments
635 
636 PROCEDURE SEND_TASK_ACKN
637 (
638     P_INSTRUCTION_ID IN NUMBER,
639     P_INSTRUCTION_PROCESS_ID IN NUMBER,
640     P_ENTITY_KEY IN VARCHAR2 DEFAULT NULL,
641     P_TASK_ERECORD_ID  IN FND_TABLE_OF_VARCHAR2_255,
642     P_TASK_IDENTIFIER IN FND_TABLE_OF_VARCHAR2_255,
643     P_TASK_VALUE IN FND_TABLE_OF_VARCHAR2_255,
644     P_DISABLE_TASK IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.NO,
645     P_MANUAL_ENTRY IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.NO,
646     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
647     X_MSG_COUNT                 OUT NOCOPY NUMBER,
648     X_MSG_DATA                  OUT NOCOPY VARCHAR2
649 );
650 
651 -- This API marks the instruction set as CANCEL
652 
653 -- Start of comments
654 -- API name             : NULLIFY_INSTR_FOR_ENTITY
655 -- Type                 : Private API
656 -- Function             : Nullifies instructions for entity
657 
658 -- Pre-reqs             : None
659 -- Parameters
660 
661 
662 -- P_ENTITY_NAME           The INSTANCE entity name
663 -- P_ENTITY_KEY            The instance entity key
664 -- P_INSTRUCTION_TYPE      The instruction type
665 
666 -- X_RETURN_STATUS         The return status based on standard API convention
667 -- X_MSG_COUNT             Message count
668 -- X_MSG_DATA              Return messages
669 
670 -- End of comments
671 
672 PROCEDURE NULLIFY_INSTR_FOR_ENTITY
673 (
674     P_ENTITY_NAME IN VARCHAR2,
675     P_ENTITY_KEY IN VARCHAR2,
676     P_INSTRUCTION_TYPE IN VARCHAR2,
677     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
678     X_MSG_COUNT     OUT NOCOPY NUMBER,
679     X_MSG_DATA      OUT NOCOPY VARCHAR2
680 );
681 
682 -- This API will mark all the optional instructions as complete
683 
684 -- Start of comments
685 -- API name             : COMPLETE_OPTIONAL_INSTR
686 -- Type                 : Private API
687 -- Function             : mark all the optional instructions as complete
688 -- Pre-reqs             : None
689 -- Parameters
690 
691 
692 -- P_INSTRUCTION_PROCESS_ID  The Instruction Process Id
693 -- X_RETURN_STATUS         The return status based on standard API convention
694 -- X_MSG_COUNT             Message count
695 -- X_MSG_DATA              Return messages
696 
697 -- End of comments
698 
699 PROCEDURE COMPLETE_OPTIONAL_INSTR
700 (
701     P_INSTRUCTION_PROCESS_ID IN NUMBER,
702     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
703     X_MSG_COUNT     OUT NOCOPY NUMBER,
704     X_MSG_DATA      OUT NOCOPY VARCHAR2
705 );
706 
707 
708 -- This API will get the definition status := MODIFIED | NO_CHANGE
709 
710 -- Start of comments
711 -- API name             : GET_DEFN_STATUS
712 -- Type                 : Private API
713 -- Function             : get the definition status := MODIFIED | NO_CHANGE
714 -- Pre-reqs             : None
715 -- Parameters
716 
717 -- P_INSTRUCTION_PROCESS_ID The definition time instruction_process_id
718 -- X_DEFINITION_STATUS      The definition status for given process id
719 
720 -- X_RETURN_STATUS         The return status based on standard API convention
721 -- X_MSG_COUNT             Message count
722 -- X_MSG_DATA              Return messages
723 
724 -- End of comments
725 
726 PROCEDURE GET_DEFN_STATUS
727 (
728     P_INSTRUCTION_PROCESS_ID IN NUMBER,
729     X_DEFINITION_STATUS OUT NOCOPY VARCHAR2,
730     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
731     X_MSG_COUNT OUT NOCOPY NUMBER,
732     X_MSG_DATA  OUT NOCOPY VARCHAR2
733 );
734 
735 -- This API will get the instance status := UNACKNOWLEDGED | ACKNOWLEDGED
736 
737 -- Start of comments
738 -- API name             : GET_INSTANCE_STATUS
739 -- Type                 : Private API
740 -- Function             : get the instance tatus := UNACKNOWLEDGED | ACKNOWLEDGED
741 -- Pre-reqs             : None
742 -- Parameters
743 
744 -- P_INSTRUCTION_PROCESS_ID The runtime instruction_process_id
745 -- X_DEFINITION_STATUS      The instance status for given process id
746 
747 -- X_RETURN_STATUS         The return status based on standard API convention
748 -- X_MSG_COUNT             Message count
749 -- X_MSG_DATA              Return messages
750 
751 -- End of comments
752 
753 PROCEDURE GET_INSTANCE_STATUS
754 (
755     P_INSTRUCTION_PROCESS_ID IN NUMBER,
756     X_INSTANCE_STATUS OUT NOCOPY VARCHAR2,
757     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
758     X_MSG_COUNT OUT NOCOPY NUMBER,
759     X_MSG_DATA  OUT NOCOPY VARCHAR2
760 );
761 
762 -- This API will capture the operator response and store it in Instance Temp Table
763 
764 -- Start of comments
765 -- API name             : CAPTURE_OPERATOR_RESPONSE
766 -- Type                 : Private API
767 -- Function             : Capture operator response
768 -- Pre-reqs             : None
769 -- Parameters
770 
771 -- IN  P_INSTRUCTION_PROCESS_ID : The runtime instruction_process_id
772 -- IN  P_INSTRUCTION_ID         : The instruction id of current instruction
773 -- IN  P_OPERATOR_ACKN          : The Operator Acknowledgment flag = Y or N
774 -- IN  P_INSTR_COMMENTS         : Instruction Comments entered by operator
775 -- IN  P_INSTR_STATUS           : Instruction Status
776 
777 -- OUT X_RETURN_STATUS          : The return status based on standard API convention
778 
779 -- End of comments
780 
781 PROCEDURE CAPTURE_OPERATOR_RESPONSE
782 (
783     P_INSTRUCTION_ID IN NUMBER,
784     P_INSTRUCTION_PROCESS_ID IN NUMBER,
785     P_OPERATOR_ACKN IN VARCHAR2,
786     P_INSTR_COMMENTS IN VARCHAR2,
787     P_INSTR_STATUS IN VARCHAR2,
788     X_RETURN_STATUS OUT NOCOPY VARCHAR2
789 );
790 
791 -- This API inserts instruction e-record details in e-records table
792 
793 -- Start of comments
794 -- API name             : GET_INSTANCE_STATUS
795 -- Type                 : Private API
796 -- Function             : get the instance tatus := UNACKNOWLEDGED | ACKNOWLEDGED
797 -- Pre-reqs             : None
798 -- Parameters
799 
800 -- IN  P_INSTRUCTION_PROCESS_ID : The runtime instruction_process_id
801 -- IN  P_INSTRUCTION_ID         : The instruction id of current instruction
802 -- IN  P_ERECORD_ID             : The instruction e-record Id
803 
804 -- OUT X_RETURN_STATUS          : The return status based on standard API convention
805 -- OUT X_MSG_COUNT              : Message count
806 -- OUT X_MSG_DATA               : Return messages
807 
808 -- End of comments
809 
810 PROCEDURE INSERT_ERECORD_DETAILS
811 (
812     P_INSTRUCTION_ID IN NUMBER,
813     P_INSTRUCTION_PROCESS_ID IN NUMBER,
814     P_INSTRUCTION_ERECORD_ID IN NUMBER,
815     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
816     X_MSG_COUNT OUT NOCOPY VARCHAR2,
817     X_MSG_DATA OUT NOCOPY VARCHAR2
818 );
819 
820 -- This API creates instance context when called by entity application
821 -- and returns an Instruction Process Id
822 
823 -- Start of comments
824 -- API name             : CREATE_INSTANCE_CONTEXT
825 -- Type                 : Private API
826 -- Function             : Create temporary instance for execution purposes
827 -- Pre-reqs             : None
828 -- Parameters
829 
830 -- IN  P_ENTITY_NAME            : The Entity Name
831 -- IN  P_ENTITY_KEY             : The Entity Key
832 -- IN  P_INSTRUCTION_TYPE       : The Instruction Type
833 -- IN  P_CONTEXT_PARAM_NAME     : Context parameter name
834 -- IN  P_CONTEXT_PARAM_VALUE    : Context parameter value
835 
836 -- OUT X_INSTRUCTION_PROCESS_ID : The runtime instruction_process_id
837 -- OUT X_RETURN_STATUS          : The return status based on standard API convention
838 -- OUT X_ERR_CODE               : SQL Error Code
839 -- OUT X_ERR_MSG                : Error message
840 
841 -- End of comments
842 
843 PROCEDURE CREATE_INSTANCE_CONTEXT
844 (
845     P_ENTITY_NAME IN VARCHAR2,
846     P_ENTITY_KEY IN VARCHAR2,
847     P_INSTRUCTION_TYPE IN VARCHAR2,
848     P_CONTEXT_PARAM_NAME IN FND_TABLE_OF_VARCHAR2_255,
849     P_CONTEXT_PARAM_VALUE IN FND_TABLE_OF_VARCHAR2_255,
850     X_INSTRUCTION_PROCESS_ID OUT NOCOPY NUMBER,
851     X_INSTRUCTION_SET_ID OUT NOCOPY NUMBER,
852     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
853     X_MSG_COUNT OUT NOCOPY NUMBER,
854     X_MSG_DATA OUT NOCOPY VARCHAR2
855 );
856 
857 -- This API creates instance context when called by entity application
858 -- and returns an Instruction Process Id
859 
860 -- Start of comments
861 -- API name             : CREATE_INSTANCE_CONTEXT
862 -- Type                 : Private API
863 -- Function             : Create temporary instance for execution purposes
864 -- Pre-reqs             : None
865 -- Parameters
866 
867 -- IN  P_INSTRUCTION_SET_ID     : The Instance Instruction Set Id
868 
869 -- IN  P_CONTEXT_PARAM_NAME     : Context parameter name
870 -- IN  P_CONTEXT_PARAM_VALUE    : Context parameter value
871 
872 -- OUT X_ENTITY_NAME            : The Entity Name
873 -- OUT X_ENTITY_KEY             : The Entity Key
874 -- OUT X_INSTRUCTION_TYPE       : The Instruction Type
875 -- OUT X_INSTRUCTION_PROCESS_ID : The runtime instruction_process_id
876 -- OUT X_RETURN_STATUS          : The return status based on standard API convention
877 -- OUT X_ERR_CODE               : SQL Error Code
878 -- OUT X_ERR_MSG                : Error message
879 
880 -- End of comments
881 
882 PROCEDURE CREATE_INSTANCE_CONTEXT
883 (
884     P_INSTRUCTION_SET_ID IN NUMBER,
885     P_CONTEXT_PARAM_NAME IN FND_TABLE_OF_VARCHAR2_255,
886     P_CONTEXT_PARAM_VALUE IN FND_TABLE_OF_VARCHAR2_255,
887     X_INSTRUCTION_PROCESS_ID OUT NOCOPY NUMBER,
888     X_ENTITY_NAME OUT NOCOPY VARCHAR2,
889     X_ENTITY_KEY OUT NOCOPY VARCHAR2,
890     X_INSTRUCTION_TYPE OUT NOCOPY VARCHAR2,
891     X_RETURN_STATUS OUT NOCOPY VARCHAR2,
892     X_MSG_COUNT OUT NOCOPY NUMBER,
893     X_MSG_DATA OUT NOCOPY VARCHAR2
894 );
895 
896 -- This API updates the definition status to ERROR or SUCCESS or CANCEL
897 
898 -- Start of comments
899 -- API name             : UPDATE_INSTR_ATTRIBUTES
900 -- Type                 : Private API
901 -- Function             : Update definition process status
902 -- Pre-reqs             : None
903 -- Parameters
904 
905 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
906 -- P_UPDATE_DEFN_STATUS      : The definition status
907 
908 -- End of comments
909 
910 PROCEDURE UPDATE_INSTR_ATTRIBUTES(P_INSTRUCTION_PROCESS_ID IN VARCHAR2,
911                                   P_UPDATE_DEFN_STATUS     IN VARCHAR2);
912 
913 
914 -- This API sets the instruction status attribute values for the specified
915 -- instruction process ID.
916 
917 -- Start of comments
918 -- API name             : SET_INSTR_STATUS_ATTRIBUTES
919 -- Type                 : Private API
920 -- Function             : Update definition process status
921 -- Pre-reqs             : None
922 -- Parameters
923 
924 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
925 -- P_UPDATE_DEFN_STATUS      : The definition status
926 
927 -- End of comments
928 
929 PROCEDURE SET_INSTR_STATUS_ATTRIBUTES(P_INSTRUCTION_PROCESS_ID IN VARCHAR2,
930                                           P_UPDATE_DEFN_STATUS     IN VARCHAR2);
931 
932 -- This API deletes all the data for given instruction process id
933 -- from temporary tables
934 
935 -- Start of comments
936 -- API name             : DELETE_INSTR_SET_DETAILS
937 -- Type                 : Private API
938 -- Function             : Delete temp data from process tables at definition time
939 -- Pre-reqs             : None
940 -- Parameters
941 
942 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
943 
944 -- End of comments
945 
946 PROCEDURE DELETE_INSTR_SET_DETAILS(P_INSTRUCTION_PROCESS_ID IN VARCHAR2);
947 
948 -- This API gets the value of temporary variable
949 -- from temporary tables
950 
951 -- Start of comments
952 -- API name             : GET_PROCESS_VARIABLE
953 -- Type                 : Private API
954 -- Function             : Gets value of process variable
955 -- Pre-reqs             : None
956 -- Parameters
957 
958 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
959 -- P_ATTRIBUTE_NAME          : Name of process variable
960 -- P_ATTRIBUTE_TYPE          : Type of process variable
961 
962 -- End of comments
963 
964 FUNCTION GET_PROCESS_VARIABLE
965 (
966   P_INSTRUCTION_PROCESS_ID IN NUMBER ,
967   P_ATTRIBUTE_NAME IN  VARCHAR2 ,
968   P_ATTRIBUTE_TYPE IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_PARAM_INTERNAL
969 )
970 RETURN VARCHAR2;
971 
972 -- This API inserts name and value of temporary variable
973 -- into temporary tables, alongwith type
974 
975 -- Start of comments
976 -- API name             : INSERT_PROCESS_VARIABLE
977 -- Type                 : Private API
978 -- Function             : Gets value of process variable
979 -- Pre-reqs             : None
980 -- Parameters
981 
982 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
983 -- P_ATTRIBUTE_NAME          : Name of process variable
984 -- P_ATTRIBUTE_VALUE         : Value of process variable
985 -- P_ATTRIBUTE_TYPE          : Type of process variable
986 
987 -- End of comments
988 
989 FUNCTION INSERT_PROCESS_VARIABLE
990 (
991   P_INSTRUCTION_PROCESS_ID IN NUMBER ,
992   P_ATTRIBUTE_NAME IN VARCHAR2 ,
993   P_ATTRIBUTE_VALUE IN VARCHAR2,
994   P_ATTRIBUTE_TYPE IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_PARAM_INTERNAL
995 )
996 RETURN VARCHAR2;
997 
998 -- This API inserts / updates name and value of temporary variable
999 -- into temporary tables, alongwith type
1000 
1001 -- Start of comments
1002 -- API name             : SET_PROCESS_VARIABLE
1003 -- Type                 : Private API
1004 -- Function             : Gets value of process variable
1005 -- Pre-reqs             : None
1006 -- Parameters
1007 
1008 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
1009 -- P_ATTRIBUTE_NAME          : Name of process variable
1010 -- P_ATTRIBUTE_VALUE         : Value of process variable
1011 -- P_ATTRIBUTE_TYPE          : Type of process variable
1012 
1013 -- End of comments
1014 
1015 FUNCTION SET_PROCESS_VARIABLE
1016 ( P_INSTRUCTION_PROCESS_ID IN NUMBER ,
1017   P_ATTRIBUTE_NAME IN VARCHAR2 ,
1018   P_ATTRIBUTE_VALUE IN VARCHAR2,
1019   P_ATTRIBUTE_TYPE IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_PARAM_INTERNAL
1020  )
1021 RETURN VARCHAR2;
1022 
1023 -- This API inserts / updates name and value of temporary variable
1024 -- into temporary tables, alongwith type
1025 
1026 -- Start of comments
1027 -- API name             : SET_PROCESS_VARIABLE
1028 -- Type                 : Private API
1029 -- Function             : Gets value of process variable
1030 -- Pre-reqs             : None
1031 -- Parameters
1032 
1033 -- P_INSTRUCTION_PROCESS_ID  : The runtime instruction_process_id
1034 -- P_ATTRIBUTE_NAME          : Name of process variable
1035 -- P_ATTRIBUTE_VALUE         : Value of process variable
1036 -- P_ATTRIBUTE_TYPE          : Type of process variable
1037 
1038 -- End of comments
1039 
1040 FUNCTION SET_PROCESS_ATTRIBUTES
1041 (
1042    P_INSTRUCTION_PROCESS_ID IN NUMBER,
1043    P_ATTRIBUTE_NAME IN FND_TABLE_OF_VARCHAR2_255,
1044    P_ATTRIBUTE_VALUE IN FND_TABLE_OF_VARCHAR2_255,
1045    P_ATTRIBUTE_TYPE IN VARCHAR2 DEFAULT GMO_CONSTANTS_GRP.G_PARAM_INTERNAL
1046 )
1047 RETURN VARCHAR2;
1048 
1049 -- This API validates the input e-record id's using ERES Public API
1050 
1051 -- Start of comments
1052 -- API name             : VALIDATE_TASK_ERECORD_ID
1053 -- Type                 : Private API
1054 -- Function             : Validates the input e-record id
1055 -- Pre-reqs             : None
1056 -- Parameters
1057 
1058 -- P_TASk_ERECORD_ID         : Table of e-record id's
1059 -- X_ERECORD_ID_INVALID      : Y if there is any invalid e-record id, other wise N
1060 -- X_ERECORD_LIST_STR        : List of invalid e-record id's
1061 
1062 -- OUT X_RETURN_STATUS          : The return status based on standard API convention
1063 -- OUT X_MSG_COUNT              : Message count
1064 -- OUT X_MSG_DATA               : Return messages
1065 
1066 -- End of comments
1067 
1068 PROCEDURE VALIDATE_TASK_ERECORD_ID (
1069   P_TASK_ERECORD_ID   IN FND_TABLE_OF_VARCHAR2_255,
1070   X_ERECORD_ID_INVALID OUT NOCOPY VARCHAR2,
1071   X_ERECORD_LIST_STR OUT NOCOPY VARCHAR2,
1072   X_RETURN_STATUS  OUT NOCOPY VARCHAR2,
1073   X_MSG_COUNT  OUT NOCOPY NUMBER,
1074   X_MSG_DATA  OUT NOCOPY VARCHAR2
1075 );
1076 
1077 -- Start of comments
1078 -- API name             : GET_INSTR_XML
1079 -- Type                 : Private
1080 -- Function             : This procedure returns the instruction set and all the related instruction details
1081 --                      : in XML format for the specified instruction process ID.
1082 -- Pre-reqs             : None
1083 --
1084 -- Parameters
1085 -- IN                   : P_INSTRUCTION_PROCESS_ID  - The instruction process ID.
1086 -- OUT                  : X_OUTPUT_XML              - The final XML.
1087 
1088 -- End of comments
1089 
1090 PROCEDURE GET_INSTR_XML( P_INSTRUCTION_PROCESS_ID IN NUMBER,
1091                           X_OUTPUT_XML             OUT NOCOPY CLOB
1092 			);
1093 
1094 
1095 -- Start of comments
1096 -- API name             : GET_TASK_PARAMETER
1097 -- Type                 : Private
1098 -- Function             : This function returns the task parameter
1099 -- Pre-reqs             : None
1100 --
1101 -- Parameters
1102 -- IN                   : P_INSTRUCTION_PROCESS_ID  - The instruction process ID.
1103 -- OUT                  : P_ATTRIBUTE_NAME          - The attribute name
1104 
1105 -- End of comments
1106 
1107 FUNCTION GET_TASK_PARAMETER
1108 (
1109   P_INSTRUCTION_PROCESS_ID IN NUMBER,
1110   P_ATTRIBUTE_NAME IN VARCHAR2
1111 )
1112 RETURN VARCHAR2;
1113 
1114 -- Start of comments
1115 
1116 -- API name             : ADD_INSTRUCTIONS
1117 -- Type                 : Private
1118 -- Function             : This procedure appends instructions after the instruction id specified in P_INSTRUCTION_ID
1119 -- Pre-reqs             : None
1120 --
1121 -- Parameters
1122 -- IN                   : P_INSTRUCTION_PROCESS_ID  - The instruction process ID.
1123 -- IN                   : P_INSTRUCTION_ID          - Instruction id after which to add new instructions.
1124 -- IN                   : P_INSTRUCTION_SET_ID      - Instruction set id
1125 -- IN                   : P_ADD_MODE                - MOde of addition AFTER or BEFORE
1126 -- IN                   : P_INSTRUCTION_NOS         - The instruction numbers to be set.
1127 
1128 -- X_RETURN_STATUS      :  The return status based on standard API convention
1129 -- X_MSG_COUNT          :  Message count
1130 -- X_MSG_DATA           :  Return messages
1131 
1132 -- End of comments
1133 
1134 PROCEDURE ADD_INSTRUCTIONS
1135 (
1136        P_INSTRUCTION_PROCESS_ID IN NUMBER,
1137        P_INSTRUCTION_SET_ID IN NUMBER,
1138        P_INSTRUCTION_ID IN NUMBER,
1139        P_ADD_MODE IN VARCHAR2,
1140        P_INSTRUCTIONS IN FND_TABLE_OF_VARCHAR2_255,
1141        P_INSTRUCTION_NOS IN FND_TABLE_OF_VARCHAR2_255,
1142        X_RETURN_STATUS OUT NOCOPY VARCHAR2,
1143        X_MSG_COUNT OUT NOCOPY NUMBER,
1144        X_MSG_DATA OUT NOCOPY VARCHAR2
1145 );
1146 
1147 
1148 -- Start of comments
1149 -- API name             : GET_INSTR_INSTANCE_XML
1150 -- Type                 : Private Function.
1151 -- Function             : This function is used to obtain the instance details of instructions in XML format for the
1152 --                        specified instruction process ID.
1153 -- Pre-reqs             : None
1154 --
1155 -- IN                   : P_INSTRUCTION_PROCESS_ID - The instruction process ID
1156 --
1157 -- OUT                   : X_OUTPUT_XML - The instance instruction details in XML format.
1158 --End of comments
1159 
1160 PROCEDURE GET_INSTR_INSTANCE_XML
1161 (
1162    P_INSTRUCTION_PROCESS_ID IN NUMBER,
1163    X_OUTPUT_XML OUT NOCOPY CLOB
1164 );
1165 
1166 -- Start of comments
1167 -- API name             : TERMINATE_INSTR_DEFN_PROCESS
1168 -- Type                 : Private Procedure.
1169 -- Function             : This procedure is used to terminate the instruction definition process identified by the
1170 --                        specified process ID.
1171 -- Pre-reqs             : None
1172 --
1173 -- IN                   : P_INSTRUCTION_PROCESS_ID - The instruction process ID
1174 --End of comments
1175 PROCEDURE TERMINATE_INSTR_DEFN_PROCESS
1176 (P_INSTRUCTION_PROCESS_ID NUMBER);
1177 
1178 --Bug 5383022: start
1179 
1180 -- Start of comments
1181 -- API name             : is_task_attribute_used
1182 -- Type                 : Private Procedure.
1183 -- Function             : This procedure is used to check if the task attribute is used
1184 -- Pre-reqs             : None
1185 --
1186 -- IN                   : P_INSTRUCTION_PROCESS_ID - The instruction process ID
1187 --                        p_attribute_name - attribute name
1188 --                        p_attribute_key - attribute key
1189 -- OUT                  : x_used_flag - used flag
1190 --                        x_return_status - return status
1191 --                        x_msg_count - message count
1192 --                        x_msg_data - message data
1193 --End of comments
1194 
1195 procedure is_task_attribute_used
1196 (
1197 	p_instruction_process_id IN number,
1198 	p_attribute_name IN varchar2,
1199 	p_attribute_key IN varchar2,
1200 	x_used_flag OUT NOCOPY varchar2,
1201 	x_return_status OUT NOCOPY varchar2,
1202 	x_msg_count OUT NOCOPY number,
1203 	x_msg_data OUT NOCOPY varchar2
1204 );
1205 
1206 --Bug 5383022: end
1207 
1208 END GMO_INSTRUCTION_PVT;