1 package body ffhutl as
2 /* $Header: ffhutl.pkb 115.0 99/07/16 02:03:06 porting ship $ */
3 /*
4 Copyright (c) Oracle Corporation (UK) Ltd 1993.
5 All rights reserved
6
7 Name: ffhutl
8
9 Description:
10
11 Change List
12 -----------
13 D Saxby 18-JUL-1995 Moved the arcs header line.
14 P Gowers 10-MAR-1993 Rename package to ffhutl
15 */
16 -------------------------------- load_harness --------------------------------
17 -- NAME
18 -- load_harness
19 -- DESCRIPTION
20 -- Copies the FDIU contents for a given formula into a harness table
21 -- which links each item with a value. The whole set of harness items
22 -- are referenced by formula_id and a test_id which is like a session
23 -- id for the current test formula form
24 --
25 procedure load_harness (p_formula_id in number) is
26 begin
27 -- get rid of any old rows first (there shouldn't be any)
28 hr_utility.set_location ('ffhutl.load_harness', 1);
29 delete from ff_harness
30 where test_id = userenv('SESSIONID') and formula_id = p_formula_id;
31 --
32 -- create new rows based on the formula_id and test_id passed containing
33 -- all input variables for the formula
34 -- NOTE all 'B' usages are indicated as 'I' because at the harness level
35 -- outputs are completely separate and unrelated to inputs
36 hr_utility.set_location ('ffhutl.load_harness', 2);
37 insert into ff_harness (test_id, formula_id, item_name, data_type, usage)
38 select userenv('SESSIONID'), p_formula_id, item_name, data_type,
39 decode (usage, 'B', 'I', usage)
40 from ff_fdi_usages
41 where formula_id = p_formula_id
42 and (usage = 'I' or usage = 'B' or usage = 'U');
43 end load_harness;
44 ------------------------------- delete_harness -------------------------------
45 -- NAME
46 -- delete_harness
47 -- DESCRIPTION
48 -- Deletes all entries in the harness for the current user determined by
49 -- the test id passed as a parameter
50 --
51 procedure delete_harness is
52 begin
53 hr_utility.set_location ('ffhutl.delete_harness', 1);
54 delete from ff_harness where test_id = userenv('SESSIONID');
55 end delete_harness;
56 --
57 end ffhutl;