1 PACKAGE CS_ERES_INT_PKG AUTHID CURRENT_USER AS
2 /* $Header: cseresps.pls 120.2 2006/03/22 14:03:05 spusegao noship $ */
3
4 -- Procedure Start Approval Process
5 ------------------------------------
6 -- Description :
7 -- Start Approval Process procedure will be called from Update Service Request
8 -- and Update Status APIs to initiate the service request approval process if a
9 -- service request is being updated to a status that has an intermediate status defined.
10 --
11 -- Parameters
12 -- 1. P_Incident_ID - Service Request Identifier to fetch the SR details that are required
13 -- to generate the XML document essential for SR approval process.
14 -- 2. P_Incident_type_id - Service Request Type Identifier to check if the service request
15 -- requires a detailed E-record to be generated.
16 -- 3. X_Approval_Status - An OUT parameter that conveys the approval status of the process.
17 -- Possible Values
18 -- a. NOACTION - Indicating that the service request does not require an approval and
19 -- the service request can be updated to the user request target status.
20 -- b. PENDING - Indicating that the service request requires an approval and should
21 -- be updated to the intermediate status.
22 -- c. ERROR - Indicating that the SR Approval process is failed. The service request
23 -- should be updated to the initial status.
24 --
25 -- 4. X_Return_status - Standard API return status.
26 -- 5. X_Msg_count - Standard API parameter. Count of error or warning messages.
27 -- 6. X_Msg_data - Standard API parameter. Concatenated string of error or warning messages.
28 --
29 PROCEDURE Start_Approval_Process
30 ( P_Incident_id IN NUMBER,
31 P_Incident_type_id IN NUMBER,
32 P_Incident_Status_Id IN NUMBER,
33 P_QA_Collection_Id IN NUMBER,
34 X_Approval_status OUT NOCOPY VARCHAR2,
35 X_Return_status OUT NOCOPY VARCHAR2,
36 X_Msg_count OUT NOCOPY NUMBER,
37 X_Msg_data OUT NOCOPY VARCHAR2 );
38
39
40 -- Function Generate XML Document
41 ------------------------------------
42 -- Description :
43 -- Generate XML Document Procedure will be called by an ERES APIs to create an XML document for
44 -- a service request if there exist an AME rule that requires the approval process to be singed
45 -- and approved.
46
47 --
48 -- Parameters
49 -- 1. P_Incident_ID - Service Request Identifier to fetch the SR details that are required
50 -- to generate the XML document essential for SR approval process.
51 -- 2. P_Detailed_XML_Reqd - An Indicator whether to generate a detailed XML document or a lighter version
52 -- XML document.
53 -- 3. X_Return_status - Standard API return status.
54 -- 4. X_Msg_count - Standard API parameter. Count of error or warning messages.
55 -- 5. X_Msg_data - Standard API parameter. Concatenated string of error or warning messages.
56 --
57
58 FUNCTION Generate_XML_Document
59 ( P_Incident_Id IN NUMBER,
60 P_Detailed_xml_reqd IN VARCHAR2 ) RETURN CLOB;
61
62
63 -- Procedure Post Approval Process
64 ------------------------------------
65 -- Description :
66 --
67 -- Parameters
68 -- 1. P_Incident_Id - Service Request Identifier to update service request doing post approval process.
69 -- 2. P_Intermediate_Status_Id - Intermediate Status identifier to derive the target status of the service request.
70 -- 3. X_Return_status - Standard API return status.
71 -- 4. X_Msg_count - Standard API parameter. Count of error or warning messages.
72 -- 5. X_Msg_data - Standard API parameter. Concatenated string of error or warning messages.
73 --
74 PROCEDURE Post_Approval_Process
75 ( P_Incident_id IN NUMBER,
76 P_Intermediate_Status_Id IN NUMBER ) ;
77 /*
78 PROCEDURE Post_Approval_Proccess
79 ( P_Incident_id IN NUMBER,
80 P_Intermediate_Status_Id IN NUMBER,
81 X_Return_status OUT NOCOPY VARCHAR2,
82 X_Msg_count OUT NOCOPY NUMBER,
83 X_Msg_data OUT NOCOPY NUMBER) ;
84 */
85
86 -- Procedure Get Target SR Status
87 ------------------------------------
88 -- Description :
89 --
90 -- Parameters
91 --
92 -- 4. X_Return_status - Standard API return status.
93 -- 5. X_Msg_count - Standard API parameter. Count of error or warning messages.
94 -- 6. X_Msg_data - Standard API parameter. Concatenated string of error or warning messages.
95 --
96
97 PROCEDURE Get_Target_SR_Status
98 ( P_Incident_Id IN NUMBER,
99 P_Intermediate_Status_Id IN NUMBER,
100 P_Action IN VARCHAR2,
101 X_Target_Status_Id OUT NOCOPY NUMBER,
102 X_Return_Status OUT NOCOPY VARCHAR2,
103 X_Msg_count OUT NOCOPY NUMBER,
104 X_Msg_data OUT NOCOPY NUMBER) ;
105
106 -- Following functions are internally used by the Generate_XML_Document while generating the
107 -- XML Document.
108 ---------------------------------------------------------------------------------------------
109
110 function Get_Related_Objs (x_incident_id number) return cs_sr_related_OBJ_list_t;
111
112 function Get_Related_SRs (x_incident_id number) return cs_sr_related_SR_list_t;
113
114 function Get_SR_Notes (x_incident_id number,
115 l_source_timezone_id number,
116 l_desc_timezone_id number,
117 l_date_format varchar2) return cs_sr_note_list_t;
118
119 function Get_SR_Tasks (x_incident_id number,
120 l_source_timezone_id number,
121 l_desc_timezone_id number,
122 l_date_format varchar2) return cs_sr_task_list_t;
123
124 END CS_ERES_INT_PKG;