1 PACKAGE AHL_WF_MAPPING_PVT AUTHID CURRENT_USER AS
2 /* $Header: AHLVWFMS.pls 120.0 2005/05/26 01:46:33 appldev noship $ */
3
4 -----------------------------------------------------------
5 -- PACKAGE
6 -- Ahl_Wf_Mapping_Pvt
7 --
8 -- PURPOSE
9 -- This package is a Private API for managing Workflow Mappping information in
10 -- Advanced Services Online. It contains specification for pl/sql records and tables
11 --
12 -- AHL_Wf_Mapping_V:
13 -- Create_Wf_Mapping (see below for specification)
14 -- Update_Wf_Mapping (see below for specification)
15 -- Delete_Wf_Mapping (see below for specification)
16 -- Validate_Wf_Mapping (see below for specification)
17 --
18 -- Check_Wf_Mapping_Items (see below for specification)
19 -- Check_Wf_Mapping_Record (see below for specification)
20 -- Init_Wf_Mapping_Rec
21 -- Complete_Wf_Mapping_Rec
22 --
23 -- NOTES
24 --
25 --
26 -- HISTORY
27 -- 21-JAN-2002 SHBHANDA Created.
28 -----------------------------------------------------------
29 -------------------------------------
30 -- Record for AHL_Wf_Mapping_V
31 TYPE Wf_Mapping_Rec_Type IS RECORD (
32 WF_Mapping_ID NUMBER,
33 OBJECT_VERSION_NUMBER NUMBER,
34 CREATION_DATE DATE,
35 CREATED_BY NUMBER,
36 LAST_UPDATE_DATE DATE,
37 LAST_UPDATED_BY NUMBER,
38 LAST_UPDATE_LOGIN NUMBER,
39 ACTIVE_FLAG VARCHAR2(1),
40 WF_PROCESS_NAME VARCHAR2(30),
41 WF_DISPLAY_NAME VARCHAR2(80),
42 APPROVAL_OBJECT VARCHAR2(30),
43 ITEM_TYPE VARCHAR2(8),
44 APPLICATION_USG_CODE VARCHAR2(30),
45 APPLICATION_USG VARCHAR2(80),
46 OPERATION_FLAG VARCHAR2(1)
47 );
48
49 -- Table for all Records of AHL_Wf_Mapping_V
50 Type Wf_Mapping_tbl IS TABLE OF Wf_Mapping_Rec_Type
51 INDEX BY BINARY_INTEGER;
52
53 ---------------------------------------------------------------------
54 -- PROCEDURE
55 -- Process_Wf_Mapping
56 --
57 -- PURPOSE
58 -- Process Wf_Mapping entry.
59 --
60 -- PARAMETERS
61 -- p_x_Wf_Mapping_tbl: the table of records representing AHL_Wf_Mapping table
62 --
63 -- NOTES
64 -- 1. Procedure helps out to link between JSP page and API package
65 -- 2. On the basis of operation flag as one field in each record type
66 -- the further procedure for create/update/delete.
67 ---------------------------------------------------------------------
68
69 PROCEDURE Process_Wf_Mapping (
70 p_api_version IN NUMBER := 1.0,
71 p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
72 p_commit IN VARCHAR2 := Fnd_Api.g_false,
73 p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
74 p_x_Wf_Mapping_tbl IN OUT NOCOPY Wf_Mapping_tbl,
75 x_return_status OUT NOCOPY VARCHAR2,
76 x_msg_count OUT NOCOPY NUMBER,
77 x_msg_data OUT NOCOPY VARCHAR2
78 );
79
80 ---------------------------------------------------------------------
81 -- PROCEDURE
82 -- Create_Wf_Mapping
83 --
84 -- PURPOSE
85 -- Create Wf_Mapping entry.
86 --
87 -- PARAMETERS
88 -- p_Wf_Mapping_rec: the record representing AHL_Wf_Mapping table
89 -- x_WF_Mapping_ID: the WF_Mapping_ID.
90 --
91 -- NOTES
92 -- 1. object_version_number will be set to 1.
93 -- 2. If Wf_Mapping_Id is passed in, the uniqueness will be checked.
94 -- Raise exception in case of duplicates.
95 -- 3. Please don't pass in any FND_API.g_miss_char/num/date.
96 ---------------------------------------------------------------------
97
98 PROCEDURE Create_Wf_Mapping (
99 p_api_version IN NUMBER := 1.0,
100 p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
101 p_commit IN VARCHAR2 := Fnd_Api.g_false,
102 p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
103 p_Wf_Mapping_Rec IN Wf_Mapping_Rec_Type,
104
105 x_return_status OUT NOCOPY VARCHAR2,
106 x_msg_count OUT NOCOPY NUMBER,
107 x_msg_data OUT NOCOPY VARCHAR2,
108 x_Wf_Mapping_Id OUT NOCOPY NUMBER
109 );
110
111 --------------------------------------------------------------------
112 -- PROCEDURE
113 -- Update_Wf_Mapping
114 --
115 -- PURPOSE
116 -- Update an Wf_Mapping entry.
117 --
118 --
119 -- PARAMETERS
120 -- p_Wf_Mapping_rec: the record representing AHL_Wf_Mapping_V (without the ROW_ID column).
121 --
122 -- NOTES
123 -- 1. Raise exception if the object_version_number doesn't match.
124 -- 2. If an attribute is passed in as FND_API.g_miss_char/num/date,
125 -- that column won't be updated.
126 --------------------------------------------------------------------
127
128 PROCEDURE Update_Wf_Mapping (
129 p_api_version IN NUMBER := 1.0,
130 p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
131 p_commit IN VARCHAR2 := Fnd_Api.g_false,
132 p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
133 p_Wf_Mapping_rec IN Wf_Mapping_Rec_Type,
134
135 x_return_status OUT NOCOPY VARCHAR2,
136 x_msg_count OUT NOCOPY NUMBER,
137 x_msg_data OUT NOCOPY VARCHAR2
138 );
139
140
141 --------------------------------------------------------------------
142 -- PROCEDURE
143 -- Delete_wf_mapping
144 --
145 -- PURPOSE
146 -- Delete a wf _mapping entry.
147 --
148 -- PARAMETERS
149 -- p_wf_mapping_id: the wf_mapping_id
150 -- p_object_version: the object_version_number
151 --
152 -- NOTES
153 -- 1. Raise exception if the object_version_number doesn't match.
154 -------------------------------------------------------------------
155 PROCEDURE Delete_Wf_mapping (
156 p_api_version IN NUMBER := 1.0,
157 p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
158 p_commit IN VARCHAR2 := Fnd_Api.g_false,
159 p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
160
161 x_return_status OUT NOCOPY VARCHAR2,
162 x_msg_count OUT NOCOPY NUMBER,
163 x_msg_data OUT NOCOPY VARCHAR2,
164
165 p_Wf_mapping_Id IN NUMBER,
166 p_object_version IN NUMBER
167 );
168
169 --------------------------------------------------------------------
170 -- PROCEDURE
171 -- Validate_Wf_Mapping
172 --
173 -- PURPOSE
174 -- Validate a Wf_Mapping entry.
175 --
176 -- PARAMETERS
177 -- p_Wf_Mapping_rec: the record representing AHL_Wf_Mapping_V (without ROW_ID).
178 --
179 -- NOTES
180 -- 1. p_Wf_Mapping_rec should be the complete Wf_Mapping record. There
181 -- should not be any FND_API.g_miss_char/num/date in it.
182 -- 2. If FND_API.g_miss_char/num/date is in the record, then raise
183 -- an exception, as those values are not handled.
184 --------------------------------------------------------------------
185
186 PROCEDURE Validate_Wf_Mapping (
187 p_api_version IN NUMBER := 1.0,
188 p_init_msg_list IN VARCHAR2 := Fnd_Api.g_false,
189 p_commit IN VARCHAR2 := Fnd_Api.g_false,
190 p_validation_level IN NUMBER := Fnd_Api.g_valid_level_full,
191
192 x_return_status OUT NOCOPY VARCHAR2,
193 x_msg_count OUT NOCOPY NUMBER,
194 x_msg_data OUT NOCOPY VARCHAR2,
195
196 p_Wf_Mapping_rec IN Wf_Mapping_Rec_Type
197 );
198
199 ---------------------------------------------------------------------
200 -- PROCEDURE
201 -- Check_Wf_Mapping_Items
202 --
203 -- PURPOSE
204 -- Perform the item level checking including unique keys,
205 -- required columns, foreign keys, domain constraints.
206 --
207 -- PARAMETERS
208 -- p_Wf_Mapping_rec: the record to be validated
209 -- p_validation_mode: JTF_PLSQL_API.g_create/g_update
210 ---------------------------------------------------------------------
211 PROCEDURE Check_Wf_Mapping_Items (
212 p_Wf_Mapping_rec IN Wf_Mapping_Rec_Type,
213 p_validation_mode IN VARCHAR2 := Jtf_Plsql_Api.g_create,
214
215 x_return_status OUT NOCOPY VARCHAR2
216 );
217
218 -- PROCEDURE
219 -- Init_Wf_Mapping_Rec
220 --
221 -- PURPOSE
222 -- Initialize all attributes to be FND_API.g_miss_char/num/date.
223 ---------------------------------------------------------------------
224 /*PROCEDURE Init_Wf_Mapping_Rec (
225 x_Wf_Mapping_rec OUT NOCOPY Wf_Mapping_Rec_Type
226 );
227 */
228
229 ---------------------------------------------------------------------
230 -- PROCEDURE
231 -- Complete_Wf_Mapping_Rec
232 --
233 -- PURPOSE
234 -- For Update_Wf_Mapping, some attributes may be passed in as
235 -- FND_API.g_miss_char/num/date if the user doesn't want to
236 -- update those attributes. This procedure will replace the
237 -- "g_miss" attributes with current database values.
238 --
239 -- PARAMETERS
240 -- p_Wf_Mapping_rec: the record which may contain attributes as
241 -- FND_API.g_miss_char/num/date
242 -- x_complete_rec: the complete record after all "g_miss" items
243 -- have been replaced by current database values
244 ---------------------------------------------------------------------
245 PROCEDURE Complete_Wf_Mapping_Rec (
246 p_Wf_Mapping_rec IN Wf_Mapping_Rec_Type,
247
248 x_complete_rec OUT NOCOPY Wf_Mapping_Rec_Type
249 );
250
251 END Ahl_Wf_Mapping_Pvt;