1 PACKAGE IBC_CITEM_WORKFLOW_PVT AUTHID CURRENT_USER as
2 /* $Header: ibcciwfs.pls 120.3 2005/10/20 12:27:11 appldev ship $ */
3 /*#
4 * This is the private API for OCM Content Item Worklow functionality.
5 * Some of these methods are exposed as Java APIs in ApprovalManager.class
6 * @rep:scope private
7 * @rep:product IBC
8 * @rep:displayname Oracle Content Manager Content Item Workflow API
9 * @rep:category BUSINESS_ENTITY IBC_CITEM_WORKFLOW
10 */
11
12 /*#
13 * Procedure to be called from WF to actually perform the approval process.
14 * (Standard WF API) If it's approved succesfully then 'COMPLETE:Y' will be
15 * returned, otherwise 'COMPLETE:N' along with error stack assigned to
16 * 'ERROR_MESSAGE_STACK' WF Attribute.
17 * Parameters are the standard for WF callback procedures.
18 *
19 * @param itemtype WF Item Type
20 * @param itemkey WF Item Key
21 * @param actid Activity Id
22 * @param funcmode Function Mode
23 * @param result WF Result
24 *
25 * @rep:displayname approve_citem_version
26 *
27 */
28 PROCEDURE Approve_Citem_Version(
29 itemtype IN VARCHAR2
30 ,itemkey IN VARCHAR2
31 ,actid IN NUMBER
32 ,funcmode IN VARCHAR2
33 ,result IN OUT NOCOPY VARCHAR2
34 );
35
36 /*#
37 * Fetches all notifications for current user associated to Content
38 * Manager and with the format set by Submit_for_Approval
39 *
40 * @param x_citem_version_ids Table of content item version ids
41 * @param x_wf_item_keys Table of Workflow Item Keys, these values can
42 * be used to respond (Approve or Reject)
43 * notifications calling Respond_Approval_Notification
44 * @param p_api_version standard parm - API Version
45 * @param p_init_msg_list standard parm - Initialize message list
46 * @param x_return_status standard parm - Return Status
47 * @param x_msg_count standard parm - Message Count
48 * @param x_msg_data standard parm - Message Data
49 *
50 * @rep:displayname Get_Pending_Approvals
51 *
52 */
53 PROCEDURE Get_Pending_Approvals(
54 x_citem_version_ids OUT NOCOPY jtf_number_table
55 ,x_wf_item_keys OUT NOCOPY jtf_varchar2_table_100
56 ,p_api_version IN NUMBER DEFAULT 1.0
57 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
58 ,x_return_status OUT NOCOPY VARCHAR2
59 ,x_msg_count OUT NOCOPY NUMBER
60 ,x_msg_data OUT NOCOPY VARCHAR2
61 );
62
63 /*#
64 * Fetches all notifications (for current user) associated to Content
65 * Manager and for translation requests
66 *
67 * @param x_citem_version_ids Table of content item version ids
68 * @param x_wf_item_keys Table of Workflow Item Keys, these values
69 * can be used to close notifications calling
70 * close_fyi_notification
71 * @param p_api_version standard parm - API Version
72 * @param p_init_msg_list standard parm - Initialize message list
73 * @param x_return_status standard parm - Return Status
74 * @param x_msg_count standard parm - Message Count
75 * @param x_msg_data standard parm - Message Data
76 *
77 * @rep:displayname Get_Pending_Translations
78 *
79 */
80 PROCEDURE Get_Pending_Translations(
81 x_citem_version_ids OUT NOCOPY jtf_number_table
82 ,x_wf_item_keys OUT NOCOPY jtf_varchar2_table_100
83 ,p_api_version IN NUMBER DEFAULT 1.0
84 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
85 ,x_return_status OUT NOCOPY VARCHAR2
86 ,x_msg_count OUT NOCOPY NUMBER
87 ,x_msg_data OUT NOCOPY VARCHAR2
88 );
89
90 /*#
91 * Procedure to be called from WF to process the response for approval
92 * notification request.
93 * It focuses more on REJECTED response to set callback URL
94 * Parameters are the standard for WF callback procedures.
95 *
96 * @param itemtype WF Item Type
97 * @param itemkey WF Item Key
98 * @param actid Activity Id
99 * @param funcmode Function Mode
100 * @param result WF Result
101 *
102 * @rep:displayname Process_Approval_Response
103 *
104 */
105 PROCEDURE Process_Approval_Response(itemtype IN VARCHAR2,
106 itemkey IN VARCHAR2,
107 actid IN NUMBER,
108 funcmode IN VARCHAR2,
109 result IN OUT NOCOPY VARCHAR2);
110
111 /*#
112 * Determines if translations requests need to be sent.
113 *
114 * @param itemtype WF Item Type
115 * @param itemkey WF Item Key
116 * @param actid Activity Id
117 * @param funcmode Function Mode
118 * @param result WF Result
119 *
120 * @rep:displayname Process_Translations
121 *
122 */
123 PROCEDURE Process_Translations(itemtype IN VARCHAR2,
124 itemkey IN VARCHAR2,
125 actid IN NUMBER,
126 funcmode IN VARCHAR2,
127 result IN OUT NOCOPY VARCHAR2);
128
129 /*#
130 * Responds approval notification request, and optionally pass
131 * notes/comments to submitter.
132 *
133 * @param p_item_type WF Item Type
134 * @param p_item_key WF Item Key
135 * @param p_activity Activity Id
136 * @param p_response Response to Notification (either Y or N)
137 * @param p_notes_to_submitter Notes/Comments to Submitter
138 * @param p_commit standard parm - Commit flag
139 * @param p_api_version standard parm - API Version
140 * @param p_init_msg_list standard parm - Initialize message list
141 * @param x_return_status standard parm - Return Status
142 * @param x_msg_count standard parm - Message Count
143 * @param x_msg_data standard parm - Message Data
144 *
145 * @rep:displayname Respond_Approval_Notification
146 *
147 */
148 PROCEDURE Respond_Approval_Notification(
149 p_item_type IN VARCHAR2 DEFAULT 'IBC_WF'
150 ,p_item_key IN VARCHAR2
151 ,p_activity IN VARCHAR2 DEFAULT 'IBC_CITEM_APPROVE_NOTIFICATION'
152 ,p_response IN VARCHAR2
153 ,p_notes_to_submitter IN VARCHAR2 DEFAULT NULL
154 ,p_commit IN VARCHAR2 DEFAULT FND_API.g_false
155 ,p_api_version IN NUMBER DEFAULT 1.0
156 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
157 ,x_return_status OUT NOCOPY VARCHAR2
158 ,x_msg_count OUT NOCOPY NUMBER
159 ,x_msg_data OUT NOCOPY VARCHAR2
160 );
161
162 /*#
163 * Closes Translation Request from inbox
164 *
165 * @param p_item_type WF Item Type
166 * @param p_item_key WF Item Key
167 * @param p_commit standard parm - Commit flag
168 * @param p_api_version standard parm - API Version
169 * @param p_init_msg_list standard parm - Initialize message list
170 * @param x_return_status standard parm - Return Status
171 * @param x_msg_count standard parm - Message Count
172 * @param x_msg_data standard parm - Message Data
173 *
174 * @rep:displayname Close_Translation_Request
175 *
176 */
177 PROCEDURE Close_Translation_Request(
178 p_item_type IN VARCHAR2 DEFAULT 'IBC_WF'
179 ,p_item_key IN VARCHAR2
180 ,p_commit IN VARCHAR2 DEFAULT FND_API.g_false
181 ,p_api_version IN NUMBER DEFAULT 1.0
182 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
183 ,x_return_status OUT NOCOPY VARCHAR2
184 ,x_msg_count OUT NOCOPY NUMBER
185 ,x_msg_data OUT NOCOPY VARCHAR2
186 );
187
188 /*#
189 * It launches Content Item Approval Workflow process
190 *
191 * @param p_citem_ver_id Content Item Version ID
192 * @param p_notes_to_approver Comments/Notes send to approver(s)
193 * @param p_priority WF Notification priority
194 * @param p_callback_URL URL Link to be shown in the notification
195 * in order to access the content item
196 * Some parameters will be replaced in the
197 * content (parameters are prefixed with an
198 * Ampersand and all uppercase):
199 * CITEM_VERSION_ID => Content Item version ID
200 * ITEM_TYPE => WF Item Type
201 * ITEM_KEY => WF Item Key
202 * ACTION_MODE => Action Mode (SUBMITTED,
203 * APPROVED or REJECTED)
204 * @param p_callback_url_description Description to appear in notification
205 * @param p_language Content Item's Language
206 * @param p_commit standard parm - Commit flag
207 * @param p_api_version standard parm - API Version
208 * @param p_init_msg_list standard parm - Initialize message list
209 * @param px_object_version_number Object_Version_Number
210 * @param x_wf_item_key WF Item key
211 * @param x_return_status standard parm - Return Status
212 * @param x_msg_count standard parm - Message Count
213 * @param x_msg_data standard parm - Message Data
214 *
215 * @rep:displayname Submit_For_Approval
216 *
217 */
218 PROCEDURE Submit_For_Approval(
219 p_citem_ver_id IN NUMBER
220 ,p_notes_to_approver IN VARCHAR2 DEFAULT NULL
221 ,p_priority IN NUMBER DEFAULT NULL
222 ,p_callback_url IN VARCHAR2 DEFAULT NULL
223 ,p_callback_url_description IN VARCHAR2 DEFAULT NULL
224 ,p_language IN VARCHAR2 DEFAULT USERENV('LANG')
225 ,p_commit IN VARCHAR2 DEFAULT FND_API.g_false
226 ,p_api_version IN NUMBER DEFAULT 1.0
227 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
228 ,px_object_version_number IN OUT NOCOPY NUMBER
229 ,x_wf_item_key OUT NOCOPY VARCHAR2
230 ,x_return_status OUT NOCOPY VARCHAR2
231 ,x_msg_count OUT NOCOPY NUMBER
232 ,x_msg_data OUT NOCOPY VARCHAR2
233 );
234
235 /*#
236 * It launches Content Item Translation Approval Workflow process
237 *
238 * @param p_citem_ver_id Content Item Version ID
239 * @param p_notes_to_approver Comments/Notes send to approver(s)
240 * @param p_priority WF Notification priority
241 * @param p_callback_URL URL Link to be shown in the notification
242 * in order to access the content item
243 * Some parameters will be replaced in the
244 * content (parameters are prefixed with an
245 * Ampersand and all uppercase):
246 * CITEM_VERSION_ID => Content Item version ID
247 * ITEM_TYPE => WF Item Type
248 * ITEM_KEY => WF Item Key
249 * ACTION_MODE => Action Mode (SUBMITTED,
250 * APPROVED or REJECTED)
251 * @param p_callback_url_description Description to appear in notification
252 * @param p_language Content Item's Language
253 * @param px_object_version_number Content Item Object Version Number
254 * @param x_wf_item_key WF item key
255 * @param p_commit standard parm - Commit flag
256 * @param p_api_version standard parm - API Version
257 * @param p_init_msg_list standard parm - Initialize message list
258 * @param x_return_status standard parm - Return Status
259 * @param x_msg_count standard parm - Message Count
260 * @param x_msg_data standard parm - Message Data
261 *
262 * @rep:displayname Submit_For_Trans_Approval
263 *
264 */
265 PROCEDURE Submit_For_Trans_Approval(
266 p_citem_ver_id IN NUMBER
267 ,p_notes_to_approver IN VARCHAR2 DEFAULT NULL
268 ,p_priority IN NUMBER DEFAULT NULL
269 ,p_callback_url IN VARCHAR2 DEFAULT NULL
270 ,p_callback_url_description IN VARCHAR2 DEFAULT NULL
271 ,p_language IN VARCHAR2 DEFAULT USERENV('LANG')
272 ,p_commit IN VARCHAR2 DEFAULT FND_API.g_false
273 ,p_api_version IN NUMBER DEFAULT 1.0
274 ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
275 ,px_object_version_number IN OUT NOCOPY NUMBER
276 ,x_wf_item_key OUT NOCOPY VARCHAR2
277 ,x_return_status OUT NOCOPY VARCHAR2
278 ,x_msg_count OUT NOCOPY NUMBER
279 ,x_msg_data OUT NOCOPY VARCHAR2
280 );
281
282
283 /*#
284 * Procedure to be called from WF to process the response for translation
285 * approval(TA) notification request. It focuses more on REJECTED response
286 * to set callback URL
287 *
288 * @param itemtype WF Item Type
289 * @param itemkey WF Item Key
290 * @param actid Activity Id
291 * @param funcmode Function Mode
292 * @param result WF Result
293 *
294 * @rep:displayname Process_TA_Response
295 *
296 */
297 PROCEDURE Process_TA_Response(itemtype IN VARCHAR2
298 ,itemkey IN VARCHAR2
299 ,actid IN NUMBER
300 ,funcmode IN VARCHAR2
301 ,result IN OUT NOCOPY VARCHAR2
302 );
303
304
305 /*#
306 * Procedure to be called from WF to actually perform the translation
307 * approval process thru status change API. If it's approved succesfully
308 * then 'COMPLETE:Y' will be returned and callback URL updated, otherwise
309 * 'COMPLETE:N' will be returned along with error stack assigned to
310 * 'ERROR_MESSAGE_STACK' WF Attribute.
311 *
312 * @param itemtype WF Item Type
313 * @param itemkey WF Item Key
314 * @param actid Activity Id
315 * @param funcmode Function Mode
316 * @param result WF Result
317 *
318 * @rep:displayname Approve_Translation
319 *
320 */
321 PROCEDURE Approve_Translation(itemtype IN VARCHAR2
322 ,itemkey IN VARCHAR2
323 ,actid IN NUMBER
324 ,funcmode IN VARCHAR2
325 ,result IN OUT NOCOPY VARCHAR2
326 );
327
328 /*#
329 * Checks for notifications to be left without approvers.
330 *
331 * @return TRUE/FALSE whether notifications are going to be left without
332 * approvers or not.
333 *
334 * @rep:displayname Is_Security_OK_For_Dir
335 *
336 */
337 FUNCTION Is_Security_OK_For_Dir(p_directory_node_id IN NUMBER)
338 RETURN BOOLEAN;
339
340 /*#
341 * PROCEDURE: IBC_CITEM_WORKFLOW_PVT.Notify_Move
342 * DESCRIPTION: Procedure to be called from WF and a notification has to be
343 * sent to all users with the Read Item permission that the category
344 * or folder has moved to a new location.
345 * @param p_object_name Content Object Name
349 *
346 * @param p_content_item_id Content Item ID
347 * @param p_source_dir_node_id Source Directory ID
348 * @param p_destination_dir_node_id Destination Directory ID
350 * @rep:displayname Notify_Move
351 */
352
353 PROCEDURE Notify_Move(p_object_name IN VARCHAR2
354 ,p_content_item_id IN NUMBER
355 ,p_source_dir_node_id IN NUMBER
356 ,p_destination_dir_node_id IN NUMBER);
357 /*#
358 * PROCEDURE: IBC_CITEM_WORKFLOW_PVT.Notify_Translator
359 * DESCRIPTION: Procedure to be called from WF and a notification has to be
360 * sent to all users with Translate permission when a change is
361 * made to the content item that has translation enabled.
362 * @param p_content_item_id Content Item ID
363 *
364 * @rep:displayname Notify_Translator
365 */
366
367
368 PROCEDURE Notify_Translator(p_content_item_id IN NUMBER);
369
370 END IBC_CITEM_WORKFLOW_PVT;