DBA Data[Home] [Help]

PACKAGE: APPS.WF_ACTIVITIES_VL_PUB

Source


1 PACKAGE wf_activities_vl_pub AUTHID CURRENT_USER AS
2 /* $Header: wfdefs.pls 115.18 2002/12/03 01:12:21 dlam ship $  */
3 
4 /*===========================================================================
5   PACKAGE NAME:         wf_activities_vl_pub
6 
7   DESCRIPTION:
8 
9   OWNER:                GKELLNER
10 
11   TABLES/RECORDS:
12 
13   PROCEDURES/FUNCTIONS:
14 
15 ============================================================================*/
16 
17 /*===========================================================================
18 
19   PL*SQL TABLE NAME:     wf_activities_vl_tbl_type
20 
21   DESCRIPTION:          Stores a list of activity definitions for
22                         the selected item type.
23 
24 ============================================================================*/
25 
26 TYPE  wf_activities_vl_rec_type IS RECORD
27 (
28  row_id                          ROWID,
29  item_type                       VARCHAR2(8),
30  name                            VARCHAR2(30),
31  version                         NUMBER,
32  type                            VARCHAR2(8),
33  rerun                           VARCHAR2(8),
34  expand_role                     VARCHAR2(1),
35  protect_level                   NUMBER,
36  custom_level                    NUMBER,
37  begin_date                      DATE,
38  end_date                        DATE,
39  function                        VARCHAR2(240),
40  function_type                   VARCHAR2(30),
41  result_type                     VARCHAR2(30),
42  cost                            NUMBER,
43  read_role                       VARCHAR2(320),
44  write_role                      VARCHAR2(320),
45  execute_role                    VARCHAR2(320),
46  icon_name                       VARCHAR2(30),
47  message                         VARCHAR2(30),
48  error_process                   VARCHAR2(30),
49  runnable_flag                   VARCHAR2(1),
50  error_item_type                 VARCHAR2(8),
51  event_name                      VARCHAR2(240),
52  direction                       VARCHAR2(30),
53  display_name                    VARCHAR2(80),
54  result_type_display_name        VARCHAR2(80),
55  message_display_name            VARCHAR2(80),
56  description                     VARCHAR2(240)
57 );
58 
59  TYPE wf_activities_vl_tbl_type IS TABLE OF
60  wf_activities_vl_pub.wf_activities_vl_rec_type
61  INDEX BY BINARY_INTEGER;
62 
63 
64 
65 /*===========================================================================
66 
67   PL*SQL TABLE NAME:    wf_activity_attr_vl_tbl_type
68 
69   DESCRIPTION:          Stores a list of activity attributes based on the
70                         fetch_activity_attributes cursor shown above.
71 
72 ============================================================================*/
73 TYPE wf_activity_attr_vl_rec_type IS RECORD
74 (
75  activity_type                   VARCHAR2(8),
76  activity_display_name           VARCHAR2(80),
77  attr_default_display_name       VARCHAR2(80),
78  lookup_type_display_name        VARCHAR2(80),
79  lookup_code_display_name        VARCHAR2(80),
80  row_id                          ROWID,
81  activity_item_type              VARCHAR2(8),
82  activity_name                   VARCHAR2(30),
83  activity_version                NUMBER,
84  name                            VARCHAR2(30),
85  sequence                        NUMBER,
86  type                            VARCHAR2(8),
87  value_type                      VARCHAR2(8),
88  protect_level                   NUMBER,
89  custom_level                    NUMBER,
90  subtype                         VARCHAR2(8),
91  format                          VARCHAR2(240),
92  text_default                    VARCHAR2(4000),
93  number_default                  NUMBER,
94  date_default                    DATE,
95  display_name                    VARCHAR2(80),
96  description                     VARCHAR2(240)
97 );
98 
99  TYPE wf_activity_attr_vl_tbl_type IS TABLE OF
100  wf_activities_vl_pub.wf_activity_attr_vl_rec_type
101  INDEX BY BINARY_INTEGER;
102 
103 
104 /*===========================================================================
105   PROCEDURE NAME:       fetch_activities
106 
107   DESCRIPTION:          Fetches all the activities and each activities
108                         associate attributes for a given item type
109                         into a p_wf_activities_vl_tbl table and a
110                         p_wf_activity_attr_vl_tbl table based on the
111                         item type internal eight character name and the
112                         effective_date for the activities.  This function
113                         can retrieve just one type of activity list like only
114                         the processes or notification or it can retrieve
115                         all the activity types for a given item type. This
116                         function can also retrieve a single activity
117                         definition if the internal name along with the
118                         item type name is provided.  This is especially
119                         useful if you wish to display the details for a
120                         single activity when it is referenced from some
121                         drilldown mechanism.
122 
123                         The p_wf_activities_vl_tbl table and the
124                         p_wf_activity_attr_vl_tbl table are synchronized by
125                         the select order of both queries.  The
126                         draw_activity_list and draw_activity_details functions
127                         take advantage of this ordering for performance reasons
128                         so they can walk these lists in parallel.
129                         When we find an attribute that matches
130                         the current activity, we copy that attribute to a temp
131                         list until we find a new activity in the attribute
132                         list.  When this happens we write out the attribute
133                         temp list and move to the next activity.
134 
135 
136   PARAMETERS:
137 
138         p_item_type IN  Internal name of the item type
139 
140         p_activity_type IN (optional)
141                         The type of activity you would like to retrieve.
142                         Values: PROCESS, NOTICE, FUNCTION
143 
144         p_effective_date IN
145                         The requested effective date.  Since activities can
146                         have multiple versions and have effective date ranges
147                         for each of those version we need a specific value
148                         to determine which of those versions is requested.
149 
150         p_name IN (optional)
151                         Internal name of the activity
152 
153         p_wf_activities_vl_tbl OUT
154                         The pl*sql table with the detailed definition of
155                         the activities for this item type
156 
157         p_wf_activity_attr_vl_tbl OUT
158                         The pl*sql table with the detailed definition of
159                         the activity attributes
160 
161 ============================================================================*/
162  PROCEDURE fetch_activities
163      (p_item_type       IN  VARCHAR2,
164       p_activity_type   IN  VARCHAR2,
165       p_effective_date  IN  DATE,
166       p_name            IN  VARCHAR2,
167       p_wf_activities_vl_tbl   OUT NOCOPY wf_activities_vl_pub.wf_activities_vl_tbl_type,
168       p_wf_activity_attr_vl_tbl   OUT NOCOPY wf_activities_vl_pub.wf_activity_attr_vl_tbl_type);
169 
170 /*===========================================================================
171   PROCEDURE NAME:       fetch_draw_activity_details
172 
173   DESCRIPTION:          Fetches and draws a single activity for a
174                         given item type.  This function is basically
175                         a cover for the fetch_activities and
176                         draw_activity_details routines.
177   PARAMETERS:
178 
179         p_item_type IN  Internal name of the item type
180 
181         p_activity_type IN
182                         The type of activity you would like to retrieve.
183                         Values: PROCESS, NOTICE, FUNCTION
184 
185         p_effective_date IN
186                         The requested effective date.  Since activities can
187                         have multiple versions and have effective date ranges
188                         for each of those version we need a specific value
189                         to determine which of those versions is requested.
190 
191         p_name IN
192                         Internal name of the activity
193 
194 ============================================================================*/
195  PROCEDURE fetch_draw_activity_details
196      (p_item_type       IN  VARCHAR2,
197       p_activity_type   IN  VARCHAR2,
198       p_effective_date  IN  VARCHAR2,
199       p_name            IN  VARCHAR2);
200 
201 /*===========================================================================
202   PROCEDURE NAME:       draw_activity_list
203 
204   DESCRIPTION:          Shows the display name of an activity along with
205                         any activity attributes for that activity that
206                         have been passed in as a html view as a part of
207                         a hierical summary list of an item type.
208                         This function uses the htp to generate its html
209                         output.
210 
211                         When we find an attribute that matches
212                         the current activity, we copy that attribute and all
213                         that follow for that activity to a temp
214                         list until we find a new activity in the attribute
215                         list.  When this happens we write out the attributes
216                         using the draw_activity_attr_list.
217 
218   PARAMETERS:
219 
220         p_wf_activities_vl_tbl IN
221                         The pl*sql table with the detailed definition of
222                         the activities for this item type
223 
224         p_wf_activity_attr_vl_tbl IN
225                         The pl*sql table with the detailed definition of
226                         the activity attributes
227 
228         p_effective_date IN
229                         The effective date that was requested.
230                         This is required if you would like to create
231                         hotlinks between a summary frame view and your
232                         detail frame view.  Since the listing are usually
233                         implemented as frames the links need to include
234                         all the attributes that were used to generate those
235                         frames.
236 
237         p_indent_level IN
238                         How many spaces would you like to indent this
239                         listing from the left border of the screen.
240 
241 ============================================================================*/
242 PROCEDURE draw_activity_list
243      (p_wf_activities_vl_tbl IN wf_activities_vl_pub.wf_activities_vl_tbl_type,
244       p_wf_activity_attr_vl_tbl IN wf_activities_vl_pub.wf_activity_attr_vl_tbl_type,
245       p_effective_date       IN DATE,
246       p_indent_level         IN NUMBER);
247 
248 /*===========================================================================
249   PROCEDURE NAME:       draw_activity_attr_list
250 
251   DESCRIPTION:          Shows the display names of activity attributes for
252                         a given activity as a html view as a part of
253                         a hierical summary list of an item type.
254                         This function uses the htp to generate its html
255                         output.
256 
257   PARAMETERS:
258 
259         p_wf_activity_attr_vl_tbl IN
260                         The pl*sql table with the detailed definition of
261                         the activity attributes
262 
263         p_effective_date IN
264                         The effective date that was requested.
265                         This is required if you would like to create
266                         hotlinks between a summary frame view and your
267                         detail frame view.  Since the listing are usually
268                         implemented as frames the links need to include
269                         all the attributes that were used to generate those
270                         frames.
271 
272         p_indent_level IN
273                         How many spaces would you like to indent this
274                         listing from the left border of the screen.
275 
276 ============================================================================*/
277 PROCEDURE draw_activity_attr_list
278      (p_wf_activity_attr_vl_tbl IN wf_activities_vl_pub.wf_activity_attr_vl_tbl_type,
279       p_effective_date       IN DATE,
280       p_indent_level         IN NUMBER);
281 
282 /*===========================================================================
283   PROCEDURE NAME:       draw_activity_details
284 
285   DESCRIPTION:          Shows all of the details for a list of activities
286                         along with any activity attribute details for that
287                         activity that have been passed in.  The listing is
288                         shown as activity detail and then corresponding
289                         attributes and then another activity and then its
290 
291                         When we find an attribute that matches
292                         the current activity, we copy that attribute and all
293                         that follow for that activity to a temp
294                         list until we find a new activity in the attribute
295                         list.  When this happens we write out the attributes
296                         using the draw_activity_attr_details function.
297 
298 
299   PARAMETERS:
300 
301         p_wf_activities_vl_tbl IN
302                         The pl*sql table with the detailed definition of
303                         the activities for this item type
304 
305         p_wf_activity_attr_vl_tbl IN
306                         The pl*sql table with the detailed definition of
307                         the activity attributes
308 
309         p_effective_date IN
310                         The effective date that was requested.
311                         This is required if you would like to create
312                         hotlinks between the notification details and the
313                         corresponding message details.  I'm investigating
314                         whenther the full parameter list is required for
315                         a link within the same frame since the notification
316                         and message details would be in the same frame.
317 
318         p_indent_level IN
319                         How many spaces would you like to indent this
320                         listing from the left border of the screen.
321 
322         p_create_child_links IN
323                         Tells the function whether to create the hot link
324                         between an activity and any child object related to
325                         that activity.  For example you may wish to link
326                         a notification message name with its corresponding
327                         details.  If you have no intention of listing those
328                         message details then you want to pass FALSE for the
329                         p_create_child_links parameter.  Otherwise you would
330                         pass TRUE.
331 
332 
333         p_print_skipped_titles IN
334                         Tells the function whether to print titles for activity
335                         types that have been skipped.  This is useful when
336                         you're calling this function to draw a single activity in
337                         which case you would pass FALSE.
338                         If you're listing all activities for a given item type
339                         then you probably do want to list all activity type titles
340                         so you probably want to pass TRUE
344       p_wf_activity_attr_vl_tbl IN wf_activities_vl_pub.wf_activity_attr_vl_tbl_type,
341 ============================================================================*/
342 PROCEDURE draw_activity_details
343      (p_wf_activities_vl_tbl IN wf_activities_vl_pub.wf_activities_vl_tbl_type,
345       p_effective_date       IN DATE,
346       p_indent_level         IN NUMBER,
347       p_create_child_links   IN BOOLEAN,
348       p_print_skipped_titles IN BOOLEAN);
349 
350 /*===========================================================================
351   PROCEDURE NAME:       draw_activity_attr_details
352 
353   DESCRIPTION:          Shows all of the details for a list of
354                         activity attributes for that have been passed
355                         in.
356 
357   PARAMETERS:
358 
359 
360         p_wf_activity_attr_vl_tbl IN
361                         The pl*sql table with the detailed definition of
362                         the activity attributes
363 
364         p_indent_level IN
365                         How many spaces would you like to indent this
366                         listing from the left border of the screen.
367 
368 ============================================================================*/
369 PROCEDURE draw_activity_attr_details
370      (p_wf_activity_attr_vl_tbl IN wf_activities_vl_pub.wf_activity_attr_vl_tbl_type,
371       p_indent_level              IN NUMBER);
372 
373 END wf_activities_vl_pub;