1 PACKAGE CN_IMP_RULE_PVT AS
2 -- $Header: cnvimrls.pls 120.2 2005/08/07 23:04:23 vensrini noship $
3
4 --
5 -- Package Body Name
6 -- CN_IMP_RULE_PVT
7 -- Purpose
8 -- This package contains the procedures to import data from the stagin tables
9 -- to the Ruleset, rule and rule attribute related tables
10 -- This method loads the rulesets before calling the load_rules procedure. Once a
11 -- a ruleset is loaded completely (i.e the rules and rule attributes loaded), the ruleset is
12 -- synchronized.
13 -- History
14 -- 3/14/2002 Arvind Krishnan Created
15
16 -- Procedure Name
17 -- Rules_Import
18 -- Scope
19 -- public
20 -- Purpose
21 -- This procedure is called by the import module to transfer data from the staging tables
22 -- to the destination tables.
23 -- History
24 -- 3/14/2002 Arvind Krishnan Created
25 --
26 PROCEDURE Rules_Import
27 ( errbuf OUT NOCOPY VARCHAR2,
28 retcode OUT NOCOPY VARCHAR2,
29 p_imp_header_id IN NUMBER,
30 p_org_id IN NUMBER);
31
32 -- Procedure Name
33 -- load_rules
34 -- Scope
35 -- public
36 -- Purpose
37 -- Invoked by the Rules_Import procedure. Loads the data from the staging table into the rules and rules
38 -- hierarchy tables
39 -- History
40 -- 3/14/2002 Arvind Krishnan Created
41 --
42 PROCEDURE load_rules
43 ( p_ruleset_id IN NUMBER,
44 p_ruleset_name IN VARCHAR2,
45 p_ruleset_start_date IN VARCHAR,
46 p_ruleset_end_date IN VARCHAR,
47 p_ruleset_type IN VARCHAR,
48 p_imp_header IN cn_imp_headers_pvt.imp_headers_rec_type,
49 x_err_mssg OUT NOCOPY VARCHAR2,
50 x_retcode OUT NOCOPY VARCHAR2,
51 x_imp_line_id OUT NOCOPY NUMBER,
52 x_failed_row IN OUT NOCOPY NUMBER,
53 x_processed_row IN OUT NOCOPY NUMBER,
54 p_org_id IN NUMBER);
55
56 -- Procedure Name
57 -- load_rule_attributes
58 -- Scope
59 -- public
60 -- Purpose
61 -- Invoked by the load_rules procedure. Loads the data from the staging table into the
62 -- rules attribute tables
63 -- History
64 -- 3/14/2002 Arvind Krishnan Created
65 --
66 PROCEDURE load_rule_attributes
67 ( p_ruleset_id IN NUMBER,
68 p_ruleset_name IN VARCHAR2,
69 p_ruleset_start_date IN VARCHAR,
70 p_ruleset_end_date IN VARCHAR,
71 p_ruleset_type IN VARCHAR,
72 p_rule_id IN NUMBER,
73 p_rule_name IN VARCHAR2,
74 p_parent_rule_name IN VARCHAR2,
75 p_level_num IN VARCHAR2,
76 p_imp_header IN cn_imp_headers_pvt.imp_headers_rec_type,
77 x_err_mssg OUT NOCOPY VARCHAR2,
78 x_retcode OUT NOCOPY VARCHAR2,
79 x_imp_line_id OUT NOCOPY NUMBER,
80 x_failed_row IN OUT NOCOPY NUMBER,
81 x_processed_row IN OUT NOCOPY NUMBER,
82 p_org_id IN NUMBER);
83
84 -- Procedure Name
85 -- update_on_error
86 -- Scope
87 -- public
88 -- Purpose
89 -- Called by the loading procedures when an error occurs. This method sets the error code
90 -- and error message in the cn_imp_lines tables
91 -- History
92 -- 3/14/2002 Arvind Krishnan Created
93 --
94 PROCEDURE update_on_error
95 (p_line_id IN NUMBER,
96 p_err_code IN VARCHAR2,
97 p_err_mssg IN VARCHAR2,
98 p_head_id IN NUMBER);
99
100 -- Procedure Name
101 -- update_imp_lines
102 -- Scope
103 -- public
104 -- Purpose
105 --
106 -- History
107 -- 3/14/2002 Arvind Krishnan Created
108 --
109 PROCEDURE update_imp_lines
110 (p_status IN VARCHAR2,
111 p_imp_line_id IN NUMBER,
112 p_ruleset_name IN VARCHAR2,
113 p_start_date IN VARCHAR2,
114 p_end_date IN VARCHAR2,
115 p_ruleset_type IN VARCHAR2,
116 p_head_id IN NUMBER,
117 p_error_code IN VARCHAR2,
118 p_error_mssg IN VARCHAR2,
119 x_failed_row IN OUT NOCOPY NUMBER,
120 x_processed_row IN OUT NOCOPY NUMBER);
121
122
123 END CN_IMP_RULE_PVT;