[Home] [Help]
PACKAGE BODY: APPS.HR_WORKFLOW_INSTALL_PKG
Source
1 package body hr_workflow_install_pkg as
2 /* $Header: petskflw.pkb 120.1 2005/06/13 04:47:01 rvarshne noship $ */
3 current_workflow_id number;
4 current_nav_unit_id number;
5 current_nav_node_id number;
6 current_nav_node_usage_id number;
7 current_global_usage_id number;
8 location varchar2(80);
9 -- ;
10 -- ;
11 PROCEDURE taskflow_report ( g_workflow_name_width NUMBER DEFAULT 30
12 , g_from_form_name_width NUMBER DEFAULT 20
13 , g_from_node_name_width NUMBER DEFAULT 20
14 , g_to_form_name_width NUMBER DEFAULT 20
15 , g_to_node_name_width NUMBER DEFAULT 20
16 , g_sequence_width NUMBER DEFAULT 9
17 , g_button_label_width NUMBER DEFAULT 20)
18 IS
19 --
20 TYPE r_formatted_style IS
21 TABLE OF VARCHAR2(100)
22 INDEX BY BINARY_INTEGER;
23 --
24 --
25 -- The _2 columns are to hold overflow if any of the columns overflow the
26 -- column width.
27 --
28 TYPE r_taskflow_details IS RECORD
29 ( workflow_name_1 VARCHAR2(100)
30 ,workflow_name_2 VARCHAR2(100)
31 ,from_form_name_1 VARCHAR2(100)
32 ,from_form_name_2 VARCHAR2(100)
33 ,from_node_name_1 VARCHAR2(100)
34 ,from_node_name_2 VARCHAR2(100)
35 ,to_form_name_1 VARCHAR2(100)
36 ,to_form_name_2 VARCHAR2(100)
37 ,to_node_name_1 VARCHAR2(100)
38 ,to_node_name_2 VARCHAR2(100)
39 ,sequence_1 VARCHAR2(100)
40 ,sequence_2 VARCHAR2(100)
41 ,button_label_1 VARCHAR2(100)
42 ,button_label_2 VARCHAR2(100)
43 ,second_row_usage VARCHAR2(10) );
44 --
45 --
46 TYPE t_taskflow_details IS
47 TABLE OF
48 r_taskflow_details
49 INDEX BY BINARY_INTEGER;
50 --
51 CURSOR c_taskflow_details IS
52 SELECT w.workflow_name AS workflow_name,
53 nu2.form_name AS from_form_name,
54 nn2.name AS from_node_name,
55 nu.form_name AS to_form_name,
56 nn.name AS to_node_name,
57 to_char(p.sequence) AS sequence,
58 ptl.override_label AS Button_label
59 FROM hr_navigation_node_usages NNU,
60 hr_navigation_node_usages NNU2,
61 hr_workflows W,
62 hr_navigation_units NU,
63 hr_navigation_nodes NN,
64 hr_navigation_units NU2,
65 hr_navigation_nodes NN2,
66 hr_navigation_paths P,
67 hr_navigation_paths_tl PTL
68 WHERE nn2.nav_node_id = nnu2.nav_node_id
69 AND nnu2.workflow_id = w.workflow_id
70 AND nn2.nav_unit_id = nu2.nav_unit_id
71 AND p.FROM_NAV_NODE_USAGE_ID = nnu2.nav_node_usage_id
72 AND p.TO_NAV_NODE_USAGE_ID = nnu.nav_node_usage_id
73 AND nn.nav_node_id = nnu.nav_node_id
74 AND nnu.workflow_id = w.workflow_id
75 AND nn.nav_unit_id = nu.nav_unit_id
76 AND p.nav_path_id = ptl.nav_path_id
77 AND ptl.language=userenv('LANG')
78 ORDER BY w.workflow_name, from_form_name, from_node_name, p.sequence;
79 --
80 l_taskflow_details t_taskflow_details;
81 l_formatted_padded_string r_formatted_style;
82 l_first_row VARCHAR2(300);
83 l_second_row VARCHAR2(300);
84 l_second_row_used VARCHAR2(300);
85 l_taskflow_rowcount NUMBER;
86 --
87 l_workflow_name VARCHAR2(100);
88 l_from_form_name VARCHAR2(100);
89 l_from_node_name VARCHAR2(100);
90 --
91 FUNCTION format_details (whole_string IN VARCHAR2 DEFAULT '.'
92 ,report_column_width IN NUMBER DEFAULT 30)
93 RETURN r_formatted_style IS
94 --
95 -- Local procedure to split input, whole_string, into two columns
96 -- to a specified length, report_column_width. Blank spaces pad
97 -- out the extra spaces. If a line start with a blank space, it is
98 -- converted to a .
99 --
100 l_padded_string_rec r_formatted_style;
101 BEGIN
102 --
103 -- If the whole_string is over twice the length of the report_column_with, the remainer will be truncated.
104 l_padded_string_rec(1) := SUBSTR (RPAD (whole_string, (report_column_width * 2)) ,1, report_column_width);
105 l_padded_string_rec(2) := SUBSTR (RPAD (whole_string, (report_column_width * 2)) , report_column_width + 1);
106 --
107 -- If the first char of either string begins with a ' ', then convert it to a '.' as dbms_output ignores
108 -- leading spaces.
109 --
110 IF SUBSTR( l_padded_string_rec(1),1,1) = ' ' THEN
111 l_padded_string_rec(1) := '.'|| SUBSTR( l_padded_string_rec(1), 2, LENGTH( l_padded_string_rec(1) ) -1);
112 END IF;
113 --
114 IF SUBSTR( l_padded_string_rec(2),1,1) = ' ' THEN
115 l_padded_string_rec(2) := '.'|| SUBSTR( l_padded_string_rec(2), 2, LENGTH( l_padded_string_rec(2) ) -1);
116 END IF;
117 --
118 RETURN l_padded_string_rec;
119 --
120 END format_details;
121 --
122 -- Adds the first two rows to the PLSQL table - the name of the column an underscore
123 PROCEDURE Add_Title
124 IS
125 l_title_string VARCHAR2(100) DEFAULT NULL;
126 BEGIN
127 FOR l_counter IN 1 .. 2 LOOP
128
129 IF l_counter = 2 THEN l_title_string := RPAD('-',g_workflow_name_width,'-'); END IF;
130 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string,'WORKFLOW_NAME ')
131 , report_column_width => g_workflow_name_width);
132 l_taskflow_details(l_counter).workflow_name_1 := l_formatted_padded_string(1);
133 l_taskflow_details(l_counter).workflow_name_2 := l_formatted_padded_string(2);
134 --
135 IF l_counter = 2 THEN l_title_string := RPAD('-',g_from_form_name_width,'-'); END IF;
136 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string,'FROM_FORM_NAME ')
137 , report_column_width => g_from_form_name_width);
138 l_taskflow_details(l_counter).from_form_name_1 := l_formatted_padded_string(1);
139 l_taskflow_details(l_counter).from_form_name_2 := l_formatted_padded_string(2);
140 --
141 IF l_counter = 2 THEN l_title_string := RPAD('-',g_from_node_name_width,'-'); END IF;
142 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string, 'FROM_NODE_NAME ')
143 , report_column_width => g_from_node_name_width);
144 l_taskflow_details(l_counter).from_node_name_1 := l_formatted_padded_string(1);
145 l_taskflow_details(l_counter).from_node_name_2 := l_formatted_padded_string(2);
146 --
147 IF l_counter = 2 THEN l_title_string := RPAD('-',g_to_form_name_width,'-'); END IF;
148 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string, 'TO_FORM_NAME ')
149 , report_column_width => g_to_form_name_width);
150 l_taskflow_details(l_counter).to_form_name_1 := l_formatted_padded_string(1);
151 l_taskflow_details(l_counter).to_form_name_2 := l_formatted_padded_string(2);
152 --
153 IF l_counter = 2 THEN l_title_string := RPAD('-',g_to_node_name_width,'-'); END IF;
154 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string, 'TO_NODE_NAME ')
155 , report_column_width => g_to_node_name_width);
156 l_taskflow_details(l_counter).to_node_name_1 := l_formatted_padded_string(1);
157 l_taskflow_details(l_counter).to_node_name_2 := l_formatted_padded_string(2);
158 --
159 IF l_counter = 2 THEN l_title_string := RPAD('-',g_sequence_width,'-'); END IF;
160 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string, 'SEQUENCE ')
161 , report_column_width => g_sequence_width);
162 l_taskflow_details(l_counter).sequence_1 := l_formatted_padded_string(1);
163 l_taskflow_details(l_counter).sequence_2 := l_formatted_padded_string(2);
164 --
165 IF l_counter = 2 THEN l_title_string := RPAD('-',g_button_label_width,'-'); END IF;
166 l_formatted_padded_string := format_details ( whole_string => NVL( l_title_string, 'BUTTON_LABEL ')
167 , report_column_width => g_button_label_width);
168 l_taskflow_details(l_counter).button_label_1 := l_formatted_padded_string(1);
169 l_taskflow_details(l_counter).button_label_2 := l_formatted_padded_string(2);
170 --
171 -- Check whether the second row is used or not (. were inserted by the format_details function)
172 --
173 l_second_row := l_taskflow_details(l_counter).workflow_name_2
174 || l_taskflow_details(l_counter).from_form_name_2
175 || l_taskflow_details(l_counter).from_node_name_2
176 || l_taskflow_details(l_counter).to_form_name_2
177 || l_taskflow_details(l_counter).to_node_name_2
178 || l_taskflow_details(l_counter).sequence_2
179 || l_taskflow_details(l_counter).button_label_2;
180 l_second_row_used := NVL(RTRIM(REPLACE(l_second_row,'.'),' '),'NOT_USED');
181 IF l_second_row_used <> 'NOT_USED' THEN
182 l_second_row_used := 'USED';
183 END IF;
184 END LOOP;
185 --
186 END Add_Title;
187
188 BEGIN
189 -- DBMS_OUTPUT.ENABLE(1000000);
190 -- Include the title as the first row in the PL/SQL table
191 --
192 Add_Title;
193 --
194 -- NOTE: 2 is added to the row count as the first two rows are for the title
195 FOR l_details IN c_taskflow_details
196 LOOP
197 --
198 l_formatted_padded_string := format_details ( whole_string => l_details.workflow_name
199 , report_column_width => g_workflow_name_width);
200 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).workflow_name_1 := l_formatted_padded_string(1);
201 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).workflow_name_2 := l_formatted_padded_string(2);
202 --
203 l_formatted_padded_string := format_details ( whole_string => l_details.from_form_name
204 , report_column_width => g_from_form_name_width);
205 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).from_form_name_1 := l_formatted_padded_string(1);
206 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).from_form_name_2 := l_formatted_padded_string(2);
207 --
208 l_formatted_padded_string := format_details ( whole_string => l_details.from_node_name
209 , report_column_width => g_from_node_name_width);
210 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).from_node_name_1 := l_formatted_padded_string(1);
211 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).from_node_name_2 := l_formatted_padded_string(2);
212 --
213 l_formatted_padded_string := format_details ( whole_string => l_details.to_form_name
214 , report_column_width => g_to_form_name_width);
215 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).to_form_name_1 := l_formatted_padded_string(1);
216 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).to_form_name_2 := l_formatted_padded_string(2);
217 --
218 l_formatted_padded_string := format_details ( whole_string => l_details.to_node_name
219 , report_column_width => g_to_node_name_width);
220 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).to_node_name_1 := l_formatted_padded_string(1);
221 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).to_node_name_2 := l_formatted_padded_string(2);
222 --
223 l_formatted_padded_string := format_details ( whole_string => l_details.sequence
224 , report_column_width => g_sequence_width);
225 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).sequence_1 := l_formatted_padded_string(1);
226 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).sequence_2 := l_formatted_padded_string(2);
227 --
228 l_formatted_padded_string := format_details ( whole_string => l_details.button_label
229 , report_column_width => g_button_label_width);
230 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).button_label_1 := l_formatted_padded_string(1);
231 l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).button_label_2 := l_formatted_padded_string(2);
232 --
233 -- Check whether the second row is used or not (. were inserted by the format_details function)
234 --
235 l_second_row := l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).workflow_name_2
236 || l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).from_form_name_2
237 || l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).from_node_name_2
238 || l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).to_form_name_2
239 || l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).to_node_name_2
240 || l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).sequence_2
241 || l_taskflow_details(c_taskflow_details%ROWCOUNT + 2).button_label_2;
242 l_second_row_used := NVL(RTRIM(REPLACE(l_second_row,'.'),' '),'NOT_USED');
243 IF l_second_row_used <> 'NOT_USED' THEN
244 l_second_row_used := 'USED';
245 END IF;
246 --
247 l_taskflow_details(c_taskflow_details%ROWCOUNT).second_row_usage := l_second_row_used;
248 END LOOP;
249 --
250 -- The tf details now exist in a PL/SQL table, so print them. Only print the second row if
251 -- it exists.
252 --
253 -- Display_Title;
254 --
255 IF l_taskflow_details.EXISTS(1) THEN
256 FOR l_counter IN 1 .. l_taskflow_details.COUNT LOOP
257 l_first_row := l_taskflow_details(l_counter).workflow_name_1
258 || l_taskflow_details(l_counter).from_form_name_1
259 || l_taskflow_details(l_counter).from_node_name_1
260 || l_taskflow_details(l_counter).to_form_name_1
261 || l_taskflow_details(l_counter).to_node_name_1
262 || l_taskflow_details(l_counter).sequence_1
263 || l_taskflow_details(l_counter).button_label_1;
264 --
265 -- Bug#885806
266 -- dbms_output.put_line(l_first_row);
267 hr_utility.trace(l_first_row);
268 --
269 IF l_taskflow_details(l_counter).second_row_usage = 'USED' THEN
270 l_second_row := l_taskflow_details(l_counter).workflow_name_2
271 || l_taskflow_details(l_counter).from_form_name_2
272 || l_taskflow_details(l_counter).from_node_name_2
273 || l_taskflow_details(l_counter).to_form_name_2
274 || l_taskflow_details(l_counter).to_node_name_2
275 || l_taskflow_details(l_counter).sequence_2
276 || l_taskflow_details(l_counter).button_label_2;
277 -- Bug#885806
278 -- dbms_output.put_line(l_second_row);
279 hr_utility.trace(l_second_row);
280 END IF;
281 END LOOP;
282 ELSE
283 -- Bug#885806
284 -- dbms_output.put_line('No Taskflow details to print');
285 hr_utility.trace('No Taskflow details to print');
286 END IF;
287 --
288 END taskflow_report;
289 --
290 -- Outputs a message
291 procedure log_message ( p_msg in varchar2 ) is
292 begin
293
294 -- Bug#885806
295 -- dbms_output.put_line( p_msg ) ;
296 hr_utility.trace( p_msg ) ;
297
298 end log_message ;
299
300 -- Returns the name of the given workflow if it exists otherwise
301 -- returns null.
302 function find_workflow_name( p_workflow_id in number ) return varchar2 is
303 cursor c1 is
304 select workflow_name
305 from hr_workflows
306 where workflow_id = p_workflow_id ;
307 l_return_value hr_workflows.workflow_name%type := null ;
308 begin
309 open c1 ;
310 fetch c1 into l_return_value ;
311 close c1 ;
312
313 return ( l_return_value ) ;
314 end find_workflow_name ;
315
316 -- Returns the id for a given workflow
317 function find_workflow_id( p_workflow_name in varchar2 ) return number is
318 cursor c1 is
319 select workflow_id
320 from hr_workflows
321 where workflow_name = p_workflow_name ;
322 l_return_value number := null ;
323 begin
324 open c1 ;
325 fetch c1 into l_return_value ;
326 close c1 ;
327
328 return ( l_return_value ) ;
329 end find_workflow_id ;
330
334 from hr_workflows
331 procedure get_workflow_id (p_workflow_name varchar2) is
332 cursor id is
333 select workflow_id
335 where workflow_name = p_workflow_name;
336 begin
337 if p_workflow_name is not null then
338 open id;
339 fetch id into current_workflow_id;
340 if id%notfound then
341 current_workflow_id := null ;
342 end if;
343 close id;
344 else
345 current_workflow_id := null;
346 end if;
347 end get_workflow_id;
348 procedure get_nav_unit_id (p_form_name varchar2,
349 p_block_name varchar2 default null) is
350 cursor id is
351 select nav_unit_id
352 from hr_navigation_units
353 where form_name = p_form_name
354 and nvl(block_name,'-9999')=nvl(p_block_name,'-9999');
355 begin
356 open id;
357 fetch id into current_nav_unit_id;
358 close id;
359 end get_nav_unit_id;
360 procedure get_nav_node_id (p_name varchar2) is
361 cursor id is
362 select nav_node_id
363 from hr_navigation_nodes
364 where name = p_name;
365 begin
366 open id;
367 fetch id into current_nav_node_id;
368 close id;
369 end get_nav_node_id;
370 procedure get_node_usage_id is
371 cursor id is
372 select nav_node_usage_id
373 from hr_navigation_node_usages
374 where nav_node_id = current_nav_node_id
375 and workflow_id = current_workflow_id;
376 begin
377 open id;
378 fetch id into current_nav_node_usage_id;
379 close id;
380 end get_node_usage_id;
381 procedure new_workflow (p_name varchar2) is
382 begin
383 get_workflow_id(p_name);
384 if ( current_workflow_id is null ) then
385 insert into hr_workflows (workflow_id, workflow_name)
386 values (hr_workflows_s.nextval, p_name);
387 get_workflow_id (p_name);
388 end if;
389 end new_workflow;
390 procedure new_nav_unit (
391 p_application_abbrev varchar2,
392 p_form_name varchar2,
393 p_default_label varchar2,
394 p_max_no_of_buttons number,
395 p_block_name varchar2) is
396 l_current_language varchar2(3);
397 l_nav_unit_id number;
398 begin
399
400 insert into hr_navigation_units (
401 nav_unit_id,
402 application_abbrev,
403 default_label,
404 form_name,
405 max_number_of_nav_buttons,
406 block_name)
407 values (
408 hr_navigation_units_s.nextval,
409 p_application_abbrev,
410 p_default_label,
411 p_form_name,
412 p_max_no_of_buttons,
413 p_block_name);
414
415 get_nav_unit_id (p_form_name,p_block_name);
416
417 select nav_unit_id
418 into l_nav_unit_id
419 from hr_navigation_units
420 where form_name = p_form_name
421 and nvl(block_name,'-9999')=nvl(p_block_name,'-9999');
422
423 select L.language_code
424 into l_current_language
425 from FND_LANGUAGES L
426 where L.INSTALLED_FLAG in ('I', 'B')
427 and not exists
428 (select NULL
429 from HR_NAVIGATION_UNITS_TL T
430 where T.NAV_UNIT_ID = L_NAV_UNIT_ID
431 and T.LANGUAGE = L.LANGUAGE_CODE);
432
433 insert into hr_navigation_units_tl (
434 nav_unit_id
435 ,language
436 ,source_lang
437 ,default_label
438 )
439 select b.nav_unit_id
440 ,l_current_language
441 ,userenv('LANG')
442 ,b.default_label
443 from hr_navigation_units b
444 where not exists
445 (select '1'
446 from hr_navigation_units_tl t
447 where t.nav_unit_id = b.nav_unit_id
448 and t.language = l_current_language);
449 end new_nav_unit;
450
451 procedure new_nav_node (p_name varchar2,
452 p_customized_restriction_id number default null) is
453 begin
454 insert into hr_navigation_nodes (
455 nav_node_id,
456 nav_unit_id,
457 name,
458 customized_restriction_id)
459 values (
460 hr_navigation_nodes_s.nextval,
461 current_nav_unit_id,
462 p_name,
463 p_customized_restriction_id);
464 get_nav_node_id (p_name);
465 end new_nav_node;
466 procedure new_nav_node_usage (
467 p_top_node varchar2) is
468 begin
469 insert into hr_navigation_node_usages (
470 nav_node_usage_id,
471 workflow_id,
472 nav_node_id,
473 top_node)
474 values (
475 hr_navigation_node_usages_s.nextval,
476 current_workflow_id,
477 current_nav_node_id,
478 p_top_node);
479 get_node_usage_id;
480 end new_nav_node_usage;
481
482 procedure new_path (
483 p_to_name varchar2,
484 p_nav_button_required varchar2,
485 p_sequence number,
486 p_override_label varchar2
487 ) is
488 l_current_nav_node_usage_id number;
489 l_from number;
490 l_to number;
491 l_current_language varchar2(3);
492 l_nav_path_id number;
493 begin
494
495
496 l_current_nav_node_usage_id := current_nav_node_usage_id;
497 l_from := current_nav_node_usage_id;
498 get_nav_node_id (p_to_name);
499 get_node_usage_id;
500 l_to := current_nav_node_usage_id;
501 current_nav_node_usage_id := l_current_nav_node_usage_id;
502
506 to_nav_node_usage_id,
503 insert into hr_navigation_paths (
504 nav_path_id,
505 from_nav_node_usage_id,
507 nav_button_required,
508 sequence,
509 override_label)
510 values (
511 hr_navigation_paths_s.nextval,
512 l_from,
513 l_to,
514 p_nav_button_required,
515 p_sequence,
516 p_override_label);
517
518 select nav_path_id
519 into l_nav_path_id
520 from hr_navigation_paths
521 where from_nav_node_usage_id = l_from
522 and to_nav_node_usage_id = l_to;
523
524 select L.language_code
525 into l_current_language
526 from FND_LANGUAGES L
527 where L.INSTALLED_FLAG in ('I', 'B')
528 and not exists
529 (select NULL
530 from HR_NAVIGATION_PATHS_TL T
531 where T.NAV_PATH_ID = L_NAV_PATH_ID
532 and T.LANGUAGE = L.LANGUAGE_CODE);
533
534 insert into hr_navigation_paths_tl (
535 nav_path_id
536 ,language
537 ,source_lang
538 ,override_label
539 )
540 select b.nav_path_id
541 ,l_current_language
542 ,userenv('LANG')
543 ,b.override_label
544 from hr_navigation_paths b
545 where not exists
546 (select '1'
547 from hr_navigation_paths_tl t
548 where t.nav_path_id = b.nav_path_id
549 and t.language = l_current_language);
550
551 end new_path;
552
553 procedure get_global_usage_id (p_global_name varchar2) is
554 cursor id is
555 select global_usage_id
556 from hr_nav_unit_global_usages
557 where global_name = p_global_name
558 and nav_unit_id = current_nav_unit_id;
559 begin
560 open id;
561 fetch id into current_global_usage_id;
562 close id;
563 end get_global_usage_id;
564 procedure new_global_usage (
565 p_global_name varchar2,
566 p_in_or_out varchar2,
567 p_mandatory_flag varchar2) is
568 begin
569 insert into hr_nav_unit_global_usages (
570 global_usage_id,
571 nav_unit_id,
572 global_name,
573 in_or_out,
574 mandatory_flag)
575 values (
576 hr_nav_unit_global_usages_s.nextval,
577 current_nav_unit_id,
578 p_global_name,
579 p_in_or_out,
580 p_mandatory_flag);
581 get_global_usage_id (p_global_name);
582 end new_global_usage;
583 procedure new_context_rule (
584 p_evaluation_type_code varchar2,
585 p_value varchar2) is
586 begin
587 insert into hr_navigation_context_rules (
588 nav_context_rule_id,
589 global_usage_id,
590 evaluation_type_code,
591 value)
592 values (
593 hr_navigation_context_rules_s.nextval,
594 current_global_usage_id,
595 p_evaluation_type_code,
596 p_value);
597 end new_context_rule;
598 end;