1 package wf_fwkmon AUTHID CURRENT_USER as
2 /* $Header: wffkmons.pls 120.1.12000000.2 2007/05/23 21:44:52 vshanmug ship $ */
3 /*#
4 * This public interface provides APIs to retrieve
5 * parameters for use with the self-service functions
6 * that provide access to the Oracle Applications
7 * Framework-based Status Monitor. These APIs help
8 * to integrate other applications with the Status Monitor.
9 * @rep:scope internal
10 * @rep:product OWF
11 * @rep:displayname Workflow Status Monitor
12 * @rep:lifecycle active
13 * @rep:compatibility S
14 * @rep:category BUSINESS_ENTITY WF_ENGINE
15 * @rep:ihelp FND/@stmonapi See the related online help
16 */
17
18
19
20 -- ===========================================================================
21 -- FUNCTION NAME: getNotificationResult
22 --
23 -- DESCRIPTION: Returns the display result value for a notification.
24 --
25 -- PARAMETERS: x_notificationId IN Notification ID
26 --
27 -- ===========================================================================
28 FUNCTION getNotificationResult(x_notificationId IN number) return varchar2;
29
30
31 -- ===========================================================================
32 -- FUNCTION NAME: isRespondNotification
33 --
34 -- DESCRIPTION: Determines whether the notification requires a response.
35 --
36 -- Returns 1 if the notification requires a response, 0
37 -- if it doesn't.
38 --
39 -- PARAMETERS: x_notificationId IN Notification ID
40 --
41 -- ===========================================================================
42 FUNCTION isRespondNotification(x_notificationId IN number) RETURN number;
43
44
45 -- ===========================================================================
46 -- FUNCTION NAME: getItemStatus
47 --
48 -- DESCRIPTION: Determines the overall status of a root process based
49 -- its end_date and activity statuses.
50 --
51 -- Returns one of the following states:
52 --
53 -- ERROR (workflow has at least one activity in error)
54 -- COMPLETE
55 -- COMPLETE_WITH_ERRORS
56 -- SUSPEND_WITH_ERRORS (root process is suspended, but
57 -- workflow has errors)
58 -- FORCE (translates to "Canceled")
59 -- ACTIVE
60 -- SUSPEND
61 --
62 --
63 -- PARAMETERS: x_itemType IN Item type.
64 -- x_itemKey IN Item key.
65 -- x_endDate IN Item end date.
66 -- x_rootProcess IN Item root activity.
67 -- x_rootVersion IN Item root activity version.
68 --
69 -- ===========================================================================
70 FUNCTION getItemStatus(x_itemType IN varchar2,
71 x_itemKey IN varchar2,
72 x_endDate IN date,
73 x_rootProcess IN varchar2,
74 x_rootVersion IN number) RETURN varchar2;
75
76
77 -- ===========================================================================
78 -- FUNCTION NAME: getRoleEmailAddress
79 --
80 -- DESCRIPTION: Returns an email address for a role.
81 --
82 -- PARAMETERS: x_role_name IN Role internal name.
83 --
84 -- ===========================================================================
85 FUNCTION getRoleEmailAddress (x_role_name in varchar2) RETURN varchar2;
86
87
88 -- ===========================================================================
89 -- FUNCTION NAME: getEncryptedAccessKey
90 --
91 -- DESCRIPTION: Returns an encrypted Monitor access key for the given
92 -- item type, item key and admin mode.
93 --
94 -- PARAMETERS:
95 -- itemType IN valid workflow item type
96 -- itemKey IN valid workflow item key
97 -- adminMode IN valid options include: 'Y' to grant administrator
98 -- privileges or 'N' to withhold them
99 --
100 -- =============================================================================
101 /*#
102 * This API returns an encrypted access key password
103 * that controls access to the specified workflow process
104 * instance in the Status Monitor with the specified
105 * administrator mode. The administrator mode lets you
106 * determine whether the user who accesses the Status
107 * Monitor with this access key should have privileges
108 * to perform administrative operations in the Status Monitor.
109 * @param itemtype Item Type
110 * @param itemkey Item Key
111 * @param adminmode Administrator Mode
112 * @return AccessKey
113 * @rep:scope internal
114 * @rep:lifecycle active
115 * @rep:displayname Get Encrypted Access Key
116 * @rep:ihelp FND/@stmonapi#a_fmgeak See the related online help
117 */
118 FUNCTION getEncryptedAccessKey (itemType in varchar2,
119 itemKey in varchar2,
120 adminMode in varchar2 default 'N') RETURN varchar2;
121
122
123 -- ===========================================================================
124 -- FUNCTION NAME: getEncryptedAdminMode
125 --
126 -- DESCRIPTION: Returns an encrypted value for the given administrator
127 -- mode.
128 --
129 -- PARAMETERS:
130 -- adminMode IN valid options include: 'Y' to grant administrator
131 -- privileges or 'N' to withhold them
132 --
133 -- ============================================================================
134 /*#
135 * This API returns an encrypted value for the
136 * specified administrator mode. The administrator
137 * mode lets you determine whether a user accessing
138 * the Status Monitor should have privileges to perform
139 * administrative operations in the Status Monitor.
140 * @param adminmode Administrator Mode
141 * @return Encrypted AdminMode
142 * @rep:scope internal
143 * @rep:lifecycle active
144 * @rep:displayname Get Encrypted Admin Mode
145 * @rep:ihelp FND/@stmonapi#a_fmgeam See the related online help
146 */
147 FUNCTION getEncryptedAdminMode (adminMode in varchar2) RETURN varchar2;
148
149
150 -- ===========================================================================
151 -- FUNCTION NAME: isMonitorAdministrator
152 --
153 -- DESCRIPTION: Returns 'Y' if the given user has Workflow Administrator
154 -- privileges and 'N' if he/she does not.
155 --
156 -- PARAMETERS:
157 -- userName IN valid username - e.g. 'BLEWIS'
158 --
159 -- ============================================================================
160 /*#
161 * This API returns 'Y' if the specified user has
162 * workflow administrator privileges, or 'N' if the
163 * specified user does not have workflow
164 * administrator privileges. Workflow administrator privileges
165 * are assigned in the Workflow Configuration page.
166 * @param userName User Name
167 * @return isMonitorAdministrator
168 * @rep:scope internal
169 * @rep:lifecycle active
170 * @rep:displayname is Monitor Administrator
171 * @rep:ihelp FND/@stmonapi#a_fmima See the related online help
172 */
173 FUNCTION isMonitorAdministrator(userName in varchar2) RETURN varchar2;
174
175
176 -- ============================================================================
177 -- FUNCTION NAME: getAnonymousSimpleURL
178 --
179 -- DESCRIPTION: Returns a complete URL allowing for anonymous, guest
180 -- access to the simple,"Guest" Status Monitor.
181 --
182 -- The URL will be in the following form:
183 --
184 -- http://<Apps PL/SQL Web Agent>/wf_fwkmon.GuestMonitor?<params>
185 --
186 -- The access key and admin mode parameters will be encrypted.
187 -- The item type, item key, access key and admin mode parameters
188 -- will be encoded.
189 --
190 -- PARAMETERS:
191 -- itemType IN a valid workflow item type
192 -- itemKey IN a valid workflow item key
193 -- firstPage IN valid options include: 'HISTORY' to go to the
194 -- Notification History page or 'DIAGRAM' to go to
195 -- the Status Diagram page
196 -- adminMode IN valid options include: 'Y' to grant administrator
197 -- privileges or 'N' to withhold them
198 --
199 -- =============================================================================
200 FUNCTION getAnonymousSimpleURL(itemType in varchar2,
201 itemKey in varchar2,
202 firstPage in varchar2 default 'HISTORY',
203 adminMode in varchar2 default 'N') RETURN varchar2;
204
205
206 -- =============================================================================
207 -- FUNCTION NAME: getAnonymousAdvanceURL
208 --
209 -- DESCRIPTION: Returns a complete URL allowing for anonymous, guest
210 -- access to the advanced,"Guest" Status Monitor.
211 --
212 -- The URL will be in the following form:
213 --
214 -- http://<Apps PL/SQL Web Agent>/wf_fwkmon.GuestMonitor?<params>
215 --
216 -- The access key and admin mode parameters will be encrypted.
217 -- The item type, item key, access key and admin mode parameters
218 -- will be encoded.
219 --
220 -- PARAMETERS:
221 -- itemType IN a valid workflow item type
222 -- itemKey IN a valid workflow item key
223 -- firstPage IN valid options include: 'HISTORY' to go to the
224 -- Activity History page or 'DIAGRAM' to go to
225 -- the Status Diagram page
226 -- adminMode IN valid options include: 'Y' to grant administrator
227 -- privileges or 'N' to withhold them
228 --
229 -- =============================================================================
230 FUNCTION getAnonymousAdvanceURL(itemType in varchar2,
231 itemKey in varchar2,
232 firstPage in varchar2 default 'HISTORY',
233 adminMode in varchar2 default 'N') RETURN varchar2;
234
235
236 -- ==============================================================================
237 -- FUNCTION NAME: getGuestMonitorURL
238 --
239 -- DESCRIPTION: Returns a URL allowing for anonynmous, guest access to
240 -- the simple or advanced OA Framework Status Monitor as
241 -- specified by the parameters.
242 --
243 -- ** NOTE: this is not intended to be called directly
244 -- ** outside of Workflow.
245 --
246 -- Please call getAnonymousSimpleURL() or
247 -- getAnonymousAdvanceURL() to obtain the URL that
248 -- calls the GuestMonitorURL procedure, or call the
249 -- corresponding methods in the following Java class:
250 --
251 -- oracle.apps.fnd.wf.monitor.webui.Monitor
252 --
253 -- PARAMETERS:
254 -- akRegionApplicationId IN target page AK region application id
255 -- (always 0 in this case)
256 -- akRegionCode IN target page AK region code
257 -- accessKey IN must be an encrypted, encoded Monitor accessKey
258 -- value that is valid for the given adminMode, itemType
259 -- and itemKey
260 -- adminMode IN must be an encrypted, encoded adminMode value that is
261 -- valid for the given accessKey, itemType and itemKey
262 -- itemType IN a valid workflow item type
263 -- itemKey IN a valid workflow item key
264 --
265 -- ==============================================================================
266 FUNCTION getGuestMonitorURL (akRegionApplicationId in varchar2 default null,
267 akRegionCode in varchar2 default null,
268 accessKey in varchar2 default null,
269 adminMode in varchar2 default null,
270 itemType in varchar2 default null,
271 itemKey in varchar2 default null) RETURN varchar2;
272
273
274 -- ============================================================================
275 -- PROCEDURE NAME: GuestMonitor
276 --
277 -- DESCRIPTION: Called when a URL constructed in getGuestMonitorURL
278 -- is invoked. Logs the user in as GUEST
279 -- and redirect to the OA Framework Status Monitor.
280 --
281 -- NOTE: if the user already has an ICX session, this will
282 -- be reused and a new session for the GUEST user will not
283 -- be created.
284 --
285 -- PARAMETERS:
286 -- akRegionApplicationId IN target page AK region application id
287 -- (always 0 in this case)
288 -- akRegionCode IN target page AK region code
289 -- wa IN must be an encrypted, encoded Monitor accessKey value
290 -- that is valid for the given adminMode, itemType and itemKey
291 -- Must be encrypted using the routine in this pacakge, or in
292 -- oracle.apps.fnd.wf.monitor.webui.Monitor class
293 -- wm IN must be an encrypted, encoded adminMode value that is valid
294 -- for the given accessKey, itemType and itemKey. Must be
295 -- encrypted using the routine in this package, or in the
296 -- oracle.apps.fnd.wf.monitor.webui.Monitor class
297 -- itemType IN a valid encoded workflow item type
298 -- itemKey IN a valid encoded workflow item key
299 --
300 -- ==============================================================================
301 PROCEDURE GuestMonitor (akRegionApplicationId in varchar2 default null,
302 akRegionCode in varchar2 default null,
303 wa in varchar2 default null,
304 wm in varchar2 default null,
305 itemType in varchar2 default null,
306 itemKey in varchar2 default null);
307
308 --
309 -- GetNtfResponderName
310 -- Function to return the Notification Responder's display name
311 --
312 -- a) Call wf_directory.GetRoleDisplayName2.
313 -- b) If null, retrieve column value WF_COMMENTS.FROM_USER
314 -- for RESPOND action on the notification id.
315 --
316 -- IN
317 -- p_notification_id - Notification ID
318 -- RETURN
319 -- Responder's display anme
320 --
321 function GetNtfResponderName(p_notification_id in number)
322 return varchar2;
323
324 end wf_fwkmon;